---
title: "コマンド — zenit Zig UI ドキュメント"
description: "ビルド、サンプル、テスト、コード生成、品質チェックのコマンドをまとめて確認できます。"
url: https://zenit.z.express/ja/docs/reference/commands
language: ja
alternate_en: https://zenit.z.express/docs/reference/commands.md
alternate_zh: https://zenit.z.express/zh/docs/reference/commands.md
alternate_es: https://zenit.z.express/es/docs/reference/commands.md
alternate_ko: https://zenit.z.express/ko/docs/reference/commands.md
alternate_fr: https://zenit.z.express/fr/docs/reference/commands.md
alternate_de: https://zenit.z.express/de/docs/reference/commands.md
project: zenit v0.1.0-alpha (Zig 0.15.2, macOS)
source: https://github.com/version-next/zenit
---

# コマンド一覧

ビルド、サンプル、テスト、コード生成、品質チェックのコマンドをまとめて確認できます。

## アプリプロジェクト

以下の step はテンプレートの `templates/minimal-app/build.zig` にあります。`app` step は macOS ターゲットでのみ登録されます。

```sh
zig build                      # build the executable
zig build run                  # build and run
zig build app                  # package a macOS .app bundle (zig-out/)
zig build -Dtest-mode=true     # enable the automation harness (forwarded to zenit)
```

## zenit リポジトリのサンプル

各サンプルには 2 つの step があります。`zig build <name>` は ad-hoc 署名付きの `.app` を生成し、`zig build run-<name>` は実行ファイルを直接起動します。

| Step | .app 名 | 内容 |
| --- | --- | --- |
| `hello-button` | Hello Button | 最小のウィンドウとボタン |
| `counter-reactive` | Reactive Counter | Signal / Memo / Effect のデモ |
| `virtual-list-perf` | 100k Virtual List | 10 万行の VirtualList 負荷テスト |
| `text-input` | Text Input Demo | Input / Textarea と text\_core の統合 |
| `multi-window` | Multi Window | 2 つのネイティブウィンドウ、ウィンドウ単位のルーティング |
| `storybook` | zenit Storybook | 全コンポーネントのショーケース兼 e2e ターゲット |
| `devtools-probe` | DevTools Probe | DevTools パフォーマンスパネルの実ウィンドウ検証 |
| `interop-probe` | zenit Interop Probe | リッチクリップボード / ドラッグアウトのシステムレベル検証 |
| `console-probe` | Console Probe | Console + DevTools の実ウィンドウ検証 |
| `design-probe` | Design Probe | デザインカンプとの比較用ターゲット |

```sh
zig build run-hello-button
zig build run-counter-reactive
zig build run-storybook
```

## テスト

### スイート

| コマンド | 内容 |
| --- | --- |
| `test` | test-headless のエイリアス |
| `test-headless` | 決定的テスト。実 Metal デバイスは不要 |
| `test-all` | 決定的テスト + 実デバイスが必要な Metal テスト |
| `test-null-backend` | Null GPU バックエンドで決定的テストをビルド・実行し、RHI 抽象を検証 |

### UI とリアクティビティ

| コマンド | 内容 |
| --- | --- |
| `test-ui` | UI システムテスト。-Dtest-filter=<substring> で名前が一致するものだけ実行 |
| `test-ui-core` | ui\_core 統合テスト（src/ui/core/tests.zig） |
| `test-reactive` | リアクティブシステムのテスト |
| `test-allocation-campaign` | トランザクション的なフレームワーク境界でアロケーション失敗を 1 点ずつ注入 |

### レンダリングと GPU

| コマンド | 内容 |
| --- | --- |
| `test-render` | render モジュールのテスト |
| `test-gpu` | GPU 抽象レイヤーのテスト |
| `test-metal` | 実 Metal デバイスが必要なテスト |
| `test-svg` | SVG パーサー / ラスタライザーのテスト |
| `test-timing-ring` | フレームタイミングリングのテスト |

### テキストと国際化

