@acomo/cli 1.0.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 ADDED
@@ -0,0 +1,220 @@
1
+ # @acomo/cli
2
+
3
+ acomo ワークフロー管理プラットフォームの公式 CLI ツールです。
4
+
5
+ ## 📦 インストール
6
+
7
+ ```bash
8
+ npm install -g @acomo/cli
9
+ ```
10
+
11
+ ## 🚀 クイックスタート
12
+
13
+ ### 1. ログイン
14
+
15
+ ```bash
16
+ # アクセストークンでログイン(推奨)
17
+ acomo login --tenant-id <your-tenant-id> --token <your-access-token>
18
+
19
+ # または、メール/パスワードでログイン
20
+ acomo login --tenant-id <your-tenant-id>
21
+ ```
22
+
23
+ ### 2. API を呼び出す
24
+
25
+ ```bash
26
+ # 現在のユーザー情報を取得
27
+ acomo getCurrentUser
28
+
29
+ # ワークフローモデル一覧を取得
30
+ acomo listWorkflowModels
31
+
32
+ # JSON パラメータを指定して呼び出す
33
+ acomo listWorkflowModels '{"filter":"published","take":10}'
34
+ ```
35
+
36
+ ## 📖 使い方
37
+
38
+ ### ログイン
39
+
40
+ #### アクセストークンでログイン
41
+
42
+ ```bash
43
+ acomo login --tenant-id <tenant-id> --token <access-token>
44
+ ```
45
+
46
+ Web 画面などで取得したアクセストークンを直接指定できます。
47
+
48
+ #### メール/パスワードでログイン
49
+
50
+ ```bash
51
+ # オプション指定
52
+ acomo login --tenant-id <tenant-id> --email user@example.com --password pass123
53
+
54
+ # インタラクティブ入力
55
+ acomo login --tenant-id <tenant-id>
56
+ ```
57
+
58
+ #### カスタム URL を指定
59
+
60
+ ```bash
61
+ acomo login --url https://custom.acomo.app --tenant-id <tenant-id> --token <token>
62
+ ```
63
+
64
+ ### API 呼び出し
65
+
66
+ 全ての acomo API がコマンドとして利用可能です。
67
+
68
+ #### 基本的な使い方
69
+
70
+ ```bash
71
+ acomo <operationId> [JSON引数]
72
+ ```
73
+
74
+ #### 引数なしの API
75
+
76
+ ```bash
77
+ acomo getCurrentUser
78
+ acomo getCurrentTenant
79
+ acomo getAccount
80
+ ```
81
+
82
+ #### JSON 引数を渡す
83
+
84
+ ```bash
85
+ # コマンドライン引数として渡す
86
+ acomo getWorkflowModel '{"modelId":"wf_xxx"}'
87
+
88
+ # stdin から渡す
89
+ echo '{"modelId":"wf_xxx"}' | acomo getWorkflowModel
90
+
91
+ # ファイルから渡す
92
+ acomo createWorkflowModel < model-data.json
93
+ ```
94
+
95
+ ### 出力フォーマット
96
+
97
+ ```bash
98
+ # JSON 形式(デフォルト、整形済み)
99
+ acomo listWorkflowModels
100
+
101
+ # compact 形式(1行、パイプ処理に便利)
102
+ acomo listWorkflowModels --format compact
103
+
104
+ # jq と組み合わせる
105
+ acomo listWorkflowModels --format compact | jq '.[0].id'
106
+ ```
107
+
108
+ ### 設定管理
109
+
110
+ ```bash
111
+ # 現在の設定を表示(トークンはマスク表示)
112
+ acomo config show
113
+
114
+ # 設定を更新
115
+ acomo config set baseUrl https://custom.acomo.app
116
+
117
+ # ログアウト(設定をクリア)
118
+ acomo logout
119
+ ```
120
+
121
+ ## 🎯 主要なコマンド例
122
+
123
+ ### ワークフローモデル
124
+
125
+ ```bash
126
+ # モデル一覧を取得
127
+ acomo listWorkflowModels
128
+
129
+ # フィルタ付きで取得
130
+ acomo listWorkflowModels '{"filter":"published","take":10}'
131
+
132
+ # 特定のモデルを取得
133
+ acomo getWorkflowModel '{"modelId":"wf_xxx"}'
134
+
135
+ # モデルを作成
136
+ acomo createWorkflowModel '{"body":{"name":"新しいワークフロー","description":"説明"}}'
137
+
138
+ # モデルを削除
139
+ acomo deleteWorkflowModel '{"modelId":"wf_xxx"}'
140
+ ```
141
+
142
+ ### ワークフロープロセス
143
+
144
+ ```bash
145
+ # プロセス一覧を取得
146
+ acomo listWorkflowProcesses
147
+
148
+ # フィルタ付きで取得
149
+ acomo listWorkflowProcesses '{"filter":"running","take":20}'
150
+
151
+ # 特定のプロセスを取得
152
+ acomo getWorkflowProcess '{"processId":"proc_xxx"}'
153
+
154
+ # プロセス履歴を取得
155
+ acomo listWorkflowProcessHistories '{"processId":"proc_xxx"}'
156
+ ```
157
+
158
+ ### プロフィール・アカウント
159
+
160
+ ```bash
161
+ # 現在のユーザー情報
162
+ acomo getCurrentUser
163
+
164
+ # 現在のテナント情報
165
+ acomo getCurrentTenant
166
+
167
+ # アカウント情報
168
+ acomo getAccount
169
+
170
+ # 組織情報
171
+ acomo getMyOrganization
172
+ ```
173
+
174
+ ## ⚙️ 設定ファイル
175
+
176
+ 設定は `~/.acomo/config.json` に保存されます。
177
+
178
+ ```json
179
+ {
180
+ "baseUrl": "https://acomo.app",
181
+ "tenantId": "your-tenant-id",
182
+ "accessToken": "your-access-token",
183
+ "email": "user@example.com"
184
+ }
185
+ ```
186
+
187
+ ファイルのパーミッションは `0600` に設定され、本人のみがアクセス可能です。
188
+
189
+ ## 🔧 開発者向け
190
+
191
+ ### ビルド
192
+
193
+ ```bash
194
+ npm run build
195
+ ```
196
+
197
+ ### 開発モード
198
+
199
+ ```bash
200
+ npm run dev
201
+ ```
202
+
203
+ ### クリーンビルド
204
+
205
+ ```bash
206
+ npm run clean && npm run build
207
+ ```
208
+
209
+ ## 📝 ライセンス
210
+
211
+ ISC
212
+
213
+ ## 🔗 関連リンク
214
+
215
+ - [acomo 公式サイト](https://acomo.app)
216
+ - [@acomo/client NPM パッケージ](https://www.npmjs.com/package/@acomo/client)
217
+
218
+ ## 🤝 サポート
219
+
220
+ 質問や問題がある場合は、[GitHub Issues](https://github.com/progress-all/acomo/issues) でお知らせください。
package/bin/acomo ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../dist/index.js');