t3code-cli 0.8.0 → 0.9.1

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.
Files changed (60) hide show
  1. package/README.md +90 -35
  2. package/dist/application.js +1 -1
  3. package/dist/auth.js +1 -2
  4. package/dist/bin.js +190 -45
  5. package/dist/cli.js +1 -1
  6. package/dist/config.js +1 -3
  7. package/dist/connection.js +1 -4
  8. package/dist/index.js +1 -4
  9. package/dist/layout.js +1 -1
  10. package/dist/orchestration.js +1 -1
  11. package/dist/rpc.js +1 -1
  12. package/dist/runtime.js +1 -2
  13. package/dist/scope.js +1 -1
  14. package/dist/shared.js +85492 -0
  15. package/dist/src/application/layer.d.ts +25 -2
  16. package/dist/src/application/projects.d.ts +1 -1
  17. package/dist/src/application/service.d.ts +21 -1
  18. package/dist/src/application/thread-commands.d.ts +27 -1
  19. package/dist/src/application/threads.d.ts +50 -1
  20. package/dist/src/domain/thread-activities.d.ts +14 -0
  21. package/dist/src/domain/thread-lifecycle.d.ts +1 -0
  22. package/dist/src/runtime/layer.d.ts +1 -1
  23. package/dist/t3tools.js +1 -1
  24. package/package.json +1 -1
  25. package/src/application/service.ts +19 -0
  26. package/src/application/thread-commands.ts +45 -0
  27. package/src/application/threads.ts +85 -0
  28. package/src/cli/error.ts +15 -0
  29. package/src/cli/message-input.ts +30 -0
  30. package/src/cli/thread-format.ts +47 -0
  31. package/src/cli/thread.ts +6 -0
  32. package/src/cli/threads/approve.ts +61 -0
  33. package/src/cli/threads/archive.ts +18 -3
  34. package/src/cli/threads/callback.ts +1 -2
  35. package/src/cli/threads/respond.ts +70 -0
  36. package/src/cli/threads/show.ts +43 -0
  37. package/src/domain/thread-activities.test.ts +321 -0
  38. package/src/domain/thread-activities.ts +244 -0
  39. package/src/domain/thread-lifecycle.ts +2 -0
  40. package/dist/Context-DueQ9iMH.js +0 -4916
  41. package/dist/Path-D8WPdPwR.js +0 -11406
  42. package/dist/Schema-DsQxYh6_.js +0 -13581
  43. package/dist/UrlParams-BA6gBvaY.js +0 -205
  44. package/dist/base-dir-R12OMDso.js +0 -20
  45. package/dist/error-BHRnjLux.js +0 -15
  46. package/dist/error-ChTsLQTu.js +0 -169
  47. package/dist/error-CjADNVm8.js +0 -54
  48. package/dist/flags-CM7_iGdA.js +0 -13371
  49. package/dist/layer-CMo36MrX.js +0 -29466
  50. package/dist/layer-DHhKS5jd.js +0 -13
  51. package/dist/layer-DUv99vsS.js +0 -72
  52. package/dist/layer-Do8wK1t6.js +0 -1508
  53. package/dist/layer-DwI3Skkh.js +0 -1223
  54. package/dist/scope-GycYiJ54.js +0 -29
  55. package/dist/service-CLmRO2Dp.js +0 -8
  56. package/dist/service-ybOWV9pL.js +0 -5
  57. package/dist/src-aiFPmAG7.js +0 -9030
  58. package/dist/transport-MI0Z3d2T.js +0 -539
  59. package/dist/url-SlsaG8nY.js +0 -165
  60. /package/dist/{chunk-B5meny8j.js → rolldown-runtime.js} +0 -0
package/README.md CHANGED
@@ -1,72 +1,109 @@
1
1
  # t3code-cli
2
2
 