| コマンド | 内容 |
| --- | --- |
| `test-text` | text モジュールのテスト（フォントカタログ / ウェイト） |
| `test-text-core` | text\_core モジュールのテスト |
| `test-text-properties` | シード指定可能な決定的テキスト座標プロパティテスト |
| `test-i18n` | i18n モジュールのテスト |
| `test-bidi-conformance` | Unicode 17.0.0 UAX #9 準拠データ全件 |

### プラットフォーム、ウィンドウ、パッケージング

| コマンド | 内容 |
| --- | --- |
| `test-window-lifecycle` | 決定的なマルチウィンドウのライフサイクルとルーティングのテスト |
| `test-text-hook-owners` | プロセス全体のテキスト計測フックの所有スタック（1 つのウィンドウを閉じても他のフックは残る） |
| `test-selector-scale` | HiDPI での FontSelector スケール伝播 |
| `test-system-sdk` | System SDK のテスト |
| `test-system-sdk-backends` | 決定的なネイティブバックエンドのテスト |
| `check-system-sdk-cross` | Linux / Windows 向けに System SDK テストをコンパイル（実行はしない） |
| `test-harness` | test\_harness（file-RPC）のテスト |
| `test-package-consumer` | 直接パッケージと Zig でフィルタしたパッケージの両方で下流アプリをビルド・起動 |

## コード生成とツール

| コマンド | 内容 |
| --- | --- |
| `bench` | パフォーマンスのベースライン：zig build bench \[-- filter\] \[-- json=path\] |
| `gen-icons` | \-Dicon-set で選んだアイコンモジュールを再生成（既定は lucide） |
| `gen-icons-lucide` | 公開 Lucide アイコンモジュールを再生成 |
| `gen-icons-common` | provider に依存しない common アイコンモジュールを再生成 |
| `gen-icons-untitled / gen-icons-all` | 内部アイコンセット。内部 checkout でのみ利用可 |
| `gen-component-index` | src/ui を AST スキャンし、component\_index\_generated.zig を再生成 |
| `capability-matrix` | 生成された macOS 機能マトリクスを出力 |
| `text-corpus-dump` | コミット済みの T0 テキスト座標コーパスを出力 |

## ビルドオプション

| オプション | 既定値 | 効果 |
| --- | --- | --- |
| `-Dtest-mode=true` | `false` | e2e harness を有効化（file-RPC サーバー） |
| `-De2e-port=<n>` | `19816` | E2E ポート。既定の RPC ディレクトリ名に使われます |
| `-Dtest-filter=<s>` | — | 名前にその部分文字列を含む test-ui テストだけを実行 |
| `-Dicon-set=<name>` | `lucide` | 組み込みアイコン provider：lucide または untitled（内部のみ） |
| `-Dgpu-backend=<name>` | `metal` | GPU バックエンド：metal または null |

> NOTE
> 
> **依存のオプションは明示的に転送します。** Zig は依存のビルドオプションを互いに分離します。`zig build -Dtest-mode=true` を zenit に届けるには、下流アプリが `b.dependency("zenit", ...)` で `.@"test-mode"` と `.@"e2e-port"` を転送する必要があります。テンプレートでは対応済みです。

## 品質スクリプト

| スクリプト | チェック内容 |
| --- | --- |
| `./scripts/check_oss_boundary.sh` | src/ui の import を静的にチェックし、hello-button をビルドして禁止モジュールに到達できないことを確認 |
| `./scripts/check_style_literals.sh` | サンプル中の生の色 / 文字サイズリテラルは減らすのみで増やさない（ui.arb の逃げ道は許可） |
| `bash scripts/switch_icon_set.sh lucide` | 指定したアイコンセットで test-headless と storybook のビルドを実行し、ワークツリーは変更しない |

> TIP
> 
> **ZIG で上書きします。** リポジトリのスクリプトは PATH 上の `zig` を使います。特定のツールチェーンに固定するには `ZIG=/absolute/path/to/zig` を設定します。

## Bundle の検証

サンプルの bundle は ad-hoc 署名され、quarantine 属性が除去されています。以下のコマンドで署名を検証し、残っている拡張属性を一覧表示します。

```sh
zig build hello-button
codesign --verify --deep --strict "zig-out/Hello Button.app"
xattr -lr "zig-out/Hello Button.app"
```
