コマンド体系
ほぼすべてのコマンドが同じ形をしています。
redi <resource> <action> [<resource_id>] [options]<resource>—issueprojectwikitime_entrynewsなど、Redmine 側のリソース<action>—listviewcreateupdatedeletecomment<resource_id>— 1件を対象にするアクションで指定するチケット番号などの ID
リソースとアクション
Section titled “リソースとアクション”redi issue list # チケット一覧redi issue view 160 # 1件の詳細redi issue update 160 --status_id 3<resource_id> は特定の1件を対象にするアクション (view / update / delete / comment)
で必要です。
redi <resource> だけを打つと redi <resource> list の意味になります。
redi issue # redi issue list と同じリソースにもアクションにも短縮形があり、日常的に打つコマンドが短く保たれます。
| リソース | i = issue, p = project, te = time_entry, w = wiki, ij = issue_journal, … |
| アクション | l = list, v = view, c = create, u = update, d = delete, co = comment |
redi i l # redi issue listinit / me / relation にエイリアスはありません。
グローバルオプション
Section titled “グローバルオプション”| オプション | |
|---|---|
--profile <name> |
そのコマンドだけ別の Redmine を見る。どの階層でも指定できます |
--format <plain|json> |
出力形式。plain (既定) は人が読む整形出力、json は生の JSON |
--full |
--format json の別名 |
list にはさらに --limit / --offset があり、リソースごとのフィルタも付きます。