3
- Non-interactive CLI for a t3code server.
3
+ Non-interactive CLI for [t3code](https://t3code.dev) — manage projects, models, and agent threads from the terminal.
4
4
 
5
- ## install
5
+ ## Installation
6
6
 
7
7
  ```sh
8
8
  npm install --global t3code-cli
9
9
  ```
10
10
 
11
- This installs the `t3cli` command.
11
+ This installs the `t3cli` command globally.
12
12
 
13
- ## agent skill
13
+ ## Quick Start
14
+
15
+ ```sh
16
+ # Authenticate
17
+ t3cli auth pair --url <pairing-url> [--local]
18
+
19
+ # Or use local auth
20
+ t3cli auth local
21
+
22
+ # Check status
23
+ t3cli auth status
24
+
25
+ # List projects
26
+ t3cli project list
27
+
28
+ # Start a thread
29
+ t3cli thread start "Implement a new feature" --wait
30
+ ```
31
+
32
+ ## Agent Skill
14
33
 
15
34
  This repo includes an agent skill for operating `t3cli`: [`skills/t3code-cli/SKILL.md`](skills/t3code-cli/SKILL.md).
16
35
 
17
- Install it with [skills](https://skills.sh/):
36
+ Install it with:
18
37
 
19
38
  ```sh
20
39
  npx skills add tarik02/t3cli
21
40
  ```
22
41
 
23
- ## authenticate
42
+ ## Authentication
24
43
 
25
44
  ```sh
26
- t3cli auth pair --url <url> [--local]
27
- t3cli auth local [--base-dir <path>] [--origin <url>] [--role owner|client] [--label <label>] [--subject <subject>]
28
- t3cli auth status
45
+ t3cli auth pair --url <url> [--local] # Pair with a remote server
46
+ t3cli auth local # Local t3code installation
47
+ t3cli auth status # Check current auth
29
48
  ```
30
49
 
31
- Use `auth pair` with a pairing URL from a running t3code server, or `auth local` to authenticate against a local t3code installation. Local auth (`auth local` or `auth pair --local`) enables automatic project resolution from the current directory.
50
+ - Use `auth pair` with a pairing URL from a running t3code server
51
+ - Use `auth local` to authenticate against a local t3code installation
52
+ - Local auth enables automatic project resolution from the current directory
32
53
 
33
- ## project
54
+ ## Project Management
34
55
 
35
56
  ```sh
36
- t3cli project list
57
+ t3cli project list # List known projects
37
58
  t3cli project add [--path <path>] [--title <title>]
38
59
  ```
39
60
 
40
- `project list` shows known projects. `project add` registers a project path with the server. `--path` defaults to the current directory.
61
+ The `--path` defaults to the current directory.
41
62
 
42
- ## model
63
+ ## Models
43
64
 
44
65
  ```sh
45
66
  t3cli model list [--all] [--provider <provider>]
46
67
  ```
47
68
 
48
- Lists available provider models. Use `--all` to include hidden or unavailable entries when the server exposes them.
69
+ Lists available provider models. Use `--all` to include hidden or unavailable entries.
49
70
 
50
- ## thread
71
+ ## Thread Management
72
+
73
+ ### Starting Threads
51
74
 
52
75
  ```sh
53
- t3cli thread list [--project <ref>]
54
- t3cli thread start [message] [--project <ref>] [--stdin] [--title <title>] [--worktree <path>] [--provider <provider>] [--model <model>] [--option <key=value>] [--reasoning-effort <value>] [--effort <value>] [--fast-mode] [--thinking] [--wait]
55
- t3cli thread send [--thread <id>] [message] [--stdin] [--option <key=value>] [--reasoning-effort <value>] [--effort <value>] [--fast-mode] [--thinking] [--wait]
56
- t3cli thread messages [--thread <id>] [--limit <count>] [--full]
57
- t3cli thread wait [--thread <id>]
58
- t3cli thread archive [--thread <id>]
76
+ t3cli thread start [message]
77
+ [--project <ref>]
78
+ [--stdin]
79
+ [--title <title>]
80
+ [--worktree <path>]
81
+ [--provider <provider>]
82
+ [--model <model>]
83
+ [--option <key=value>]
84
+ [--reasoning-effort <value>]
85
+ [--effort <value>]
86
+ [--fast-mode]
87
+ [--thinking]
88
+ [--wait]
59
89
  ```
60
90
 
61
- `--project` accepts a project id or path. When omitted, the CLI resolves the project from the current directory only for local auth (`auth local` or `auth pair --local`). Resolution checks a registered `workspaceRoot`, paths under it, and known thread `worktreePath` values from the server snapshot. Remote pairings require an explicit `--project` or `T3CODE_PROJECT_*` env var. `thread start` infers the worktree from cwd unless `--worktree` or `T3CODE_WORKTREE_PATH` is set.
62
-
63
- Thread-targeting commands accept `--thread` or fall back to `T3CODE_THREAD_ID`.
91
+ ### Thread Commands
64
92
 
65
- Use `--stdin` when the message should be read from standard input instead of an argument. Use `--wait` to stream until the thread pauses.
93
+ ```sh
94
+ t3cli thread list [--project <ref>] # List threads
95
+ t3cli thread show [--thread <id>] # Show thread details
96
+ t3cli thread send [--thread <id>] [message] # Send message to thread
97
+ t3cli thread messages [--thread <id>] [--limit] # View messages
98
+ t3cli thread wait [--thread <id>] # Wait for completion
99
+ t3cli thread archive [--thread <id>] # Archive thread
100
+ t3cli thread approve --request <id> # Approve request
101
+ t3cli thread respond --request <id> # Respond to request
102
+ ```
66
103
 
67
- ## environment fallbacks
104
+ ### Environment Variables
68
105
 
69
- When flags are omitted, the CLI reads these variables (first match wins within each group):
106
+ When flags are omitted, the CLI reads these environment variables (first match wins):
70
107
 
71
108
  | Variable | Used by |
72
109
  | ---------------------- | ----------------------------------------- |
@@ -75,7 +112,14 @@ When flags are omitted, the CLI reads these variables (first match wins within e
75
112
  | `T3CODE_WORKTREE_PATH` | `--worktree` |
76
113
  | `T3CODE_THREAD_ID` | `--thread` |
77
114
 
78
- ## output
115
+ ### Project Resolution
116
+
117
+ - `--project` accepts a project id or path
118
+ - When omitted, the CLI resolves the project from the current directory (local auth only)
119
+ - Resolution checks: registered `workspaceRoot` → paths under it → known thread `worktreePath`
120
+ - Remote pairings require explicit `--project` or `T3CODE_PROJECT_*` env var
121
+
122
+ ## Output Formats
79
123
 
80
124
  Most commands support:
81
125
 
@@ -83,13 +127,24 @@ Most commands support:
83
127
  --format auto|human|json
84
128
  ```
85
129
 
86
- Thread start/send commands also support `--format ndjson`; `thread wait` supports `--format human|ndjson`.
130
+ Thread commands also support `ndjson` for streaming:
87
131
 
88
- Global flags:
132
+ ```sh
133
+ t3cli thread start "task" --format ndjson --wait
134
+ t3cli thread wait --format ndjson
135
+ ```
136
+
137
+ ## Global Flags
89
138
 
90
139
  ```sh
91
- --help
92
- --version
93
- --completions bash|zsh|fish|sh
94
- --log-level all|trace|debug|info|warn|warning|error|fatal|none
140
+ --help # Show help
141
+ --version # Show version
142
+ --completions <shell> # Generate shell completions (bash|zsh|fish|sh)
143
+ --log-level <level> # Set log level
95
144
  ```
145
+
146
+ ## Links
147
+
148
+ - [Agent Skill Documentation](skills/t3code-cli/SKILL.md)
149
+ - [Command Reference](skills/t3code-cli/reference/commands.md)
150
+ - [Setup Guide](skills/t3code-cli/reference/setup.md)
@@ -1,2 +1,2 @@
1
- import { t as T3Application } from "./service-ybOWV9pL.js";
1
+ import { Nd as T3Application } from "./shared.js";
2
2
  export { T3Application };
package/dist/auth.js CHANGED
@@ -1,3 +1,2 @@
1
- import { a as makeT3AuthPairing, b as makeT3LocalAuthOrigin, c as T3LocalAuthLive, d as T3LocalAuthTokenLive, f as makeT3LocalAuthToken, i as T3AuthPairingLive, l as makeT3LocalAuth, n as makeT3Auth, o as parsePairingUrl, r as T3AuthPairing, s as T3LocalAuth, t as T3AuthLive, u as T3LocalAuthToken, v as T3LocalAuthOrigin, x as T3Auth, y as T3LocalAuthOriginLive } from "./layer-Do8wK1t6.js";
2
- import { a as AuthLocalSigningError, i as AuthLocalSecretError, n as AuthLocalDatabaseError, o as AuthPairingUrlError, r as AuthLocalError, s as AuthTransportError, t as AuthConfigError } from "./error-CjADNVm8.js";
1
+ import { A as T3LocalAuthOriginLive, B as AuthLocalSigningError, C as T3LocalAuth, D as T3LocalAuthTokenLive, E as T3LocalAuthToken, H as AuthTransportError, I as AuthConfigError, Kd as T3Auth, L as AuthLocalDatabaseError, O as makeT3LocalAuthToken, R as AuthLocalError, T as makeT3LocalAuth, V as AuthPairingUrlError, _ as makeT3Auth, b as makeT3AuthPairing, g as T3AuthLive, j as makeT3LocalAuthOrigin, k as T3LocalAuthOrigin, v as T3AuthPairing, w as T3LocalAuthLive, x as parsePairingUrl, y as T3AuthPairingLive, z as AuthLocalSecretError } from "./shared.js";
3
2
  export { AuthConfigError, AuthLocalDatabaseError, AuthLocalError, AuthLocalSecretError, AuthLocalSigningError, AuthPairingUrlError, AuthTransportError, T3Auth, T3AuthLive, T3AuthPairing, T3AuthPairingLive, T3LocalAuth, T3LocalAuthLive, T3LocalAuthOrigin, T3LocalAuthOriginLive, T3LocalAuthToken, T3LocalAuthTokenLive, makeT3Auth, makeT3AuthPairing, makeT3LocalAuth, makeT3LocalAuthOrigin, makeT3LocalAuthToken, parsePairingUrl };