docs/reference/commands
リファレンス · CLI

コマンド一覧

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

読了目安 5 分

アプリプロジェクト

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

Terminal
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-buttonHello Button最小のウィンドウとボタン
counter-reactiveReactive CounterSignal / Memo / Effect のデモ
virtual-list-perf100k Virtual List10 万行の VirtualList 負荷テスト
text-inputText Input DemoInput / Textarea と text_core の統合
multi-windowMulti Window2 つのネイティブウィンドウ、ウィンドウ単位のルーティング
storybookzenit Storybook全コンポーネントのショーケース兼 e2e ターゲット
devtools-probeDevTools ProbeDevTools パフォーマンスパネルの実ウィンドウ検証
interop-probezenit Interop Probeリッチクリップボード / ドラッグアウトのシステムレベル検証
console-probeConsole ProbeConsole + DevTools の実ウィンドウ検証
design-probeDesign Probeデザインカンプとの比較用ターゲット
Terminal
zig build run-hello-button
zig build run-counter-reactive
zig build run-storybook

テスト

スイート

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

UI とリアクティビティ

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

レンダリングと GPU

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

テキストと国際化

コマンド内容
test-texttext モジュールのテスト(フォントカタログ / ウェイト)
test-text-coretext_core モジュールのテスト
test-text-propertiesシード指定可能な決定的テキスト座標プロパティテスト
test-i18ni18n モジュールのテスト
test-bidi-conformanceUnicode 17.0.0 UAX #9 準拠データ全件

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

コマンド内容
test-window-lifecycle決定的なマルチウィンドウのライフサイクルとルーティングのテスト
test-text-hook-ownersプロセス全体のテキスト計測フックの所有スタック(1 つのウィンドウを閉じても他のフックは残る)
test-selector-scaleHiDPI での FontSelector スケール伝播
test-system-sdkSystem SDK のテスト
test-system-sdk-backends決定的なネイティブバックエンドのテスト
check-system-sdk-crossLinux / Windows 向けに System SDK テストをコンパイル(実行はしない)
test-harnesstest_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-commonprovider に依存しない common アイコンモジュールを再生成
gen-icons-untitled / gen-icons-all内部アイコンセット。内部 checkout でのみ利用可
gen-component-indexsrc/ui を AST スキャンし、component_index_generated.zig を再生成
capability-matrix生成された macOS 機能マトリクスを出力
text-corpus-dumpコミット済みの T0 テキスト座標コーパスを出力

ビルドオプション

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

品質スクリプト

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

Bundle の検証

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

Terminal
zig build hello-button
codesign --verify --deep --strict "zig-out/Hello Button.app"
xattr -lr "zig-out/Hello Button.app"
zenit · デュアルライセンスオープンソースプロジェクトは GPL-3.0-only のもとで無料で使えます。クローズドソースや商用製品には商用ライセンスが必要です。作者への連絡先:zongyi.xzy#gmail.com(# を @ に置き換え)zenit 5f9add5+wip 2026-09-30