Contributing to unity-cli
March 12, 2026 · View on GitHub
English | 日本語
Thanks for contributing to unity-cli.
Prerequisites
- Rust stable
- .NET SDK 10.0+ (for
lsp/tests) - Node.js 20+ + pnpm (for markdown/commit tooling)
- Unity 6+ (when validating Unity package behavior)
Development Setup
git clone https://github.com/akiojin/unity-cli.git
cd unity-cli
pnpm install --frozen-lockfile
Docker (Optional)
You can use Docker without installing Rust / .NET locally.
docker build -t unity-cli-dev .
docker run --rm unity-cli-dev
Validation Commands
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --all-targets
dotnet test lsp/Server.Tests.csproj
Running Tests
Rust
cargo test
LSP (C# / .NET 9)
dotnet test lsp/Server.Tests.csproj
.NET SDK 10 が必要です。dotnet --version で 10.x を確認してください。
Pre-push Hook
This repository includes a .husky/pre-push hook. To enable it:
chmod +x .husky/pre-push
git config core.hooksPath .husky
The hook automatically runs cargo test and dotnet test before git push.
If any test fails, the push is aborted.
CI
To merge a Pull Request into main, the following CI checks must pass:
- Rust Tests (required) —
cargo test - LSP Tests (required) —
dotnet test lsp/Server.Tests.csproj
PRs with failing tests cannot be merged.
Local Unity E2E
Unity E2E is not part of CI. Run it locally only when you need live Unity listener validation.
- Smoke:
scripts/e2e-test.sh - Full local sweep:
scripts/e2e-all-tools.sh
Branch Policy
- Default target branch:
develop mainaccepts only release PRs fromdevelopor release automation branches
Commit Style
Use Conventional Commits:
feat: ...fix: ...chore: ...docs: ...test: ...
TDD
Follow RED -> GREEN -> REFACTOR. Add/adjust tests in the same change set as implementation.
Spec-Driven Development
For feature work, use Issue-first spec management:
- Create or update a GitHub Issue with label
gwt-spec - Keep
## Spec,## Plan,## Tasks, and## TDDsections current - Use the Issue number as SPEC ID and avoid local spec directories
License and Attribution
unity-cli is MIT licensed. MIT requires preserving the copyright + permission notice.
If you ship an app built with unity-cli, please include attribution in one of:
- app credits
- about screen
- repository README
Recommended text:
This product uses unity-cli (https://github.com/akiojin/unity-cli), licensed under MIT.
日本語
unity-cli へのコントリビュートありがとうございます。
前提ツール
- Rust stable
- .NET SDK 10.0+(
lsp/テスト用) - Node.js 20+ と pnpm(ドキュメント/コミット系ツール用)
- Unity 6+(Unityパッケージ挙動確認時)
セットアップ
git clone https://github.com/akiojin/unity-cli.git
cd unity-cli
pnpm install --frozen-lockfile
Docker(任意)
ローカルに Rust / .NET をインストールせずに Docker で検証できます。
docker build -t unity-cli-dev .
docker run --rm unity-cli-dev
検証コマンド
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --all-targets
dotnet test lsp/Server.Tests.csproj
プッシュ前フック
このリポジトリには .husky/pre-push フックが含まれています。有効にするには:
chmod +x .husky/pre-push
git config core.hooksPath .husky
フックは git push の前に自動的に cargo test と dotnet test を実行します。
テストが失敗した場合、push は中断されます。
CI / 継続的インテグレーション
Pull Request を main にマージするには、以下の CI チェックがすべて成功する必要があります:
- Rust Tests (required) —
cargo test - LSP Tests (required) —
dotnet test lsp/Server.Tests.csproj
テストが失敗している PR はマージできません。
ローカル Unity E2E
Unity E2E は CI では実行しません。live Unity listener の確認が必要なときだけローカルで実行してください。
- スモーク:
scripts/e2e-test.sh - フルローカル確認:
scripts/e2e-all-tools.sh
ブランチ運用
- 通常のPR先は
develop mainへのPRはリリース系のみ
コミット規約
Conventional Commits を使用してください(feat:, fix:, chore:, docs:, test: など)。
TDD
RED -> GREEN -> REFACTOR を前提に進めてください。実装変更には対応テストを含めます。
Spec駆動開発
機能開発は Issue-first で管理してください。
gwt-specラベル付き GitHub Issue を作成または更新する- Issue 本文の
## Spec/## Plan/## Tasks/## TDDを更新する - SPEC ID は Issue 番号を使い、ローカル spec ディレクトリは作成しない
ライセンスと表記
unity-cli は MIT ライセンスです。MIT条項に従い、著作権表示と許諾表示を保持してください。
unity-cli を利用したアプリ配布時は、次のいずれかへの表記を推奨します。
- クレジット
- About画面
- README
推奨表記:
This product uses unity-cli (https://github.com/akiojin/unity-cli), licensed under MIT.