@meistrari/tela-cli 0.6.0 → 0.7.4

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 (59) hide show
  1. package/README.md +56 -106
  2. package/dist/commands/auth.d.ts +2 -0
  3. package/dist/commands/context.d.ts +2 -0
  4. package/dist/commands/doctor-auth.d.ts +2 -0
  5. package/dist/commands/env.d.ts +2 -0
  6. package/dist/credentials.d.ts +2 -0
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.js +7027 -0
  9. package/dist/output.d.ts +13 -0
  10. package/dist/program.d.ts +2 -0
  11. package/package.json +17 -24
  12. package/scripts/install-skills.cjs +127 -0
  13. package/skills/tela-cli/SKILL.md +20 -0
  14. package/skills/tela-cli/references/agent.md +111 -0
  15. package/cli.ts +0 -25
  16. package/postinstall.sh +0 -19
  17. package/src/agent-api.ts +0 -300
  18. package/src/assets.d.ts +0 -4
  19. package/src/auth.ts +0 -432
  20. package/src/claude.ts +0 -101
  21. package/src/commands/doctor.ts +0 -35
  22. package/src/commands/feedback.ts +0 -701
  23. package/src/commands/metadata.ts +0 -242
  24. package/src/commands/push.ts +0 -208
  25. package/src/commands/run.ts +0 -1699
  26. package/src/commands/status.ts +0 -109
  27. package/src/commands/sync.ts +0 -245
  28. package/src/commit-message.ts +0 -69
  29. package/src/config.ts +0 -799
  30. package/src/diagnostics.ts +0 -813
  31. package/src/errors.ts +0 -122
  32. package/src/forgejo.ts +0 -233
  33. package/src/git.ts +0 -457
  34. package/src/ink/assets/160092__jorickhoofd__dog-bark-1.mp3 +0 -0
  35. package/src/ink/bark.tsx +0 -240
  36. package/src/ink/components.tsx +0 -177
  37. package/src/ink/runtime.tsx +0 -89
  38. package/src/ink/screens/feedback-screen.tsx +0 -394
  39. package/src/ink/screens/push-screen.tsx +0 -231
  40. package/src/ink/screens/run-screen.tsx +0 -291
  41. package/src/ink/screens/setup/breadcrumb.tsx +0 -23
  42. package/src/ink/screens/setup/setup-screen.tsx +0 -611
  43. package/src/ink/screens/setup/step-frame.tsx +0 -30
  44. package/src/ink/screens/setup/steps/done-step.tsx +0 -28
  45. package/src/ink/screens/setup/steps/environment-step.tsx +0 -22
  46. package/src/ink/screens/setup/steps/organization-step.tsx +0 -34
  47. package/src/ink/screens/setup/steps/review-step.tsx +0 -77
  48. package/src/ink/screens/setup/steps/running-step.tsx +0 -36
  49. package/src/ink/screens/setup/steps/ssh-key-step.tsx +0 -47
  50. package/src/ink/screens/setup/steps/text-field-step.tsx +0 -17
  51. package/src/ink/screens/setup/steps.ts +0 -156
  52. package/src/ink/screens/setup/types.ts +0 -65
  53. package/src/ink/screens/sync-screen.tsx +0 -282
  54. package/src/process.ts +0 -251
  55. package/src/program.ts +0 -2105
  56. package/src/runtime.ts +0 -147
  57. package/src/types.ts +0 -165
  58. package/src/ui.ts +0 -295
  59. package/src/version.ts +0 -3
package/README.md CHANGED
@@ -1,129 +1,79 @@
1
1
  # Tela CLI
2
2
 
3
- Tela CLI is a one-shot terminal tool for syncing Tela repositories, running local agents, preparing pushes, and applying commit feedback with Claude.
3
+ `@meistrari/tela-cli` owns the local `tela` binary for scriptable access to
4
+ Tela Local state and agent workflows.
4
5
 
5
- ## Installation
6
+ The CLI reads and writes the same `~/.tela/config.json` state as Tela Dock
7
+ through `@meistrari/tela-local-config`. It should not parse local config files
8
+ directly, and normal output must not print token material.
6
9
 
7
- ```bash
8
- bun install -g @meistrari/tela-cli
9
- ```
10
+ ## Commands
10
11
 
