t3code-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.
Files changed (74) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +70 -0
  3. package/dist/bin.js +17842 -0
  4. package/dist/index.js +2 -0
  5. package/dist/runtime-DU_hs0MM.js +61631 -0
  6. package/package.json +59 -0
  7. package/src/application/error.ts +4 -0
  8. package/src/application/layer.ts +20 -0
  9. package/src/application/model-selection.ts +109 -0
  10. package/src/application/models.ts +26 -0
  11. package/src/application/project-commands.ts +28 -0
  12. package/src/application/projects.ts +50 -0
  13. package/src/application/service.ts +93 -0
  14. package/src/application/shell-sequence.ts +29 -0
  15. package/src/application/thread-commands.ts +89 -0
  16. package/src/application/thread-wait.ts +86 -0
  17. package/src/application/threads.ts +172 -0
  18. package/src/auth/error.ts +42 -0
  19. package/src/auth/layer.ts +114 -0
  20. package/src/auth/local.ts +241 -0
  21. package/src/auth/pairing.ts +54 -0
  22. package/src/auth/schema.ts +55 -0
  23. package/src/auth/service.ts +16 -0
  24. package/src/auth/transport.ts +132 -0
  25. package/src/auth/type.ts +31 -0
  26. package/src/bin.ts +47 -0
  27. package/src/cli/app.ts +18 -0
  28. package/src/cli/auth-format.ts +43 -0
  29. package/src/cli/auth.ts +99 -0
  30. package/src/cli/error.ts +16 -0
  31. package/src/cli/input/error.ts +11 -0
  32. package/src/cli/input/layer.ts +31 -0
  33. package/src/cli/input/service.ts +11 -0
  34. package/src/cli/message-input.ts +25 -0
  35. package/src/cli/model-format.ts +18 -0
  36. package/src/cli/model-options.ts +56 -0
  37. package/src/cli/models.ts +45 -0
  38. package/src/cli/output/error.ts +11 -0
  39. package/src/cli/output/layer.ts +53 -0
  40. package/src/cli/output/service.ts +15 -0
  41. package/src/cli/output-format.ts +41 -0
  42. package/src/cli/project-format.ts +11 -0
  43. package/src/cli/projects.ts +62 -0
  44. package/src/cli/thread-format.ts +74 -0
  45. package/src/cli/threads/archive.ts +28 -0
  46. package/src/cli/threads/list.ts +29 -0
  47. package/src/cli/threads/messages.ts +36 -0
  48. package/src/cli/threads/send.ts +91 -0
  49. package/src/cli/threads/start.ts +136 -0
  50. package/src/cli/threads/wait.ts +35 -0
  51. package/src/cli/threads.ts +22 -0
  52. package/src/cli/wait-events.ts +112 -0
  53. package/src/config/error.ts +21 -0
  54. package/src/config/layer.ts +103 -0
  55. package/src/config/service.ts +24 -0
  56. package/src/config/url.ts +55 -0
  57. package/src/domain/command-schema.ts +82 -0
  58. package/src/domain/error.ts +46 -0
  59. package/src/domain/helpers.ts +23 -0
  60. package/src/domain/model-config.ts +40 -0
  61. package/src/domain/schema.ts +162 -0
  62. package/src/domain/thread-lifecycle.ts +97 -0
  63. package/src/environment/layer.ts +12 -0
  64. package/src/environment/service.ts +13 -0
  65. package/src/index.ts +18 -0
  66. package/src/orchestration/layer.ts +193 -0
  67. package/src/orchestration/service.ts +39 -0
  68. package/src/protocol/schema.ts +105 -0
  69. package/src/rpc/error.ts +31 -0
  70. package/src/rpc/layer.ts +99 -0
  71. package/src/rpc/service.ts +16 -0
  72. package/src/runtime.ts +28 -0
  73. package/src/version/layer.ts +25 -0
  74. package/src/version/service.ts +8 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tarik02
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # t3code-cli
2
+
3
+ Non-interactive CLI for a t3code server.
4
+
5
+ ## install
6
+
7
+ ```sh
8
+ npm install --global t3code-cli
9
+ ```
10
+
11
+ This installs the `t3cli` command.
12
+
13
+ ## authenticate
14
+
15
+ ```sh
16
+ t3cli auth pair <url>
17
+ t3cli auth local [--base-dir <path>] [--t3-command <command>] [--origin <url>] [--role owner|client] [--label <label>] [--subject <subject>]
18
+ t3cli auth status
19
+ ```
20
+
21
+ Use `auth pair` with a pairing URL from a running t3code server, or `auth local` to authenticate against a local t3code installation.
22
+
23
+ ## projects
24
+
25
+ ```sh
26
+ t3cli projects list
27
+ t3cli projects add <path> [--title <title>]
28
+ ```
29
+
30
+ `projects list` shows known projects. `projects add` registers a project path with the server.
31
+
32
+ ## models
33
+
34
+ ```sh
35
+ t3cli models list [--all] [--provider <provider>]
36
+ ```
37
+
38
+ Lists available provider models. Use `--all` to include hidden or unavailable entries when the server exposes them.
39
+
40
+ ## threads
41
+
42
+ ```sh
43
+ t3cli threads list <project>
44
+ t3cli threads start <project> [message] [--stdin] [--title <title>] [--worktree <path>] [--provider <provider>] [--model <model>] [--option <key=value>] [--reasoning-effort <value>] [--effort <value>] [--fast-mode] [--thinking] [--wait]
45
+ t3cli threads send <thread> [message] [--stdin] [--option <key=value>] [--reasoning-effort <value>] [--effort <value>] [--fast-mode] [--thinking] [--wait]
46
+ t3cli threads messages <thread> [--limit <count>] [--full]
47
+ t3cli threads wait <thread>
48
+ t3cli threads archive <thread>
49
+ ```
50
+
51
+ Use `--stdin` when the message should be read from standard input instead of an argument. Use `--wait` to stream until the thread pauses.
52
+
53
+ ## output
54
+
55
+ Most commands support:
56
+
57
+ ```sh
58
+ --format auto|human|json
59
+ ```
60
+
61
+ Thread start/send commands also support `--format ndjson`; `threads wait` supports `--format human|ndjson`.
62
+
63
+ Global flags:
64
+
65
+ ```sh
66
+ --help
67
+ --version
68
+ --completions bash|zsh|fish|sh
69
+ --log-level all|trace|debug|info|warn|warning|error|fatal|none
70
+ ```