Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
---
title: Просмотр файлов
description: Просматривайте деревья узлов, ищите по имени или типу и изучайте свойства из терминала.
---
# Просмотр файлов
2026-04-22 15:35:22 +00:00
CLI позволяет исследовать дизайн-документы без открытия редактора. Каждая команда также работает с запущенным приложением — просто опустите аргумент файла.
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
::: tip Установка
```sh
2026-05-21 13:53:38 +00:00
npm install -g @open -pencil/cli
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
# или
brew install open-pencil/tap/open-pencil
```
:::
## Информация о документе
Краткий обзор — количество страниц, общее число узлов, используемые шрифты, размер файла:
```sh
2026-05-29 12:56:52 +00:00
openpencil info design.fig
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
```
## Дерево узлов
Вывод полной иерархии узлов:
```sh
2026-05-29 12:56:52 +00:00
openpencil tree design.fig
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
```
```
[0] [page] "Getting started" (0:46566)
[0] [section] "" (0:46567)
[0] [frame] "Body" (0:46568)
[0] [frame] "Introduction" (0:46569)
[0] [frame] "Introduction Card" (0:46570)
[0] [frame] "Guidance" (0:46571)
```
## Поиск узлов
Поиск по типу:
```sh
2026-05-29 12:56:52 +00:00
openpencil find design.fig --type TEXT
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
```
Поиск по имени:
```sh
2026-05-29 12:56:52 +00:00
openpencil find design.fig --name "Button"
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
```
О б а флага можно комбинировать для более точных результатов.
2026-04-22 15:35:22 +00:00
## Запросы с XPath
Используйте XPath-селекторы для поиска узлов по типу, атрибутам и структуре дерева:
```sh
2026-05-29 12:56:52 +00:00
openpencil query design.fig "//FRAME"
2026-04-22 15:35:22 +00:00
```
### Полезные шаблоны
**По типу:**
```sh
2026-05-29 12:56:52 +00:00
openpencil query design.fig "//TEXT" # В с е текстовые узлы
openpencil query design.fig "//COMPONENT" # В с е компоненты
openpencil query design.fig "//INSTANCE" # В с е экземпляры
2026-04-22 15:35:22 +00:00
```
**По атрибутам:**
```sh
2026-05-29 12:56:52 +00:00
openpencil query design.fig "//FRAME[@width < 300 ] " # Фреймы шириной менее 300px
openpencil query design.fig "//*[@cornerRadius > 0]" # Скруглённые углы
openpencil query design.fig "//*[@visible = false]" # Скрытые узлы
openpencil query design.fig "//TEXT[@fontSize >= 24]" # Крупный текст
openpencil query design.fig "//*[@opacity < 1 ] " # Полупрозрачные узлы
2026-04-22 15:35:22 +00:00
```
**По имени и текстовому содержимому:**
```sh
2026-05-29 12:56:52 +00:00
openpencil query design.fig "//TEXT[contains(@name, 'Button')]" # Имя содержит 'Button'
openpencil query design.fig "//TEXT[contains(@text, 'Hello')]" # Текст содержит 'Hello'
2026-04-22 15:35:22 +00:00
```
**По иерархии:**
```sh
2026-05-29 12:56:52 +00:00
openpencil query design.fig "//SECTION//TEXT" # Текст внутри секций
openpencil query design.fig "//FRAME/TEXT" # Прямые дочерние тексты фреймов
openpencil query design.fig "//COMPONENT_SET//INSTANCE" # Экземпляры внутри наборов компонентов
2026-04-22 15:35:22 +00:00
```
### Доступные атрибуты
`name` , `width` , `height` , `x` , `y` , `visible` , `opacity` , `cornerRadius` , `fontSize` , `fontFamily` , `fontWeight` , `layoutMode` , `itemSpacing` , `paddingTop` , `paddingRight` , `paddingBottom` , `paddingLeft` , `strokeWeight` , `rotation` , `locked` , `blendMode` , `text` , `lineHeight` , `letterSpacing`
### Пример вывода
```
Found 5 nodes
[0] [frame] "Logo 92× 32" (0:9)
[1] [frame] "logo-short-6 31× 32" (0:10)
[2] [frame] "wrapper 128× 73" (0:20)
[3] [frame] "pen-drawing 148× 52" (0:21)
[4] [frame] "surprised-emoji 32× 32" (0:26)
```
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
## Свойства узла
Просмотр всех свойств конкретного узла по е г о ID:
```sh
2026-05-29 12:56:52 +00:00
openpencil node design.fig --id 1:23
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
```
## Страницы
Список всех страниц в документе:
```sh
2026-05-29 12:56:52 +00:00
openpencil pages design.fig
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
```
## Переменные
Список дизайн-переменных и их коллекций:
```sh
2026-05-29 12:56:52 +00:00
openpencil variables design.fig
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
```
## Режим работы с приложением
Когда настольное приложение запущено, опустите аргумент файла — CLI подключится по RPC и будет работать с активным холстом:
```sh
2026-05-29 12:56:52 +00:00
openpencil tree # просмотр текущего документа
openpencil eval -c "..." # запрос к редактору
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
```
2026-04-22 15:35:22 +00:00
## Линтинг дизайна
Проверяйте документы на соответствие правилам именования, вёрстки, структуры и доступности:
```sh
2026-05-29 12:56:52 +00:00
openpencil lint design.fig
openpencil lint design.pen --preset strict
openpencil lint design.fig --rule color-contrast
openpencil lint design.fig --list-rules
2026-04-22 15:35:22 +00:00
```
Используйте `--json` для машиночитаемого вывода.
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
## JSON-вывод
В с е команды поддерживают `--json` для машиночитаемого вывода — передавайте в `jq` , используйте в CI-скриптах или обрабатывайте другими инструментами:
```sh
2026-05-29 12:56:52 +00:00
openpencil tree design.fig --json | jq '.[] | .name'
Translate AI & Automation + CLI reference to all 6 locales
48 translated pages (de, es, fr, it, pl, ru) for the Programmable
section: overview, AI Chat, Collaboration, JSX Renderer, CLI
(inspecting, exporting, analyzing, scripting).
CLI reference and MCP server pages copied as-is (mostly code/tables).
2026-03-08 12:35:03 +00:00
```