@todoforai/cli 0.1.62 → 0.1.64
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 +28 -32
- package/dist/todoforai-cli.js +899 -149
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -1,36 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TODOforAI CLI (`tfa-cli`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Create and manage [TODOforAI](https://todofor.ai) tasks from your terminal.
|
|
4
4
|
|
|
5
|
-
## Install
|
|
5
|
+
## Install and run
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Requires Node.js 20+.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install -g @todoforai/cli
|
|
11
|
-
|
|
12
|
-
# Install the native bridge once, if it is not already on PATH:
|
|
13
|
-
curl -fsSL https://raw.githubusercontent.com/todoforai/bridge/main/install.sh | sh
|
|
10
|
+
npm install -g @todoforai/cli
|
|
11
|
+
tfa-cli "Fix the login bug"
|
|
14
12
|
```
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
`todoforai-cli` is an alias for `tfa-cli`.
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
todoforai-cli # prompts device login if no key found
|
|
22
|
-
todoforai-cli login # explicit login
|
|
23
|
-
```
|
|
16
|
+
## Configuration
|
|
24
17
|
|
|
25
18
|
API URL resolution: `--api-url` flag → `TODOFORAI_API_URL` env → `https://api.todofor.ai`.
|
|
26
19
|
|
|
27
|
-
Auth resolution: `--api-key` flag →
|
|
20
|
+
Auth resolution: `--api-key` flag → shared-device run token → shared credentials file → `TODOFORAI_API_TOKEN` env → device login.
|
|
28
21
|
|
|
29
22
|
Project, agent, and last-todo state are stored **per API URL** under `per_api_url[<url>]` in the config — switching between e.g. `https://api.todofor.ai` and `http://localhost:4000` keeps each environment's defaults isolated. Legacy top-level fields are auto-migrated on first run.
|
|
30
23
|
|
|
31
24
|
## Bridge
|
|
32
25
|
|
|
33
|
-
|
|
26
|
+
Installed automatically on Linux and macOS.
|
|
27
|
+
|
|
28
|
+
The CLI talks to the backend over WebSocket; **shell execution, file I/O, and tool calls happen in the bridge** running locally. On create/resume/template runs, `tfa-cli` starts a detached `todoforai-bridge` process if needed (the bridge enforces its own single-instance lock, logs at `~/.todoforai/bridge.log`). If bridge credentials are missing, the CLI runs `todoforai-bridge login` in the foreground first so you can see and approve the device-login URL. The bridge keeps running after the CLI exits, so long-running tasks survive `Ctrl+D`.
|
|
34
29
|
|
|
35
30
|
Disable with `--no-bridge` if you manage the bridge yourself (e.g. systemd, separate terminal). `--no-edge` remains supported as a deprecated alias.
|
|
36
31
|
|
|
@@ -39,18 +34,17 @@ Disable with `--no-bridge` if you manage the bridge yourself (e.g. systemd, sepa
|
|
|
39
34
|
### Create a todo from a prompt
|
|
40
35
|
|
|
41
36
|
```bash
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
todoforai-cli --path /my/project "Fix bug" # explicit workspace
|
|
37
|
+
tfa-cli -n "Quick task" # non-interactive (run and exit)
|
|
38
|
+
echo "content" | tfa-cli # pipe from stdin
|
|
39
|
+
tfa-cli --path /my/project "Fix bug" # explicit workspace
|
|
46
40
|
```
|
|
47
41
|
|
|
48
42
|
### Start from a registry template
|
|
49
43
|
|
|
50
44
|
```bash
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
tfa-cli --template alternativeto-listing # interactive input prompts
|
|
46
|
+
tfa-cli --template f5bot-monitoring-setup --input "monitoring_details=My Brand" # with inputs
|
|
47
|
+
tfa-cli --template f5bot-monitoring-setup --no-watch --json # create only
|
|
54
48
|
```
|
|
55
49
|
|
|
56
50
|
When inputs are missing, the CLI prompts interactively (unless `-n`).
|
|
@@ -58,7 +52,7 @@ When inputs are missing, the CLI prompts interactively (unless `-n`).
|
|
|
58
52
|
### Inspect a todo (read-only)
|
|
59
53
|
|
|
60
54
|
```bash
|
|
61
|
-
|
|
55
|
+
tfa-cli --inspect <todo-id>
|
|
62
56
|
```
|
|
63
57
|
|
|
64
58
|
Prints the full chat log: messages, tool calls (type, status, path/cmd), results, and errors. No logo, no interactive mode.
|
|
@@ -66,8 +60,8 @@ Prints the full chat log: messages, tool calls (type, status, path/cmd), results
|
|
|
66
60
|
### Resume / continue
|
|
67
61
|
|
|
68
62
|
```bash
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
tfa-cli -c # continue most recent todo
|
|
64
|
+
tfa-cli --resume <todo-id> # resume specific todo
|
|
71
65
|
```
|
|
72
66
|
|
|
73
67
|
### Notifications
|
|
@@ -77,20 +71,22 @@ tfa-cli inbox # the bell: newest across all tabs
|
|
|
77
71
|
tfa-cli inbox messages --unread # one filter: needs-you | messages | activity
|
|
78
72
|
tfa-cli inbox seen # mark everything read
|
|
79
73
|
tfa-cli notify "Deploy done" "v2 is live" --href /t/<todo-id> # note to YOUR user (Messages tab + phone push)
|
|
74
|
+
tfa-cli project members # who can be notified
|
|
75
|
+
tfa-cli notify --to anna@x.com "Review?" "PR is ready" --href /t/<todo-id> # note to ONE project member
|
|
80
76
|
```
|
|
81
77
|
|
|
82
|
-
`notify`
|
|
78
|
+
`notify` goes to your own user by default. `--to <email>` reaches one member of the current project (`--project <id>`, `$TODOFORAI_PROJECT_ID` or the default project); non-members are refused (404). It is shown as from you (or your agent). There is no broadcast / "all members" flag, so loop over `project members` to reach the whole team. `--subject` sets the dedupe key (the same text is delivered once), `--href` must be an in-app path. Caps: 10 new notes/day to yourself, 20/day to teammates.
|
|
83
79
|
|
|
84
80
|
## IDE integration (ACP)
|
|
85
81
|
|
|
86
|
-
`
|
|
82
|
+
`tfa-cli acp` speaks the [Agent Client Protocol](https://agentclientprotocol.com) over stdio, so any ACP-capable editor can drive your agent: prompts from the editor chat, file edits as native diffs, permission prompts inline, and shell commands running on your machine through the bridge. One ACP thread = one todo. To log in explicitly, run `tfa-cli login`; `--isolated` / `--user-id` are not supported in this mode.
|
|
87
83
|
|
|
88
84
|
**Zed** — `~/.config/zed/settings.json`:
|
|
89
85
|
|
|
90
86
|
```json
|
|
91
87
|
{
|
|
92
88
|
"agent_servers": {
|
|
93
|
-
"TODOforAI": { "type": "custom", "command": "
|
|
89
|
+
"TODOforAI": { "type": "custom", "command": "tfa-cli", "args": ["acp"] }
|
|
94
90
|
}
|
|
95
91
|
}
|
|
96
92
|
```
|
|
@@ -102,7 +98,7 @@ Then open the Agent panel → `+` → **TODOforAI**.
|
|
|
102
98
|
```json
|
|
103
99
|
{
|
|
104
100
|
"agent_servers": {
|
|
105
|
-
"TODOforAI": { "command": "
|
|
101
|
+
"TODOforAI": { "command": "tfa-cli", "args": ["acp"] }
|
|
106
102
|
}
|
|
107
103
|
}
|
|
108
104
|
```
|
|
@@ -111,7 +107,7 @@ Pick **TODOforAI** from the agent dropdown in AI Chat.
|
|
|
111
107
|
|
|
112
108
|
**VS Code** — no built-in ACP client yet; install a community ACP client extension (e.g. [`strato-space.acp-plugin`](https://marketplace.visualstudio.com/items?itemName=strato-space.acp-plugin)) and add the same `agent_servers` entry to `settings.json`.
|
|
113
109
|
|
|
114
|
-
No global install needed — `"command": "npx", "args": ["-y", "@todoforai/cli", "acp"]` works in every host above. `--agent`, `--project` and `--api-url` apply to `acp` as well (e.g. `"args": ["acp", "--agent", "backend"]`). If `
|
|
110
|
+
No global install needed — `"command": "npx", "args": ["-y", "@todoforai/cli", "acp"]` works in every host above. `--agent`, `--project` and `--api-url` apply to `acp` as well (e.g. `"args": ["acp", "--agent", "backend"]`). If `tfa-cli` is not on the editor's `PATH`, use its absolute path (`which tfa-cli`). Your agent settings show up in the host's mode picker, so you can switch agents per session without touching the config.
|
|
115
111
|
|
|
116
112
|
## All Options
|
|
117
113
|
|