@arrhq/crate-cli 0.1.0
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 +34 -0
- package/bin/crate.mjs +13 -0
- package/package.json +22 -0
- package/src/cli.mjs +1473 -0
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @arrhq/crate-cli
|
|
2
|
+
|
|
3
|
+
Crate MCP をCLIで操作するための公開向けクライアントです。
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i -g @arrhq/crate-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Configure
|
|
12
|
+
|
|
13
|
+
以下のいずれかで接続情報を設定します。
|
|
14
|
+
|
|
15
|
+
- `CRATE_MCP_URL` / `CRATE_MCP_INGEST_TOKEN`
|
|
16
|
+
- `~/.codex/config.toml` の `mcp_servers` 設定
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
crate tool list
|
|
22
|
+
crate tool call --name list_project_tasks --args-json '{"status":"open","limit":20}'
|
|
23
|
+
crate tasks list --status in_progress --limit 50
|
|
24
|
+
crate tasks create --title "設計task" --description "詳細設計"
|
|
25
|
+
crate tasks update --task-id <task_uuid> --status in_progress
|
|
26
|
+
crate checkpoint status --client-event-id <checkpoint_uuid>
|
|
27
|
+
crate tasks close --task-id <task_uuid> --client-event-id <checkpoint_uuid>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Release flow
|
|
31
|
+
|
|
32
|
+
1. CLIの変更PRで `.changeset/*.md` を追加する(`pnpm changeset`)。
|
|
33
|
+
2. `main` へのマージ後、GitHub Actions `Crate CLI Release` が Release PR を作成する。
|
|
34
|
+
3. Release PR をマージすると npm publish が実行される(Trusted Publisher/OIDC 前提)。
|
package/bin/crate.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { runCrateCli } from "../src/cli.mjs";
|
|
4
|
+
|
|
5
|
+
runCrateCli()
|
|
6
|
+
.then((code) => {
|
|
7
|
+
process.exitCode = code;
|
|
8
|
+
})
|
|
9
|
+
.catch((error) => {
|
|
10
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
11
|
+
console.error(`crate-cli failed: ${message}`);
|
|
12
|
+
process.exitCode = 1;
|
|
13
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@arrhq/crate-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Crate MCP CLI for fine-grained task/checkpoint/tool operations",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"bin": {
|
|
8
|
+
"crate": "./bin/crate.mjs"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"src",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"crate": "node ./bin/crate.mjs",
|
|
17
|
+
"test": "node --test ../../scripts/__tests__/crate-cli.test.mjs"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20"
|
|
21
|
+
}
|
|
22
|
+
}
|