11
- This installs the package globally and adds a `tela` alias to your `~/.zshrc`. After installing, either open a new terminal or run:
12
+ Current first-slice commands:
12
13
 
13
14
  ```bash
14
- source ~/.zshrc
15
+ tela auth token --json
16
+ tela auth token --raw
17
+ tela context current --json
18
+ tela context list --json
19
+ tela context show <context-id> --json
20
+ tela context use <context-id>
21
+ tela env list --json
22
+ tela doctor auth --json
23
+ tela agent sync [repo] --current --all --dry-run --json --verbose
24
+ tela agent run --input <name=path>... --plain --json --verbose
25
+ tela agent push --message <text> --claude --manual --dry-run --json --verbose
26
+ tela agent feedback --list --apply <all|select> --json --verbose
15
27
  ```
16
28
 
17
- ## Default command
18
-
19
- ### `tela`
20
-
21
- List workspace repositories that are available to sync locally.
22
-
23
- When to use: Run this with no subcommand when you want to see which workspace repositories are available before using `tela sync <repo>`.
24
-
25
- Examples:
26
- - `tela` — Render the available repositories in a human-readable table
27
- - `tela --json` — Emit the available repositories as JSON
28
-
29
- ## Version
30
-
31
- Examples:
32
- - `tela --version` — Print the current Tela CLI version
33
- - `tela -v` — Print the current Tela CLI version
34
-
35
- ## Commands
36
-
37
- ### `setup`
38
-
39
- Configure Tela CLI, sign in with device flow, choose the workspace organization, provision Forgejo access, and verify the local environment
40
-
41
- When to use: Run this first on a new machine, or any time your environment target, clone root, Tela session, or SSH key changes.
42
-
43
- Examples:
44
- - `tela setup` — Choose production, staging, or a custom environment, complete browser-based sign-in, select the workspace organization, and provision Forgejo access with an SSH key
45
-
46
- ### `sync [repo]`
47
-
48
- Clone or update a Tela repository, or refresh the current checkout
49
-
50
- When to use: Use this before coding to get a clean local checkout, or to refresh every repository under the configured clone root. SSH-backed sync automatically accepts first-seen host keys during clone and update flows.
51
-
52
- Examples:
53
- - `tela sync agent-api` — Clone or update a specific repository under the clone root
54
- - `tela sync --current` — Sync the repository for the current working directory
55
- - `tela sync --all` — Refresh every repository directly under the clone root
56
-
57
- ### `run`
29
+ `context use` is the only normal config mutation in this slice. `auth token`
30
+ may refresh a user-session credential in Keychain before returning metadata or
31
+ printing a raw token. Creating, removing, editing, and repairing contexts are
32
+ Dock-first workflows.
58
33
 
59
- Run the local agent repository with project-scoped Claude
34
+ ## Development
60
35
 
61
- When to use: Use this from inside an agent repository when you want Claude to follow the repo-local contract files, ignore user/global Claude config by default, show its progress live, and produce the expected result artifact.
36
+ From the repository root:
62
37
 
63
- Examples:
64
- - `tela run` — Run the current agent repository with project-scoped Claude and the live viewer
65
- - `tela run --plain` — Force project-scoped execution with scrollback-first text output
66
- - `tela run --json` — Emit the final project-scoped execution and artifact envelope as JSON
67
-
68
- ### `push`
69
-
70
- Preview, commit, and push the current repository
71
-
72
- When to use: Use this after reviewing local changes when you want Tela to stage everything, produce a commit message, and push the branch.
73
-
74
- Examples:
75
- - `tela push` — Choose the commit-message flow interactively
76
- - `tela push --claude` — Generate a commit message from the current worktree
77
- - `tela push --message "Update feedback flow"` — Skip prompts and use an explicit commit message
78
-
79
- ### `feedback`
80
-
81
- Guided review of commit feedback with optional Claude handoff
82
-
83
- When to use: Use this after pushing or after a feedback-producing commit when you want a guided review of the feedback, a prompt preview before launch, and an outcome summary after Claude exits.
84
-
85
- Examples:
86
- - `tela feedback --list` — Open the guided review flow without launching Claude
87
- - `tela feedback --apply all` — Preview and launch Claude against every actionable suggestion
88
- - `tela feedback --apply select` — Choose specific actionable suggestions before launching Claude
89
-
90
- ### `status`
91
-
92
- Show Tela config, session state, tool availability, repo state, and Agent API reachability
93
-
94
- When to use: Use this for a quick snapshot of whether the local environment is ready before running mutating commands.
95
-
96
- Examples:
97
- - `tela status` — Render a human-readable environment summary
98
- - `tela status --json` — Emit a machine-readable status report
38
+ ```bash
39
+ pnpm cli:build
40
+ pnpm cli:test
41
+ pnpm --filter @meistrari/tela-cli run typecheck
42
+ ```
99
43
 
