uloop-cli 0.67.2 → 0.67.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +260 -29
- package/README_ja.md +366 -0
- package/dist/cli.bundle.cjs +73 -5
- package/dist/cli.bundle.cjs.map +2 -2
- package/package.json +1 -1
- package/src/default-tools.json +72 -4
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
[日本語](README_ja.md)
|
|
2
|
+
|
|
1
3
|
# uloop-cli
|
|
2
4
|
|
|
3
5
|
[](https://www.npmjs.com/package/uloop-cli)
|
|
@@ -66,58 +68,287 @@ Skills are dynamically loaded from the uLoopMCP package in your Unity project. T
|
|
|
66
68
|
|
|
67
69
|
Custom skills defined in your project are also automatically detected.
|
|
68
70
|
|
|
69
|
-
##
|
|
71
|
+
## CLI Command Reference
|
|
72
|
+
|
|
73
|
+
You can also call the CLI directly without using Skills.
|
|
74
|
+
|
|
75
|
+
### Project Path / Port Specification
|
|
76
|
+
|
|
77
|
+
If `--project-path` / `--port` is omitted, the port is automatically selected from the Unity project detected in the current directory.
|
|
70
78
|
|
|
71
|
-
|
|
79
|
+
To operate multiple Unity instances from a single LLM tool, explicitly specify a project path or port:
|
|
72
80
|
|
|
73
81
|
```bash
|
|
74
|
-
#
|
|
75
|
-
uloop
|
|
82
|
+
# Specify by project path (absolute or relative)
|
|
83
|
+
uloop compile --project-path /Users/foo/my-unity-project
|
|
84
|
+
uloop compile --project-path ../other-project
|
|
76
85
|
|
|
77
|
-
#
|
|
78
|
-
uloop
|
|
86
|
+
# Specify by port number
|
|
87
|
+
uloop compile --port {target-port}
|
|
88
|
+
```
|
|
79
89
|
|
|
80
|
-
|
|
81
|
-
|
|
90
|
+
> [!NOTE]
|
|
91
|
+
> - `--project-path` and `--port` cannot be used together.
|
|
92
|
+
> - You can find the port number in each Unity's uLoopMCP Window.
|
|
93
|
+
|
|
94
|
+
### Chaining Commands
|
|
82
95
|
|
|
83
|
-
|
|
96
|
+
Chain commands with `&&` to automate a sequence of operations:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Compile → wait for Domain Reload → play → focus Unity
|
|
100
|
+
uloop compile --wait-for-domain-reload true && uloop control-play-mode --action Play && uloop focus-window
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Utility Commands
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
uloop list # List available tools from Unity
|
|
107
|
+
uloop sync # Sync tool definitions from Unity to local cache
|
|
108
|
+
uloop completion # Setup shell completion
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### compile
|
|
112
|
+
|
|
113
|
+
Execute Unity project compilation.
|
|
114
|
+
|
|
115
|
+
| Flag | Type | Default | Description |
|
|
116
|
+
|------|------|---------|-------------|
|
|
117
|
+
| `--force-recompile` | boolean | `false` | Force full recompilation |
|
|
118
|
+
| `--wait-for-domain-reload` | boolean | `false` | Wait for Domain Reload completion |
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
uloop compile
|
|
84
122
|
uloop compile --force-recompile true --wait-for-domain-reload true
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### get-logs
|
|
85
126
|
|
|
86
|
-
|
|
87
|
-
uloop get-logs --max-count 10
|
|
127
|
+
Retrieve logs from Unity Console.
|
|
88
128
|
|
|
89
|
-
|
|
90
|
-
|
|
129
|
+
| Flag | Type | Default | Description |
|
|
130
|
+
|------|------|---------|-------------|
|
|
131
|
+
| `--log-type` | enum | `All` | Log type filter: `Error`, `Warning`, `Log`, `All` |
|
|
132
|
+
| `--max-count` | integer | `100` | Maximum number of logs to retrieve |
|
|
133
|
+
| `--search-text` | string | | Text to search within logs |
|
|
134
|
+
| `--include-stack-trace` | boolean | `false` | Include stack trace in output |
|
|
135
|
+
| `--use-regex` | boolean | `false` | Use regex for search |
|
|
136
|
+
| `--search-in-stack-trace` | boolean | `false` | Search within stack trace |
|
|
91
137
|
|
|
92
|
-
|
|
93
|
-
uloop
|
|
138
|
+
```bash
|
|
139
|
+
uloop get-logs
|
|
140
|
+
uloop get-logs --log-type Error --max-count 10
|
|
141
|
+
uloop get-logs --search-text "NullReference" --include-stack-trace true
|
|
94
142
|
```
|
|
95
143
|
|
|
96
|
-
|
|
144
|
+
### run-tests
|
|
97
145
|
|
|
98
|
-
|
|
146
|
+
Execute Unity Test Runner.
|
|
147
|
+
|
|
148
|
+
| Flag | Type | Default | Description |
|
|
149
|
+
|------|------|---------|-------------|
|
|
150
|
+
| `--test-mode` | enum | `EditMode` | Test mode: `EditMode`, `PlayMode` |
|
|
151
|
+
| `--filter-type` | enum | `all` | Filter type: `all`, `exact`, `regex`, `assembly` |
|
|
152
|
+
| `--filter-value` | string | | Filter value (used when filter-type is not `all`) |
|
|
99
153
|
|
|
100
154
|
```bash
|
|
101
|
-
|
|
102
|
-
uloop
|
|
155
|
+
uloop run-tests
|
|
156
|
+
uloop run-tests --test-mode EditMode --filter-type regex --filter-value "MyTests"
|
|
157
|
+
uloop run-tests --filter-type assembly --filter-value "MyApp.Tests.Editor"
|
|
158
|
+
```
|
|
103
159
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
160
|
+
### clear-console
|
|
161
|
+
|
|
162
|
+
Clear Unity console logs.
|
|
163
|
+
|
|
164
|
+
| Flag | Type | Default | Description |
|
|
165
|
+
|------|------|---------|-------------|
|
|
166
|
+
| `--add-confirmation-message` | boolean | `true` | Add confirmation message after clearing |
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
uloop clear-console
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### focus-window
|
|
173
|
+
|
|
174
|
+
Bring Unity Editor window to front.
|
|
175
|
+
|
|
176
|
+
No parameters.
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
uloop focus-window
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### get-hierarchy
|
|
183
|
+
|
|
184
|
+
Get Unity Hierarchy structure.
|
|
185
|
+
|
|
186
|
+
| Flag | Type | Default | Description |
|
|
187
|
+
|------|------|---------|-------------|
|
|
188
|
+
| `--root-path` | string | | Root GameObject path to start from |
|
|
189
|
+
| `--max-depth` | integer | `-1` | Maximum depth (-1 for unlimited) |
|
|
190
|
+
| `--include-components` | boolean | `true` | Include component information |
|
|
191
|
+
| `--include-inactive` | boolean | `true` | Include inactive GameObjects |
|
|
192
|
+
| `--include-paths` | boolean | `false` | Include path information |
|
|
193
|
+
| `--use-components-lut` | string | `auto` | Use LUT for components: `auto`, `true`, `false` |
|
|
194
|
+
| `--use-selection` | boolean | `false` | Use selected GameObject(s) as root(s) |
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
uloop get-hierarchy
|
|
198
|
+
uloop get-hierarchy --root-path "Canvas" --max-depth 3
|
|
199
|
+
uloop get-hierarchy --use-selection true
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### unity-search
|
|
203
|
+
|
|
204
|
+
Search Unity project.
|
|
205
|
+
|
|
206
|
+
| Flag | Type | Default | Description |
|
|
207
|
+
|------|------|---------|-------------|
|
|
208
|
+
| `--search-query` | string | | Search query (Unity Search syntax) |
|
|
209
|
+
| `--providers` | array | | Search providers (e.g., `asset`, `scene`, `menu`) |
|
|
210
|
+
| `--max-results` | integer | `50` | Maximum number of results |
|
|
211
|
+
| `--include-description` | boolean | `true` | Include detailed descriptions in results |
|
|
212
|
+
| `--include-metadata` | boolean | `false` | Include file metadata (size, modified date) |
|
|
213
|
+
| `--search-flags` | enum | `Default` | Search flags: `Default`, `Synchronous`, `WantsMore`, `Packages`, `Sorted` |
|
|
214
|
+
| `--save-to-file` | boolean | `false` | Save results to file |
|
|
215
|
+
| `--output-format` | enum | `JSON` | Output format when saving: `JSON`, `CSV`, `TSV` |
|
|
216
|
+
| `--auto-save-threshold` | integer | `100` | Auto-save threshold (0 to disable) |
|
|
217
|
+
| `--file-extensions` | array | | Filter by file extension (e.g., `cs`, `prefab`, `mat`) |
|
|
218
|
+
| `--asset-types` | array | | Filter by asset type (e.g., `Texture2D`, `GameObject`) |
|
|
219
|
+
| `--path-filter` | string | | Filter by path pattern (supports wildcards) |
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
uloop unity-search --search-query "*.prefab"
|
|
223
|
+
uloop unity-search --search-query "t:Texture2D" --max-results 10
|
|
224
|
+
uloop unity-search --search-query "t:MonoScript *.cs" --save-to-file true
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### get-menu-items
|
|
228
|
+
|
|
229
|
+
Retrieve Unity MenuItems.
|
|
230
|
+
|
|
231
|
+
| Flag | Type | Default | Description |
|
|
232
|
+
|------|------|---------|-------------|
|
|
233
|
+
| `--filter-text` | string | | Text to filter MenuItem paths |
|
|
234
|
+
| `--filter-type` | enum | `contains` | Filter type: `contains`, `exact`, `startswith` |
|
|
235
|
+
| `--max-count` | integer | `200` | Maximum number of items |
|
|
236
|
+
| `--include-validation` | boolean | `false` | Include validation functions |
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
uloop get-menu-items
|
|
240
|
+
uloop get-menu-items --filter-text "GameObject" --filter-type startswith
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### execute-menu-item
|
|
244
|
+
|
|
245
|
+
Execute Unity MenuItem by path.
|
|
246
|
+
|
|
247
|
+
| Flag | Type | Default | Description |
|
|
248
|
+
|------|------|---------|-------------|
|
|
249
|
+
| `--menu-item-path` | string | | Menu item path (e.g., "GameObject/Create Empty") |
|
|
250
|
+
| `--use-reflection-fallback` | boolean | `true` | Use reflection fallback if direct execution fails |
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
uloop execute-menu-item --menu-item-path "File/Save"
|
|
254
|
+
uloop execute-menu-item --menu-item-path "GameObject/Create Empty"
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### find-game-objects
|
|
258
|
+
|
|
259
|
+
Find GameObjects with search criteria.
|
|
260
|
+
|
|
261
|
+
| Flag | Type | Default | Description |
|
|
262
|
+
|------|------|---------|-------------|
|
|
263
|
+
| `--name-pattern` | string | | Name pattern to search |
|
|
264
|
+
| `--search-mode` | enum | `Exact` | Search mode: `Exact`, `Path`, `Regex`, `Contains`, `Selected` |
|
|
265
|
+
| `--required-components` | array | | Required component type names |
|
|
266
|
+
| `--tag` | string | | Tag filter |
|
|
267
|
+
| `--layer` | integer | | Layer filter |
|
|
268
|
+
| `--max-results` | integer | `20` | Maximum number of results |
|
|
269
|
+
| `--include-inactive` | boolean | `false` | Include inactive GameObjects |
|
|
270
|
+
| `--include-inherited-properties` | boolean | `false` | Include inherited properties |
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
uloop find-game-objects --name-pattern "Player"
|
|
274
|
+
uloop find-game-objects --required-components "Camera" --include-inactive true
|
|
275
|
+
uloop find-game-objects --tag "Enemy" --max-results 50
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### capture-window
|
|
279
|
+
|
|
280
|
+
Capture Unity EditorWindow and save as PNG.
|
|
281
|
+
|
|
282
|
+
| Flag | Type | Default | Description |
|
|
283
|
+
|------|------|---------|-------------|
|
|
284
|
+
| `--window-name` | string | `Game` | Window name (e.g., "Game", "Scene", "Console", "Inspector") |
|
|
285
|
+
| `--resolution-scale` | number | `1` | Resolution scale (0.1 to 1.0) |
|
|
286
|
+
| `--match-mode` | enum | `exact` | Matching mode: `exact`, `prefix`, `contains` (case-insensitive) |
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
uloop capture-window
|
|
290
|
+
uloop capture-window --window-name Scene
|
|
291
|
+
uloop capture-window --window-name Project --match-mode prefix
|
|
107
292
|
```
|
|
108
293
|
|
|
109
|
-
|
|
294
|
+
### execute-dynamic-code
|
|
295
|
+
|
|
296
|
+
Execute C# code in Unity Editor.
|
|
110
297
|
|
|
111
|
-
|
|
298
|
+
| Flag | Type | Default | Description |
|
|
299
|
+
|------|------|---------|-------------|
|
|
300
|
+
| `--code` | string | | C# code to execute |
|
|
301
|
+
| `--parameters` | object | | Runtime parameters for execution |
|
|
302
|
+
| `--compile-only` | boolean | `false` | Compile only without execution |
|
|
112
303
|
|
|
113
304
|
```bash
|
|
114
|
-
uloop
|
|
115
|
-
uloop
|
|
305
|
+
uloop execute-dynamic-code --code 'using UnityEngine; Debug.Log("Hello!");'
|
|
306
|
+
uloop execute-dynamic-code --code 'Selection.activeGameObject.name' --compile-only true
|
|
116
307
|
```
|
|
117
308
|
|
|
118
|
-
|
|
309
|
+
### get-provider-details
|
|
310
|
+
|
|
311
|
+
Get Unity Search provider details.
|
|
312
|
+
|
|
313
|
+
| Flag | Type | Default | Description |
|
|
314
|
+
|------|------|---------|-------------|
|
|
315
|
+
| `--provider-id` | string | | Specific provider ID (e.g., "asset", "scene") |
|
|
316
|
+
| `--active-only` | boolean | `false` | Only active providers |
|
|
317
|
+
| `--include-descriptions` | boolean | `true` | Include descriptions |
|
|
318
|
+
| `--sort-by-priority` | boolean | `true` | Sort by priority |
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
uloop get-provider-details
|
|
322
|
+
uloop get-provider-details --provider-id asset
|
|
323
|
+
uloop get-provider-details --active-only true
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### control-play-mode
|
|
327
|
+
|
|
328
|
+
Control Unity Editor play mode.
|
|
329
|
+
|
|
330
|
+
| Flag | Type | Default | Description |
|
|
331
|
+
|------|------|---------|-------------|
|
|
332
|
+
| `--action` | enum | `Play` | Action: `Play`, `Stop`, `Pause` |
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
uloop control-play-mode --action Play
|
|
336
|
+
uloop control-play-mode --action Stop
|
|
337
|
+
uloop control-play-mode --action Pause
|
|
338
|
+
```
|
|
119
339
|
|
|
120
|
-
|
|
340
|
+
## Shell Completion
|
|
341
|
+
|
|
342
|
+
Install Bash/Zsh/PowerShell completion for tab-completion support:
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
# Auto-detect shell and install
|
|
346
|
+
uloop completion --install
|
|
347
|
+
|
|
348
|
+
# Explicitly specify shell
|
|
349
|
+
uloop completion --shell bash --install # Git Bash / MINGW64
|
|
350
|
+
uloop completion --shell powershell --install # PowerShell
|
|
351
|
+
```
|
|
121
352
|
|
|
122
353
|
## Requirements
|
|
123
354
|
|
|
@@ -128,7 +359,7 @@ You can find the port number in each Unity's uLoopMCP Window.
|
|
|
128
359
|
## Links
|
|
129
360
|
|
|
130
361
|
- [uLoopMCP Repository](https://github.com/hatayama/uLoopMCP) - Main package and documentation
|
|
131
|
-
- [Tool Reference](https://github.com/hatayama/uLoopMCP/blob/main/Packages/src/TOOL_REFERENCE.md) - Detailed
|
|
362
|
+
- [Tool Reference](https://github.com/hatayama/uLoopMCP/blob/main/Packages/src/TOOL_REFERENCE.md) - Detailed API specifications and response schemas
|
|
132
363
|
|
|
133
364
|
## License
|
|
134
365
|
|
package/README_ja.md
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
[English](README.md)
|
|
2
|
+
|
|
3
|
+
# uloop-cli
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/uloop-cli)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
|
|
9
|
+
**[uLoopMCP](https://github.com/hatayama/uLoopMCP) の CLI コンパニオン** - AIエージェントにUnityプロジェクトのコンパイル、テスト、操作を任せましょう。
|
|
10
|
+
|
|
11
|
+
> **前提条件**: このCLIを使用するには、Unityプロジェクトに [uLoopMCP](https://github.com/hatayama/uLoopMCP) がインストールされ、サーバーが起動している必要があります。セットアップ手順は [メインリポジトリ](https://github.com/hatayama/uLoopMCP) を参照してください。
|
|
12
|
+
|
|
13
|
+
## インストール
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g uloop-cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## クイックスタート
|
|
20
|
+
|
|
21
|
+
### ステップ 1: Skills のインストール
|
|
22
|
+
|
|
23
|
+
Skills を使うと、LLMツール(Claude Code、Cursor など)がUnity操作を自動的に呼び出せるようになります。
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Claude Code 用にインストール(プロジェクトレベル)
|
|
27
|
+
uloop skills install --claude
|
|
28
|
+
|
|
29
|
+
# OpenAI Codex 用にインストール(プロジェクトレベル)
|
|
30
|
+
uloop skills install --codex
|
|
31
|
+
|
|
32
|
+
# グローバルにインストールすることも可能
|
|
33
|
+
uloop skills install --claude --global
|
|
34
|
+
uloop skills install --codex --global
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### ステップ 2: LLM ツールで使う
|
|
38
|
+
|
|
39
|
+
Skills をインストールすると、LLMツールが以下のような指示を自動的に処理できるようになります:
|
|
40
|
+
|
|
41
|
+
| あなたの指示 | 使用される Skill |
|
|
42
|
+
|---|---|
|
|
43
|
+
| 「コンパイルエラーを直して」 | `/uloop-compile` |
|
|
44
|
+
| 「テストを実行して、失敗の原因を教えて」 | `/uloop-run-tests` |
|
|
45
|
+
| 「シーンの階層構造を確認して」 | `/uloop-get-hierarchy` |
|
|
46
|
+
| 「プレハブを検索して」 | `/uloop-unity-search` |
|
|
47
|
+
|
|
48
|
+
> **MCP の設定は不要です!** uLoopMCP Window でサーバーが起動していれば、LLMツールは Skills を通じてUnityと直接通信します。
|
|
49
|
+
|
|
50
|
+
## 利用可能な Skills
|
|
51
|
+
|
|
52
|
+
Skills はUnityプロジェクト内の uLoopMCP パッケージから動的に読み込まれます。以下は uLoopMCP が提供するデフォルトの Skills です:
|
|
53
|
+
|
|
54
|
+
- `/uloop-compile` - コンパイルの実行
|
|
55
|
+
- `/uloop-get-logs` - コンソールログの取得
|
|
56
|
+
- `/uloop-run-tests` - テストの実行
|
|
57
|
+
- `/uloop-clear-console` - コンソールのクリア
|
|
58
|
+
- `/uloop-focus-window` - Unity Editor を前面に表示
|
|
59
|
+
- `/uloop-get-hierarchy` - シーン階層の取得
|
|
60
|
+
- `/uloop-unity-search` - Unity 検索
|
|
61
|
+
- `/uloop-get-menu-items` - メニューアイテムの取得
|
|
62
|
+
- `/uloop-execute-menu-item` - メニューアイテムの実行
|
|
63
|
+
- `/uloop-find-game-objects` - GameObject の検索
|
|
64
|
+
- `/uloop-capture-window` - EditorWindow のキャプチャ
|
|
65
|
+
- `/uloop-control-play-mode` - Play Mode の制御
|
|
66
|
+
- `/uloop-execute-dynamic-code` - 動的 C# コードの実行
|
|
67
|
+
- `/uloop-get-provider-details` - 検索プロバイダー詳細の取得
|
|
68
|
+
|
|
69
|
+
プロジェクトで定義したカスタム Skills も自動的に検出されます。
|
|
70
|
+
|
|
71
|
+
## CLI コマンドリファレンス
|
|
72
|
+
|
|
73
|
+
Skills を使わずに、CLI を直接呼び出すこともできます。
|
|
74
|
+
|
|
75
|
+
### プロジェクトパス指定 / ポート指定
|
|
76
|
+
|
|
77
|
+
`--project-path` / `--port` を省略した場合は、カレントディレクトリの Unity プロジェクトで設定されたポートが自動選択されます。
|
|
78
|
+
|
|
79
|
+
一つのLLMツールから複数のUnityインスタンスを操作したい場合、プロジェクトパスまたはポートを明示的に指定します:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# プロジェクトパスで指定(絶対パス・相対パスどちらも可)
|
|
83
|
+
uloop compile --project-path /Users/foo/my-unity-project
|
|
84
|
+
uloop compile --project-path ../other-project
|
|
85
|
+
|
|
86
|
+
# ポート番号で指定
|
|
87
|
+
uloop compile --port {target-port}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> [!NOTE]
|
|
91
|
+
> - `--project-path` と `--port` は同時に指定できません。
|
|
92
|
+
> - ポート番号は各Unityの uLoopMCP Window で確認できます。
|
|
93
|
+
|
|
94
|
+
### コマンドの連携
|
|
95
|
+
|
|
96
|
+
`&&` でコマンドを連結することで、一連の操作を自動化できます:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# コンパイル → Domain Reload 待機 → 再生 → Unity にフォーカス
|
|
100
|
+
uloop compile --wait-for-domain-reload true && uloop control-play-mode --action Play && uloop focus-window
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### ユーティリティコマンド
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
uloop list # Unity から利用可能なツールを一覧表示
|
|
107
|
+
uloop sync # Unity からツール定義をローカルキャッシュに同期
|
|
108
|
+
uloop completion # シェル補完のセットアップ
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### compile
|
|
112
|
+
|
|
113
|
+
Unity プロジェクトのコンパイルを実行します。
|
|
114
|
+
|
|
115
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
116
|
+
|--------|------|---------|-------------|
|
|
117
|
+
| `--force-recompile` | boolean | `false` | 強制再コンパイルを実行 |
|
|
118
|
+
| `--wait-for-domain-reload` | boolean | `false` | Domain Reload 完了まで待機 |
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
uloop compile
|
|
122
|
+
uloop compile --force-recompile true --wait-for-domain-reload true
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### get-logs
|
|
126
|
+
|
|
127
|
+
Unity コンソールからログを取得します。
|
|
128
|
+
|
|
129
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
130
|
+
|--------|------|---------|-------------|
|
|
131
|
+
| `--log-type` | enum | `All` | ログタイプフィルタ: `Error`, `Warning`, `Log`, `All` |
|
|
132
|
+
| `--max-count` | integer | `100` | 取得するログの最大数 |
|
|
133
|
+
| `--search-text` | string | | ログ内で検索するテキスト |
|
|
134
|
+
| `--include-stack-trace` | boolean | `false` | スタックトレースを含める |
|
|
135
|
+
| `--use-regex` | boolean | `false` | 正規表現で検索 |
|
|
136
|
+
| `--search-in-stack-trace` | boolean | `false` | スタックトレース内も検索 |
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
uloop get-logs
|
|
140
|
+
uloop get-logs --log-type Error --max-count 10
|
|
141
|
+
uloop get-logs --search-text "NullReference" --include-stack-trace true
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### run-tests
|
|
145
|
+
|
|
146
|
+
Unity Test Runner を実行します。
|
|
147
|
+
|
|
148
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
149
|
+
|--------|------|---------|-------------|
|
|
150
|
+
| `--test-mode` | enum | `EditMode` | テストモード: `EditMode`, `PlayMode` |
|
|
151
|
+
| `--filter-type` | enum | `all` | フィルタタイプ: `all`, `exact`, `regex`, `assembly` |
|
|
152
|
+
| `--filter-value` | string | | フィルタ値(filter-type が `all` 以外の場合に使用) |
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
uloop run-tests
|
|
156
|
+
uloop run-tests --test-mode EditMode --filter-type regex --filter-value "MyTests"
|
|
157
|
+
uloop run-tests --filter-type assembly --filter-value "MyApp.Tests.Editor"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### clear-console
|
|
161
|
+
|
|
162
|
+
Unity コンソールログをクリアします。
|
|
163
|
+
|
|
164
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
165
|
+
|--------|------|---------|-------------|
|
|
166
|
+
| `--add-confirmation-message` | boolean | `true` | クリア後に確認メッセージを追加 |
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
uloop clear-console
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### focus-window
|
|
173
|
+
|
|
174
|
+
Unity Editor ウィンドウを前面に表示します。
|
|
175
|
+
|
|
176
|
+
パラメータなし。
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
uloop focus-window
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### get-hierarchy
|
|
183
|
+
|
|
184
|
+
Unity Hierarchy 構造を取得します。
|
|
185
|
+
|
|
186
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
187
|
+
|--------|------|---------|-------------|
|
|
188
|
+
| `--root-path` | string | | 開始するルート GameObject パス |
|
|
189
|
+
| `--max-depth` | integer | `-1` | 最大深度(-1 で無制限) |
|
|
190
|
+
| `--include-components` | boolean | `true` | コンポーネント情報を含める |
|
|
191
|
+
| `--include-inactive` | boolean | `true` | 非アクティブな GameObject を含める |
|
|
192
|
+
| `--include-paths` | boolean | `false` | パス情報を含める |
|
|
193
|
+
| `--use-components-lut` | string | `auto` | コンポーネント用 LUT の使用: `auto`, `true`, `false` |
|
|
194
|
+
| `--use-selection` | boolean | `false` | 選択中の GameObject をルートとして使用 |
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
uloop get-hierarchy
|
|
198
|
+
uloop get-hierarchy --root-path "Canvas" --max-depth 3
|
|
199
|
+
uloop get-hierarchy --use-selection true
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### unity-search
|
|
203
|
+
|
|
204
|
+
Unity プロジェクトを検索します。
|
|
205
|
+
|
|
206
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
207
|
+
|--------|------|---------|-------------|
|
|
208
|
+
| `--search-query` | string | | 検索クエリ(Unity Search 構文) |
|
|
209
|
+
| `--providers` | array | | 検索プロバイダー(例: `asset`, `scene`, `menu`) |
|
|
210
|
+
| `--max-results` | integer | `50` | 結果の最大数 |
|
|
211
|
+
| `--include-description` | boolean | `true` | 結果に詳細な説明を含める |
|
|
212
|
+
| `--include-metadata` | boolean | `false` | ファイルメタデータ(サイズ、更新日)を含める |
|
|
213
|
+
| `--search-flags` | enum | `Default` | 検索フラグ: `Default`, `Synchronous`, `WantsMore`, `Packages`, `Sorted` |
|
|
214
|
+
| `--save-to-file` | boolean | `false` | 結果をファイルに保存 |
|
|
215
|
+
| `--output-format` | enum | `JSON` | 保存時の出力形式: `JSON`, `CSV`, `TSV` |
|
|
216
|
+
| `--auto-save-threshold` | integer | `100` | 自動保存の閾値(0 で無効化) |
|
|
217
|
+
| `--file-extensions` | array | | ファイル拡張子でフィルタ(例: `cs`, `prefab`, `mat`) |
|
|
218
|
+
| `--asset-types` | array | | アセットタイプでフィルタ(例: `Texture2D`, `GameObject`) |
|
|
219
|
+
| `--path-filter` | string | | パスパターンでフィルタ(ワイルドカード対応) |
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
uloop unity-search --search-query "*.prefab"
|
|
223
|
+
uloop unity-search --search-query "t:Texture2D" --max-results 10
|
|
224
|
+
uloop unity-search --search-query "t:MonoScript *.cs" --save-to-file true
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### get-menu-items
|
|
228
|
+
|
|
229
|
+
Unity MenuItem を取得します。
|
|
230
|
+
|
|
231
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
232
|
+
|--------|------|---------|-------------|
|
|
233
|
+
| `--filter-text` | string | | MenuItem パスのフィルタテキスト |
|
|
234
|
+
| `--filter-type` | enum | `contains` | フィルタタイプ: `contains`, `exact`, `startswith` |
|
|
235
|
+
| `--max-count` | integer | `200` | アイテムの最大数 |
|
|
236
|
+
| `--include-validation` | boolean | `false` | 検証関数を含める |
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
uloop get-menu-items
|
|
240
|
+
uloop get-menu-items --filter-text "GameObject" --filter-type startswith
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### execute-menu-item
|
|
244
|
+
|
|
245
|
+
パスを指定して Unity MenuItem を実行します。
|
|
246
|
+
|
|
247
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
248
|
+
|--------|------|---------|-------------|
|
|
249
|
+
| `--menu-item-path` | string | | メニューアイテムパス(例: "GameObject/Create Empty") |
|
|
250
|
+
| `--use-reflection-fallback` | boolean | `true` | 直接実行が失敗した場合にリフレクションを使用 |
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
uloop execute-menu-item --menu-item-path "File/Save"
|
|
254
|
+
uloop execute-menu-item --menu-item-path "GameObject/Create Empty"
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### find-game-objects
|
|
258
|
+
|
|
259
|
+
検索条件で GameObject を検索します。
|
|
260
|
+
|
|
261
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
262
|
+
|--------|------|---------|-------------|
|
|
263
|
+
| `--name-pattern` | string | | 検索する名前パターン |
|
|
264
|
+
| `--search-mode` | enum | `Exact` | 検索モード: `Exact`, `Path`, `Regex`, `Contains`, `Selected` |
|
|
265
|
+
| `--required-components` | array | | 必須コンポーネントタイプ名 |
|
|
266
|
+
| `--tag` | string | | タグフィルター |
|
|
267
|
+
| `--layer` | integer | | レイヤーフィルター |
|
|
268
|
+
| `--max-results` | integer | `20` | 結果の最大数 |
|
|
269
|
+
| `--include-inactive` | boolean | `false` | 非アクティブな GameObject を含める |
|
|
270
|
+
| `--include-inherited-properties` | boolean | `false` | 継承プロパティを含める |
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
uloop find-game-objects --name-pattern "Player"
|
|
274
|
+
uloop find-game-objects --required-components "Camera" --include-inactive true
|
|
275
|
+
uloop find-game-objects --tag "Enemy" --max-results 50
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### capture-window
|
|
279
|
+
|
|
280
|
+
Unity EditorWindow をキャプチャして PNG として保存します。
|
|
281
|
+
|
|
282
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
283
|
+
|--------|------|---------|-------------|
|
|
284
|
+
| `--window-name` | string | `Game` | ウィンドウ名(例: "Game", "Scene", "Console", "Inspector") |
|
|
285
|
+
| `--resolution-scale` | number | `1` | 解像度スケール(0.1〜1.0) |
|
|
286
|
+
| `--match-mode` | enum | `exact` | マッチングモード: `exact`, `prefix`, `contains`(大文字小文字区別なし) |
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
uloop capture-window
|
|
290
|
+
uloop capture-window --window-name Scene
|
|
291
|
+
uloop capture-window --window-name Project --match-mode prefix
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### execute-dynamic-code
|
|
295
|
+
|
|
296
|
+
Unity Editor 内で C# コードを実行します。
|
|
297
|
+
|
|
298
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
299
|
+
|--------|------|---------|-------------|
|
|
300
|
+
| `--code` | string | | 実行する C# コード |
|
|
301
|
+
| `--parameters` | object | | 実行時パラメータ |
|
|
302
|
+
| `--compile-only` | boolean | `false` | コンパイルのみ(実行はしない) |
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
uloop execute-dynamic-code --code 'using UnityEngine; Debug.Log("Hello!");'
|
|
306
|
+
uloop execute-dynamic-code --code 'Selection.activeGameObject.name' --compile-only true
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### get-provider-details
|
|
310
|
+
|
|
311
|
+
Unity Search プロバイダーの詳細を取得します。
|
|
312
|
+
|
|
313
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
314
|
+
|--------|------|---------|-------------|
|
|
315
|
+
| `--provider-id` | string | | 特定のプロバイダー ID(例: "asset", "scene") |
|
|
316
|
+
| `--active-only` | boolean | `false` | アクティブなプロバイダーのみ |
|
|
317
|
+
| `--include-descriptions` | boolean | `true` | 説明を含める |
|
|
318
|
+
| `--sort-by-priority` | boolean | `true` | 優先度でソート |
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
uloop get-provider-details
|
|
322
|
+
uloop get-provider-details --provider-id asset
|
|
323
|
+
uloop get-provider-details --active-only true
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### control-play-mode
|
|
327
|
+
|
|
328
|
+
Unity Editor のプレイモードを制御します。
|
|
329
|
+
|
|
330
|
+
| フラグ | 型 | デフォルト | 説明 |
|
|
331
|
+
|--------|------|---------|-------------|
|
|
332
|
+
| `--action` | enum | `Play` | アクション: `Play`, `Stop`, `Pause` |
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
uloop control-play-mode --action Play
|
|
336
|
+
uloop control-play-mode --action Stop
|
|
337
|
+
uloop control-play-mode --action Pause
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## シェル補完
|
|
341
|
+
|
|
342
|
+
Bash/Zsh/PowerShell のタブ補完をインストールできます:
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
# シェルを自動検出してインストール
|
|
346
|
+
uloop completion --install
|
|
347
|
+
|
|
348
|
+
# シェルを明示的に指定
|
|
349
|
+
uloop completion --shell bash --install # Git Bash / MINGW64
|
|
350
|
+
uloop completion --shell powershell --install # PowerShell
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
## 動作要件
|
|
354
|
+
|
|
355
|
+
- **Node.js 20.0 以降**
|
|
356
|
+
- **Unity 2022.3 以降**([uLoopMCP](https://github.com/hatayama/uLoopMCP) がインストール済みであること)
|
|
357
|
+
- uLoopMCP サーバーが起動していること(Window > uLoopMCP > Start Server)
|
|
358
|
+
|
|
359
|
+
## リンク
|
|
360
|
+
|
|
361
|
+
- [uLoopMCP リポジトリ](https://github.com/hatayama/uLoopMCP) - メインパッケージとドキュメント
|
|
362
|
+
- [ツールリファレンス](https://github.com/hatayama/uLoopMCP/blob/main/Packages/src/TOOL_REFERENCE.md) - 詳細な API 仕様とレスポンススキーマ
|
|
363
|
+
|
|
364
|
+
## ライセンス
|
|
365
|
+
|
|
366
|
+
MIT License
|