100
- ### `doctor`
44
+ Run the built binary directly during development:
101
45
 
102
- Diagnose config, auth session, tools, filesystem state, repo health, and Agent API reachability
46
+ ```bash
47
+ node apps/tela-cli/dist/index.js context current --json
48
+ node apps/tela-cli/dist/index.js auth token --json
49
+ ```
103
50
 
104
- When to use: Use this when Tela fails or behaves unexpectedly and you need exact remediation steps.
51
+ Use `TELA_HOME` to point the CLI at an isolated config directory:
105
52
 
106
- Aliases: `diag`
53
+ ```bash
54
+ TELA_HOME=/tmp/tela-home node apps/tela-cli/dist/index.js env list --json
55
+ ```
107
56
 
108
- Examples:
109
- - `tela doctor` — Run the full diagnostic suite with remediation guidance
110
- - `tela doctor --json` — Emit structured diagnostic output for scripts
57
+ ## Credential Behavior
111
58
 
112
- ## Output modes
59
+ The CLI uses the credential adapter contract from `local-config`.
113
60
 
114
- - Human output is structured for terminal use with grouped summaries and next actions.
115
- - `--json` is available on read-heavy flows and on `tela run` for the final execution envelope.
61
+ - `env` credentials read `TELA_ACCESS_TOKEN`, `TELA_REFRESH_TOKEN`, or `TELA_DATA_TOKEN`.
62
+ - macOS `keychain` credentials use the system `security` command.
63
+ - expired user-session access tokens with a refresh token are reported as
64
+ `refreshable`, not as a hard auth failure.
65
+ - `auth token` refreshes expired user-session access tokens when a refresh token
66
+ is available.
67
+ - unsupported providers report diagnostic status instead of exposing secrets.
116
68
 
117
- ## `tela run` scope
69
+ `auth token --raw` is the explicit token-export escape hatch for shell scripts.
70
+ Default and `--json` output stay redacted.
118
71
 
119
- - `tela run` loads project-scoped Claude settings by default and excludes user/global Claude config.
120
- - Remaining external inputs are explicit: Claude's built-in system prompt, managed enterprise settings, auth/provider credentials, minimal shell runtime environment, and the default model when `agent.config.json` does not set one.
72
+ ## Tests
121
73
 
122
- ## First run
74
+ Tests are black-box `node --test` cases that execute the compiled CLI with an
75
+ isolated `TELA_HOME`.
123
76
 
124
- 1. `tela setup`
125
- 2. `tela status`
126
- 3. `tela sync <repo>` or `tela sync --current`
127
- 4. `tela run`
128
- 5. `tela push`
129
- 6. `tela feedback --list`
77
+ ```bash
78
+ pnpm --filter @meistrari/tela-cli run test
79
+ ```
@@ -0,0 +1,2 @@
1
+ import type { CliIo, GlobalOptions } from '../output';
2
+ export declare function runAuthCommand(args: string[], options: GlobalOptions, io: CliIo): Promise<number>;
@@ -0,0 +1,2 @@
1
+ import type { CliIo, GlobalOptions } from '../output';
2
+ export declare function runContextCommand(args: string[], options: GlobalOptions, io: CliIo): Promise<number>;
@@ -0,0 +1,2 @@
1
+ import type { CliIo, GlobalOptions } from '../output';
2
+ export declare function runDoctorCommand(args: string[], options: GlobalOptions, io: CliIo): Promise<number>;
@@ -0,0 +1,2 @@
1
+ import type { CliIo, GlobalOptions } from '../output';
2
+ export declare function runEnvCommand(args: string[], options: GlobalOptions, io: CliIo): Promise<number>;
@@ -0,0 +1,2 @@
1
+ import { type CredentialAdapter } from '@meistrari/tela-local-config';
2
+ export declare function createCliCredentialAdapter(env?: Record<string, string | undefined>): CredentialAdapter;
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};