@shardflux/cli 0.20.0 → 0.23.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.
- package/CHANGELOG.md +312 -1
- package/README.md +242 -75
- package/dist/account-args.js +7 -2
- package/dist/account-commands.js +56 -106
- package/dist/account-pool.d.ts +19 -15
- package/dist/account-pool.js +47 -96
- package/dist/account-scope.d.ts +65 -0
- package/dist/account-scope.js +246 -0
- package/dist/acp-journal.js +58 -6
- package/dist/acp-login.d.ts +13 -5
- package/dist/acp-login.js +37 -8
- package/dist/acp-models.d.ts +6 -1
- package/dist/acp-models.js +29 -19
- package/dist/acp.js +120 -14
- package/dist/agent-commands.d.ts +4 -1
- package/dist/agent-commands.js +110 -42
- package/dist/agent-config-return.d.ts +46 -2
- package/dist/agent-config-return.js +110 -4
- package/dist/agent-credentials.js +7 -3
- package/dist/agent-repository.d.ts +16 -3
- package/dist/agent-repository.js +149 -74
- package/dist/agent-setup.d.ts +14 -3
- package/dist/agent-setup.js +78 -36
- package/dist/agent-target-commands.d.ts +20 -1
- package/dist/agent-target-commands.js +73 -31
- package/dist/agent-targets.js +6 -1
- package/dist/args.d.ts +1 -1
- package/dist/args.js +95 -54
- package/dist/bin.js +5 -1
- package/dist/browser.d.ts +13 -2
- package/dist/browser.js +30 -14
- package/dist/claude-cloud-login.d.ts +24 -2
- package/dist/claude-cloud-login.js +151 -11
- package/dist/cli-proxy-hub.d.ts +61 -25
- package/dist/cli-proxy-hub.js +202 -54
- package/dist/cli-proxy.d.ts +44 -1
- package/dist/cli-proxy.js +177 -28
- package/dist/client-settings.d.ts +39 -0
- package/dist/client-settings.js +91 -0
- package/dist/codex-cloud.d.ts +14 -4
- package/dist/codex-cloud.js +135 -31
- package/dist/codex-linux.d.ts +14 -0
- package/dist/codex-linux.js +69 -0
- package/dist/command-center-actions.js +18 -5
- package/dist/command-center-model.d.ts +2 -0
- package/dist/command-center-model.js +6 -1
- package/dist/command-center.js +3 -3
- package/dist/commands.js +173 -24
- package/dist/conversation-commands.d.ts +5 -0
- package/dist/conversation-commands.js +8 -5
- package/dist/conversation-terminal.d.ts +10 -2
- package/dist/conversation-terminal.js +78 -13
- package/dist/conversations.d.ts +86 -1
- package/dist/conversations.js +306 -23
- package/dist/desktop-linux.js +16 -3
- package/dist/device-bridge.d.ts +1 -1
- package/dist/device-bridge.js +6 -4
- package/dist/device-helper.js +43 -22
- package/dist/errors.d.ts +29 -2
- package/dist/errors.js +50 -7
- package/dist/filesystem-commands.d.ts +16 -9
- package/dist/filesystem-commands.js +133 -57
- package/dist/format.d.ts +2 -1
- package/dist/format.js +10 -1
- package/dist/handlers.js +3 -1
- package/dist/initial-prompt.d.ts +8 -0
- package/dist/initial-prompt.js +43 -1
- package/dist/large-media.d.ts +14 -0
- package/dist/large-media.js +100 -0
- package/dist/linux-terminal.d.ts +5 -3
- package/dist/linux-terminal.js +6 -20
- package/dist/local-sessions.d.ts +26 -2
- package/dist/local-sessions.js +113 -24
- package/dist/machine-setup.d.ts +11 -1
- package/dist/machine-setup.js +69 -22
- package/dist/machine-status.d.ts +67 -0
- package/dist/machine-status.js +140 -0
- package/dist/main.js +11 -13
- package/dist/menubar.d.ts +6 -5
- package/dist/menubar.js +38 -28
- package/dist/move-worktrees-restore.py +144 -0
- package/dist/move-worktrees.d.ts +69 -0
- package/dist/move-worktrees.js +252 -0
- package/dist/move.d.ts +10 -1
- package/dist/move.js +111 -16
- package/dist/onboarding.d.ts +11 -7
- package/dist/onboarding.js +63 -29
- package/dist/prepared-repository.d.ts +204 -0
- package/dist/prepared-repository.js +860 -0
- package/dist/prepared-repository.py +1307 -0
- package/dist/project-preparation.d.ts +62 -0
- package/dist/project-preparation.js +316 -0
- package/dist/project-sync-manifest.d.ts +4 -0
- package/dist/project-sync-manifest.js +5 -1
- package/dist/project-sync-transfer.js +1 -1
- package/dist/project-sync.d.ts +22 -4
- package/dist/project-sync.js +34 -8
- package/dist/project-template-setup.d.ts +33 -1
- package/dist/project-template-setup.js +59 -2
- package/dist/secret-ask.d.ts +72 -0
- package/dist/secret-ask.js +351 -0
- package/dist/seed-phases.d.ts +8 -1
- package/dist/seed-phases.js +17 -2
- package/dist/setup-cache.d.ts +7 -0
- package/dist/setup-cache.js +32 -0
- package/dist/t3-launch.d.ts +2 -1
- package/dist/t3-launch.js +12 -6
- package/dist/t3-mode.d.ts +8 -2
- package/dist/t3-mode.js +19 -4
- package/dist/t3-phone.d.ts +4 -2
- package/dist/t3-phone.js +12 -4
- package/dist/t3-proxy.d.ts +81 -0
- package/dist/t3-proxy.js +325 -0
- package/dist/terminal-apps.d.ts +168 -0
- package/dist/terminal-apps.js +574 -0
- package/dist/terminal-onboarding.js +6 -1
- package/dist/this-computer.d.ts +11 -0
- package/dist/this-computer.js +36 -0
- package/dist/thread-on-computer.js +4 -1
- package/dist/update.d.ts +2 -0
- package/dist/update.js +43 -9
- package/dist/worktree-twin.d.ts +10 -2
- package/dist/worktree-twin.js +27 -9
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @shardflux/cli: `shard`
|
|
2
2
|
|
|
3
|
+
Historical template file lists: reads queue checksum-verified reconstruction when a cold list is absent from the SQL cache. TypeScript SDK 0.27.0+ / Python 0.23.0+ wait full Retry-After for retryable API 409 file_list_indexing on GET/HEAD within the admission timeout. Template objects and version history stay available.
|
|
4
|
+
|
|
5
|
+
Plan-derived API budgets (0.23.0+, SDK 0.27.0): `--json` error output includes `rate_limit` and `retry_after_seconds`; the text hint names the shared scope and delay. API request pacing follows the SDK admission timeout and preserves the request body. Reuse workspace credentials and reduce status polling when the returned budget asks for a delay.
|
|
6
|
+
|
|
7
|
+
Exec survives a dropped connection (0.23.0+): a lost start response is retried with the same session ID and reattaches to the command that already started, and a cut-off JSON answer is retried within the same safe retry boundary.
|
|
8
|
+
|
|
9
|
+
Suspension controls arrive in 0.22.0 (next coordinated release). `shard operations progress <operation-id>` reads the actual phase, host deadline, cancellation window and safe next action. `shard operations cancel <operation-id>` requests cancellation; `--wait --timeout 5m` waits for confirmed `suspend_canceled` recovery of the original workspace. Asynchronous acceptance is labeled separately. The owning host refuses cancellation outside validated preparation; after capture, wait for the outcome and resume if it succeeded. These commands never reset, replace or launch a provider turn. `--json` preserves the reported values; unavailable progress is explicit.
|
|
10
|
+
|
|
3
11
|
The command line for [Shardflux](https://shardflux.dev): serverless VMs for AI agents. Open a
|
|
4
12
|
persistent workspace by key, run commands in it, move files in and out, and suspend, resume, fork
|
|
5
13
|
or delete it. From 0.5.0 it also does everything the web app does: create an account, sign in
|
|
@@ -13,6 +21,11 @@ idempotency keys, operation polling and tool-token handling.
|
|
|
13
21
|
|
|
14
22
|
Requires Node.js 24 or later.
|
|
15
23
|
|
|
24
|
+
T3 Connect (0.22.0+): `shard setup --inspect --t3-connect --org <id|slug>` signs in for that organization;
|
|
25
|
+
`--project <id|slug>` selects its project. Without flags it uses the API key's project, then the saved default
|
|
26
|
+
project. Status and Connect use the same person and organization, including a saved session without an API key;
|
|
27
|
+
an explicit selection keeps the default credentials and target status. An approved T3 sign-in is reused.
|
|
28
|
+
|
|
16
29
|
## Support and bug reports
|
|
17
30
|
|
|
18
31
|
[Report a bug](https://github.com/shardfluxdev/community/issues/new?template=bug_report.yml) or
|
|
@@ -41,8 +54,8 @@ shard ws tunnel customer-42/main --remote 8081 --to localhost:8081
|
|
|
41
54
|
```
|
|
42
55
|
|
|
43
56
|
Commands in the workspace can then call `http://127.0.0.1:8081`. The target is dialed on the machine running
|
|
44
|
-
`shard`. Half-close and resets pass through: a reset on either side reaches the other as `ECONNRESET` (0.14.5+). Ctrl-C closes the sockets and guest process. `--bind 0.0.0.0` selects all guest interfaces; loopback
|
|
45
|
-
default. An open tunnel keeps the workspace awake, and persistent workspaces preserve it across explicit suspend/resume.
|
|
57
|
+
`shard`. Half-close and resets pass through: a reset on either side reaches the other as `ECONNRESET` (0.14.5+). Ctrl-C closes the sockets and guest process. `--bind 0.0.0.0` selects all guest interfaces; loopback (`127.0.0.1`
|
|
58
|
+
and `::1`, 0.22.0+) is the default. An open tunnel keeps the workspace awake, and persistent workspaces preserve it across explicit suspend/resume.
|
|
46
59
|
|
|
47
60
|
The tunnel selects a streaming transport automatically when `pty` permission is granted. Choose `transport: 'pty'` or `transport: 'exec'` in the SDK, or `--transport pty|exec` in the CLI, to select it explicitly. The handle reports `transport`.
|
|
48
61
|
|
|
@@ -78,6 +91,8 @@ shard --help
|
|
|
78
91
|
The [`shardflux`](https://www.npmjs.com/package/shardflux) package installs the `shard` command.
|
|
79
92
|
Use `shard` for your projects, machine, templates and account.
|
|
80
93
|
|
|
94
|
+
If npm reports `EACCES` or `EPERM`, install only Shardflux in your user directory: `npm install --global --prefix "$HOME/.local" shardflux@latest`. Run `"$HOME/.local/bin/shard"` (including `"$HOME/.local/bin/shard" update` for updates), or use `shard` if `command -v shard` points there. Keep npm config, PATH and other global packages unchanged; do not use sudo or chmod. [Installation help](https://docs.shardflux.dev/reference/cli#npm-permission-errors).
|
|
95
|
+
|
|
81
96
|
## Quick start
|
|
82
97
|
|
|
83
98
|
Start a conversation on a local project (0.14.0+):
|
|
@@ -95,12 +110,24 @@ time `shard` runs, with launch at login enabled; `shard menubar stop` turns it o
|
|
|
95
110
|
|
|
96
111
|
T3 Code uses one **Shardflux** provider; choose a Claude Code or Codex model to start that agent in the cloud.
|
|
97
112
|
Model choices come from your cloud agent's session and use the same coding tools and settings as its terminal.
|
|
113
|
+
Project files synchronize before each message and before its completion (0.22.0+): review remote edits in T3’s
|
|
114
|
+
Changes panel and checkpoints, and send local edits to the next turn. Conflicting versions are retained with
|
|
115
|
+
a `.shard-conflict-<agent>` suffix. Sync runs between turns; an idle T3 thread needs no file watcher.
|
|
98
116
|
The provider is registered automatically when T3 Code is installed, on macOS and on Linux from its .deb or AppImage
|
|
99
117
|
(0.17.0+). Choose **Sign in** on its card in T3's provider settings: T3 runs `shard acp --login` in its own terminal,
|
|
100
118
|
which creates or signs in to your account (with this computer's Codex login, or your email) and connects Claude Code
|
|
101
|
-
and Codex, skipping every step that is already done (0.15.0+).
|
|
119
|
+
and Codex, skipping every step that is already done (0.15.0+). Editors that launch agents from the ACP registry
|
|
120
|
+
run the same sign-in as `shard --login` (0.22.0+).
|
|
102
121
|
With T3 Code 0.0.45, `shard agents new --in t3` adds the project as an SSH environment instead.
|
|
103
122
|
|
|
123
|
+
ACP journal read reattachment uses bounded backoff through temporary lifecycle interruptions (0.23.0+). It keeps the saved sequence and never resubmits an uncertain turn.
|
|
124
|
+
|
|
125
|
+
In CLI 0.22.0+, `shard setup --inspect` shows a stopped T3 Connect workspace link and its remedy without restarting
|
|
126
|
+
the link or replacing your approved sign-in. `shard agents open t3` brings T3 Code up once the workspace is linked
|
|
127
|
+
(0.23.0+): a refused link answers `t3_link_failed` with what to do (for T3 Connect's environment limit, remove an
|
|
128
|
+
environment in T3 Code → Settings → Connections, `details.recovery`), and a link still in progress after 30 seconds
|
|
129
|
+
answers `t3_link_pending`. Both name the workspace and conversation: open it again with `shard agents open t3`.
|
|
130
|
+
|
|
104
131
|
Start another thread on a computer that is already set up (0.16.0+): it shares that conversation's installed
|
|
105
132
|
packages, caches, running services, ports and files, and works on its own branch and worktree.
|
|
106
133
|
|
|
@@ -138,11 +165,28 @@ shard move --list # the project's sessions, and where moved one
|
|
|
138
165
|
shard move --session 3d085e35-aa66-4866-9a53-f09719d6767c --detach --json
|
|
139
166
|
```
|
|
140
167
|
|
|
168
|
+
The session's checkout moves, uncommitted edits included; the repository's other worktrees and local branches stay
|
|
169
|
+
on this computer (0.23.0+; `--this-worktree-only` says so explicitly). When the session also worked in another
|
|
170
|
+
worktree, the move names it in one line (`other_worktrees` in `--json`). To bring every registered worktree, all
|
|
171
|
+
local refs, indices and ignored files too, inspect the exact paths and file bytes with
|
|
172
|
+
`shard move --last --plan --json`, then move with `--preserve-all-worktrees` (0.22.0+). Preserve-all includes ignored dependency/build caches; tar headers add to the displayed file bytes and the VM
|
|
173
|
+
and project space need free disk for the copies. It never follows symlinks into unrelated sibling folders.
|
|
174
|
+
The source checkout stays untouched. Cloud worktrees keep their staged/unstaged state; the selected tree runs on
|
|
175
|
+
the conversation's branch while its original branch and HEAD remain in the recovery archive. Git location
|
|
176
|
+
pointers are repaired for the VM. The result's `preserved.snapshot` names an immutable migration-time snapshot
|
|
177
|
+
in the project space. Its `restore.py manifest.json <empty-folder>` command restores the original repository
|
|
178
|
+
state into a new folder and refuses to overwrite continued work. It is a recovery snapshot, not an ongoing
|
|
179
|
+
backup of later edits in other worktrees. External object alternates, nested repositories and special files need
|
|
180
|
+
resolution before preserve-all can upload; a registration whose folder is gone has nothing to copy and is listed as
|
|
181
|
+
`stale_registrations`.
|
|
182
|
+
|
|
141
183
|
A running turn finishes here first. Uncommitted edits come along, and your working tree, index and branch stay as
|
|
142
184
|
they are. The cloud work comes back to your checkout by itself, and typing in the local Claude Code copy shows one line
|
|
143
185
|
that it continues in the cloud. Sessions from Claude Desktop's Code tab and the Codex app move the same way; in the
|
|
144
186
|
macOS menu bar, a project's recent sessions have **Move to cloud** in their ⋯ menu, and with the Shardflux MCP server
|
|
145
|
-
you can ask the agent itself to continue in the cloud.
|
|
187
|
+
you can ask the agent itself to continue in the cloud. A session is listed under every repository it worked in, also
|
|
188
|
+
one that began in another folder such as Claude Desktop's scratch folder, and `--path <repository>` moves it from
|
|
189
|
+
anywhere (0.22.0+).
|
|
146
190
|
|
|
147
191
|
Start a thread in T3 Code from the command line (0.17.0+):
|
|
148
192
|
|
|
@@ -153,8 +197,26 @@ shard agents targets --open-in claude=t3,codex=t3 # shard ./ starts new conver
|
|
|
153
197
|
|
|
154
198
|
The first message becomes a T3 thread and T3 comes to the front. With the Shardflux provider the thread runs in its own
|
|
155
199
|
cloud VM; with T3 Code 0.0.45 it runs on the T3 server in the project's VM, or with `--on` on that computer's.
|
|
156
|
-
`--image` attaches images. `shard agents targets --json` shows T3 Code's mode
|
|
157
|
-
open; `shard agents open t3 <conversation>` brings its
|
|
200
|
+
`--image` attaches images. `shard agents targets --json` shows T3 Code's mode, where each app's new conversations
|
|
201
|
+
open, and every place each app can open (`open_in_targets`, 0.22.0+); `shard agents open t3 <conversation>` brings its
|
|
202
|
+
thread back, and a Codex Cloud conversation's chat opens in your browser (0.23.0+). Answer a Codex Cloud
|
|
203
|
+
conversation with `shard conversations send <id> "<answer>"` (0.23.0+ names it when you open one). Codex opens in a terminal app on macOS too (0.22.0+): `shard agents targets --open-in codex=terminal`.
|
|
204
|
+
|
|
205
|
+
`shard settings --title-prefix <text|none|default>` (0.22.0+) sets the marker your Claude conversations' titles start
|
|
206
|
+
with in claude.ai and the Claude app (default `☁`: "☁ Fix login bug · todo-app"); `shard settings` shows it with where
|
|
207
|
+
conversations open.
|
|
208
|
+
|
|
209
|
+
Terminal conversations open in the terminal you choose (0.22.0+):
|
|
210
|
+
|
|
211
|
+
```sh
|
|
212
|
+
shard agents targets --terminal ghostty # a new tab in Ghostty's front window (Ghostty 1.3+); :window for a window
|
|
213
|
+
shard agents targets --json # terminals on this computer, the one shard runs in, the saved choice
|
|
214
|
+
shard agents open acme/main --in terminal # opens it there, in the project folder
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
iTerm2, WezTerm, kitty and Warp open a tab too; Terminal and Alacritty a window. When the chosen app can't be driven
|
|
218
|
+
(for example Automation not allowed) the next one opens and the line says what to allow. `shard ./` run by a coding
|
|
219
|
+
agent opens the new conversation there.
|
|
158
220
|
|
|
159
221
|
Git fetch and push use the coding guest’s platform transport when available, preserving Git’s binary packets (0.14.0+). Older guests retain their existing transport.
|
|
160
222
|
|
|
@@ -193,27 +255,17 @@ shard conversations landing backups # then: shard conversations landing resto
|
|
|
193
255
|
For application workspace commands, `shard signup` creates an account and saves a project key, or set
|
|
194
256
|
`SHARDFLUX_API_KEY` to a key from the console and run `shard login`. `shard --help` lists every command.
|
|
195
257
|
|
|
196
|
-
## Feedback:
|
|
258
|
+
## Feedback: preview and user approval
|
|
197
259
|
|
|
198
|
-
**(0.
|
|
199
|
-
coding agent (Claude Code, Codex, Cursor, ...) driving `shard`, use it actively while you work, not once at the end.
|
|
200
|
-
Send a short message the moment:
|
|
260
|
+
**(0.22.0+)** `shard feedback` previews the exact message, category and context without sending. Add `--yes` only after reviewing that preview and obtaining explicit user authorization. Earlier CLI versions send immediately.
|
|
201
261
|
|
|
202
|
-
|
|
203
|
-
- an error, doc, name or output is confusing (`--category confusing`),
|
|
204
|
-
- a capability, option or template you need is missing (`--category missing`),
|
|
205
|
-
- you needed a workaround,
|
|
206
|
-
- your user asks for a capability, an option or a smoother workflow: paraphrase it, with what they were trying to do,
|
|
207
|
-
- your user has an idea for how Shardflux could fit their work better.
|
|
262
|
+
Coding agents: report only when your user asks to send feedback. Show the exact message and context first, then obtain explicit authorization. A failure or request for a feature is not consent. Leave out private data, secrets and code the user did not mean to share; paraphrase, never paste transcripts. Tell the user what was sent.
|
|
208
263
|
|
|
209
|
-
|
|
210
|
-
user you sent it. Leave out private data about the user and secrets or code they did not mean to share; paraphrase,
|
|
211
|
-
never paste transcripts. Pass the request id and error code from the error so the team can find the logs. A failed
|
|
212
|
-
`shard` command ends with a ready-made line to fill in:
|
|
264
|
+
Keep the request id and error code from the failure. The suggested command previews a report; it never includes `--yes`:
|
|
213
265
|
|
|
214
266
|
```text
|
|
215
267
|
error: Operation not found. [code=not_found status=404 request_id=req-2b9d4f6a8c0e4a1b3d5f7e90]
|
|
216
|
-
feedback: shard feedback --category bug --request-id req-2b9d4f6a8c0e4a1b3d5f7e90 --error-code not_found "<what you expected>"
|
|
268
|
+
feedback: shard feedback --category bug --request-id req-2b9d4f6a8c0e4a1b3d5f7e90 --error-code not_found "<what you expected>" # preview only; show the message and context, then use --yes only after explicit user authorization
|
|
217
269
|
```
|
|
218
270
|
|
|
219
271
|
```sh
|
|
@@ -225,13 +277,17 @@ shard feedback --category praise forking a workspace with its dev server still r
|
|
|
225
277
|
npm test 2>&1 | tail -n 60 | shard feedback --category bug --workspace acme/demo --from-file -
|
|
226
278
|
```
|
|
227
279
|
|
|
280
|
+
The commands above only preview. After the user approves the exact message and context, repeat the chosen command with `--yes` to submit. Re-preview file or piped input if its contents changed.
|
|
281
|
+
|
|
282
|
+
|
|
228
283
|
- The message is the remaining arguments joined with spaces. Quote it, or put it after `--`, when it contains shell
|
|
229
284
|
characters or words starting with `-`. `--from-file <file|->` reads it from a file or standard input instead. 1-8000
|
|
230
285
|
characters.
|
|
231
286
|
- Options: `--category bug|confusing|missing|idea|praise|other` (default `other`), `--workspace <id|key>`,
|
|
232
287
|
`--request-id <id>`, `--error-code <code>`, `--command <text>` (what you ran). Name the reporting agent with
|
|
233
288
|
`--agent-label` or `SHARDFLUX_AGENT_LABEL` (e.g. `claude-code`); `shard` adds its own version as the client.
|
|
234
|
-
-
|
|
289
|
+
- Preview output includes `sent: false`, `authorization_required: true`, `preview` and `note` with `--json`.
|
|
290
|
+
- Approved submission output: one line with the feedback id. `Already received` means the same message was sent from this key in the last
|
|
235
291
|
24 hours; it is not emailed again. With `--json`: `{"id", "received_at", "duplicate"}`.
|
|
236
292
|
- It sends with the project API key (any key; no tool permission), or, when no key is configured yet, with your
|
|
237
293
|
signed-in session (`shard auth login`), so it works while you are still setting up. It is rate limited per key or
|
|
@@ -244,52 +300,70 @@ npm test 2>&1 | tail -n 60 | shard feedback --category bug --workspace acme/demo
|
|
|
244
300
|
or the shell is a coding agent's (Claude Code, Codex, Cursor, Gemini CLI; 0.17.1+), `--json` on every command, secrets
|
|
245
301
|
only on standard input, and documented exit codes.
|
|
246
302
|
|
|
247
|
-
**
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
303
|
+
**You run permitted steps; your user decides** (0.22.0+): ask one multiple-choice question at a time with the
|
|
304
|
+
recommended answer first, keep each message to a sentence or two, and never ask for a secret or sign-in code in
|
|
305
|
+
the chat. They answer your questions, agree to the Terms, approve sign-ins in the browser tabs
|
|
306
|
+
shard opens and type secrets into the page shard opens. `shard setup --guide` prints the whole order with every
|
|
307
|
+
command, `--json` as a list with each step's `choices` (0.17.1+); so does `shard` in a shell without a terminal. The
|
|
308
|
+
full walk-through: [Set up Shardflux with your coding agent](https://docs.shardflux.dev/guides/agent-setup).
|
|
309
|
+
|
|
310
|
+
If a permission system or auto-mode classifier refuses an action, stop that action. Explain the reason and hand
|
|
311
|
+
your user the exact refused command to run in their own terminal; ask only for its non-secret result, then resume
|
|
312
|
+
permitted steps. Do not change permission settings, wrap the action in a script or use another tool to bypass the
|
|
313
|
+
refusal. A plugin install needs confirmation that the plugin is installed; machine opening needs the workspace
|
|
314
|
+
key. If setup output or a status check is refused, have your user run `shard setup --guide --json` and confirm
|
|
315
|
+
`guide.signed_in.email` and `guide.api_key_saved`. This local check never prints the credentials and does not prove
|
|
316
|
+
that the key works. Never read redirected logs or credential files instead. An exit code alone does not prove
|
|
317
|
+
onboarding; keep blocked or unobserved behavior unverified.
|
|
318
|
+
|
|
319
|
+
First ask what it is for: their own cloud coding agents (each Claude or Codex conversation gets its own VM; the usual
|
|
320
|
+
answer) or their product (it runs VMs for its customers through the API, SDK or MCP).
|
|
321
|
+
|
|
322
|
+
1. **Account, for both.** Ask whether they agree to the [Terms of Service](https://shardflux.dev/terms) and the
|
|
323
|
+
[Privacy Policy](https://shardflux.dev/privacy) (Yes / No); then `shard signup --accept-terms --json`. With the
|
|
324
|
+
Codex CLI signed in with ChatGPT on the machine it signs up (or signs in) with that login and runs `shard setup`: an
|
|
325
|
+
organization, a project and an API key, saved. Without a Codex login, or for an existing account, `shard auth login
|
|
326
|
+
--browser --json` opens the sign-in page and waits until they approve it (run it again if your tool's time limit cuts
|
|
327
|
+
it off: it waits for the same request), then `shard setup --json`.
|
|
328
|
+
|
|
329
|
+
**Their own cloud coding agents:**
|
|
330
|
+
|
|
331
|
+
2. **Connect Claude and Codex.** Ask which they use (Claude Code and Codex / Claude Code / Codex). `shard agents
|
|
332
|
+
credentials login claude --json` opens the claude.ai sign-in and a page for its code in their browser (0.22.0+);
|
|
333
|
+
Codex Cloud uses this computer's ChatGPT sign-in (`codex login`); copy it with `shard setup`.
|
|
334
|
+
`shard setup --inspect --connect --json --apps claude,codex`
|
|
335
|
+
(0.15.0+) checks both live, copies the Codex login and starts the account's Codex remote device.
|
|
336
|
+
3. **Set up the machine** every conversation starts from: ask "Set up your cloud machine from this computer?" (Yes /
|
|
337
|
+
Not now), then `shard machine setup --from-this-computer --json` (0.20.0+): this computer's Claude Code or Codex
|
|
338
|
+
recreates its tools, runtimes, shell, git identity and dotfiles there and saves it. Anything more they want: `shard
|
|
339
|
+
machine open --json`, `shard ws exec <key> -- bash -lc '...'`, `shard files write <key> <path> --ask` for a secret
|
|
340
|
+
file they type in the page (0.22.0+), and `shard machine save --wait --json`.
|
|
341
|
+
4. **Choose where conversations open** (0.22.0+): `shard agents targets --json` lists the apps on this computer;
|
|
342
|
+
offer them (the terminal shard runs in first: Ghostty, iTerm2, WezTerm, kitty, Warp, Terminal; or the Claude app,
|
|
343
|
+
the Codex app, T3 Code) and save the answer with `shard agents targets --open-in <target> --terminal <app>`.
|
|
344
|
+
5. **Set up the project.** Ask whether it needs secrets (No / type them in a secure page / from their vault): `shard
|
|
345
|
+
secrets create NAME --ask --json` opens a page where they type the value, `shard secrets import --from
|
|
346
|
+
<hsec|1password|bitwarden|keychain> NAME` reads a vault item. Then, in its folder, `shard ./ --json --prompt "Set up
|
|
347
|
+
this project and run its tests"` starts a conversation in its own VM (`shard ./ codex --json ...` for Codex); setup
|
|
348
|
+
installs the dependencies and saves the project template. `shard conversations wait <conversation-id> --timeout 90`
|
|
349
|
+
follows it (run it again while it says Still working).
|
|
350
|
+
6. **Open the first conversation:** `shard ./` opens it in the app they chose. Claude conversations continue on
|
|
351
|
+
claude.ai and in the Claude app; Codex threads in the Codex app, on the web and on the phone.
|
|
352
|
+
|
|
353
|
+
Commands that wait for your user in the browser (sign-ins, `--ask`) take up to 10 minutes: run them with a long timeout
|
|
354
|
+
or in the background.
|
|
355
|
+
|
|
356
|
+
**Their product** (no agent sign-ins, menu bar or machine):
|
|
263
357
|
|
|
264
358
|
2. `eval "$(shard env)"` exports `SHARDFLUX_API_KEY` for the SDKs, the MCP server and your product's server. Keep it in
|
|
265
359
|
server-side secrets.
|
|
266
|
-
3.
|
|
267
|
-
|
|
268
|
-
<cmd>` tries a workspace
|
|
360
|
+
3. Ask how the product calls Shardflux (TypeScript SDK / Python SDK / HTTP API / MCP server) and integrate with
|
|
361
|
+
`@shardflux/sdk`, the Python SDK `shardflux`, the HTTP API or the MCP server. Your customers' workspaces start from
|
|
362
|
+
a template: `shard templates build template.yaml`. `shard exec <key> --template default -- <cmd>` tries a workspace
|
|
363
|
+
from here (0.10.0+).
|
|
269
364
|
4. A paid plan: `shard billing upgrade <plan> --json` prints the Stripe Checkout URL; give it to your user, then
|
|
270
365
|
`shard billing upgrade <plan> --wait` (or `shard billing status`) until it is active.
|
|
271
366
|
|
|
272
|
-
**Personal setup** (their own cloud coding agents):
|
|
273
|
-
|
|
274
|
-
2. **Connect Claude and Codex.** Claude: your user runs `shard agents credentials login claude` in their own terminal,
|
|
275
|
-
once (a claude.ai link and a code). Codex: `codex login` on this computer. Then
|
|
276
|
-
`shard setup --inspect --connect --json --apps claude,codex` (0.15.0+) checks both live, copies the Codex login and
|
|
277
|
-
starts the account's Codex remote device.
|
|
278
|
-
3. **Build the machine** every conversation starts from. `shard machine setup --from-this-computer --json` (0.20.0+)
|
|
279
|
-
has this computer's Claude Code or Codex recreate its tools, runtimes, shell, git identity and dotfiles there and
|
|
280
|
-
saves it. For the rest, ask your user what it should carry: languages and runtimes,
|
|
281
|
-
CLIs and tools, dotfiles and shell, secrets and credentials, editor and agent config. Then
|
|
282
|
-
`shard machine open --json` (0.17.1+) prints the machine VM's key; install with
|
|
283
|
-
`shard ws exec <key> -- bash -lc '...'`, write dotfiles and secret files with
|
|
284
|
-
`shard files write <key> <path> --from -` (contents on standard input), and `shard machine save --wait --json`.
|
|
285
|
-
4. **Set up the project.** In its folder, `shard ./ --json --prompt "Set up this project and run its tests"` starts a
|
|
286
|
-
conversation in its own VM (`shard ./ codex --json ...` for Codex); setup installs the dependencies and saves the
|
|
287
|
-
project template. `shard conversations wait <conversation-id> --timeout 90` follows it (run it again while it says
|
|
288
|
-
Still working), and `shard template --json` shows the saved version. Project secrets:
|
|
289
|
-
`shard secrets import --from <hsec|1password|bitwarden|keychain> NAME`.
|
|
290
|
-
5. **Hand over.** Your user runs `shard ./` in their own terminal. Claude conversations continue on claude.ai and in the
|
|
291
|
-
Claude app; Codex threads in the Codex app, on the web and on the phone.
|
|
292
|
-
|
|
293
367
|
Any time: `shard setup --json` is idempotent, and sensitive actions (exports, deletions, two-factor and email changes)
|
|
294
368
|
need a recent step-up: `printf '%s\n' "$PASSWORD" | shard auth step-up` (without a terminal the command fails with
|
|
295
369
|
`step_up_required`, exit 4, and the hint names this command). Send `shard feedback` as you work, the moment something
|
|
@@ -384,8 +458,9 @@ shard auth totp recovery-codes
|
|
|
384
458
|
3. an API key with every workspace tool, `computer` included (0.15.1+; `--tool` repeatable to narrow it), named
|
|
385
459
|
`shard-cli <hostname>` (`--key-name`), saved in the credentials file and checked against the API.
|
|
386
460
|
|
|
387
|
-
`shard setup --guide` (0.17.1+) prints how to set Shardflux up with a coding agent:
|
|
388
|
-
|
|
461
|
+
`shard setup --guide` (0.17.1+) prints how to set Shardflux up with a coding agent: how to run it (the agent does
|
|
462
|
+
permitted steps and hands off actual policy refusals, the user answers multiple-choice questions; 0.22.0+), the
|
|
463
|
+
question to ask first and the ordered steps of both answers; `--json` gives them as a list with each step's `choices`.
|
|
389
464
|
|
|
390
465
|
It is idempotent: a saved key that still works is kept (`--new-key` makes a new one). A saved key from an earlier
|
|
391
466
|
`shard setup` (every tool but `computer`) is replaced with one that has every tool (0.15.1+); the old key keeps working
|
|
@@ -412,6 +487,7 @@ shard orgs workspaces [org] [--project P] [--state S] [--all] # every project'
|
|
|
412
487
|
shard orgs deletion [org] # what deleting would do, and what blocks it
|
|
413
488
|
shard orgs delete <org> --confirm <slug> --yes # irreversible (step-up)
|
|
414
489
|
shard projects list | create <name> [--slug] [--use] | get <project> | use <project>
|
|
490
|
+
shard projects sync add | pause | remove <path> | list # projects kept ready for new conversations (0.22.0+)
|
|
415
491
|
shard api-keys list | create <name> [--tool T]... [--read-only] [--expires 30d|90d|365d|never] [--save] | revoke <id|key_id> --yes
|
|
416
492
|
shard members list | set-role <user|email> <owner|admin|member|billing> | remove <user|email> --yes
|
|
417
493
|
shard invitations list | create <email> --role <role> | revoke <id|email> | accept '<link>' [--use]
|
|
@@ -422,6 +498,23 @@ shard templates publish <slug>@<version> | archive <slug>@<version>
|
|
|
422
498
|
what it is on stderr; `--json` includes it as `secret`; `--save` stores it in the credentials file for
|
|
423
499
|
the workspace commands instead of printing it. Revoking the saved key also removes it from the file.
|
|
424
500
|
|
|
501
|
+
In more than one organization (0.22.0+): workspace, agent and usage commands act where the API key belongs, account
|
|
502
|
+
commands where the default is. `orgs use` and `projects use` say when the key belongs to another organization and
|
|
503
|
+
name the command that makes one for the new default (`shard setup --org <org> --new-key`; in a terminal they offer to
|
|
504
|
+
run it). With a signed-in session, `whoami` distinguishes a saved default or key from an organization you left from
|
|
505
|
+
a key in another organization you still belong to. Warnings name `shard orgs use <org>` for a stale default and
|
|
506
|
+
`shard setup --org <org> --new-key` for the key. The switches preserve the key unless you accept the replacement
|
|
507
|
+
prompt. `SHARDFLUX_API_KEY` wins over the saved key: recovery saves the replacement, then you must unset the
|
|
508
|
+
environment variable to use it. `--json` carries the same `warnings` (`code`, `message`, `fix`); `setup --json`
|
|
509
|
+
also warns when the environment key still overrides its saved key. `shard usage --org <org>` reads any of your
|
|
510
|
+
organizations with your signed-in session.
|
|
511
|
+
|
|
512
|
+
For organization usage (0.22.0+), the summary, estimate and series keep using your project key in its own
|
|
513
|
+
organization. An explicit `--org <id|slug>` for another organization uses your session only when you are a member.
|
|
514
|
+
Without a session, sign in with `shard auth login`; to save a project key for that organization, then run
|
|
515
|
+
`shard setup --org <org> --new-key`. If `SHARDFLUX_API_KEY` is set, unset it after saving the new key so the saved
|
|
516
|
+
key takes effect. Workspace usage keeps the project key's authorization, and API errors stay errors.
|
|
517
|
+
|
|
425
518
|
## Billing (0.5.0+)
|
|
426
519
|
|
|
427
520
|
```sh
|
|
@@ -586,7 +679,7 @@ shows the status; `shard version --check` asks now (`--json`: `{"cli", "sdk", "u
|
|
|
586
679
|
| `login`, `whoami` | Show the principal behind the project key (`SHARDFLUX_API_KEY`, else the saved one). |
|
|
587
680
|
| `version [--check]` | Print the CLI and SDK versions and the update status (`--check` asks the API now). |
|
|
588
681
|
| `usage [--org <id>] [--estimate \| --series \| --workspace <id\|key>] [--from T] [--to T] [--granularity hour\|day] [--meter M]` | Usage summary for the current period: plan, meters and allowances. `--estimate`: the bill so far and projected allowance use; `--series`: usage over time; `--workspace`: one workspace's usage over time (0.5.0+). The summary includes the [overage](#usage-and-overage) block (0.5.1+). |
|
|
589
|
-
| `feedback [--category C] [--workspace W] [--request-id ID] [--error-code CODE] [--command TEXT] [--from-file F\|-] <message...>` |
|
|
682
|
+
| `feedback [--yes] [--category C] [--workspace W] [--request-id ID] [--error-code CODE] [--command TEXT] [--from-file F\|-] <message...>` | Preview feedback; `--yes` sends after explicit user authorization (0.22.0+). See [Feedback](#feedback-preview-and-user-approval). |
|
|
590
683
|
| `workspaces open <key> --template <slug> [--secret NAME]... [--input NAME=value]... [--input-file F] [--lifetime persistent\|session] [--mode processful\|file-first] [--cpu-millis N --memory-mib N --disk-gib N] [--allocation-mode fixed\|elastic] [--memory-held N] [--no-wait] [--timeout 5m] [--timing]` | Open by key. Creates the workspace on first use and reconnects or resumes it afterwards, never resetting it. Waits until it is ready (the template's start commands and services included) unless you pass `--no-wait`. `--secret` binds secret names (replacing the binding of an existing workspace). `--input` (0.4.0+) passes the template's text inputs (replacing those of an existing workspace); `--input-file` reads `NAME=value` lines or a JSON object. `--lifetime session`: the workspace is discarded when the session ends (`workspaces close` or the idle timeout), and the key then opens a new workspace. `--mode file-first` (0.5.0+) opens a [file-first workspace](#file-first-workspaces); the default is processful for a new key and the stored mode for an existing one. `--allocation-mode elastic` (0.8.0+): [elastic memory](#elastic-memory-080). |
|
|
591
684
|
| `workspaces list [--state S] [--prefix P] [--lifetime persistent\|session\|any] [--purpose standard\|template_draft\|template_test\|any] [--include-deleted] [--all] [--limit N] [--cursor C]` | One page, or every page with `--all`. The next cursor is printed on stderr. By default only persistent standard workspaces are listed. A file-first workspace's state reads `running (file-first)` (0.5.0+). |
|
|
592
685
|
| `workspaces get <id\|key>` | One workspace (deleted ones included), with the startup of its template's start commands and services (0.4.0+): a failed step shows its exit code, reason and output tail. Its mode, and a file-first workspace's tree revision (0.5.0+). Its memory (0.8.0+): `fixed 4096 MiB`, or `elastic: promised …, held …, plugged +… MiB`. The template version whose [immutable paths](#immutable-paths-080) it has mounted (0.8.0+): `immutable paths v3 (mounted read-only)`. |
|
|
@@ -1122,6 +1215,7 @@ For live progress events, use the SDK's `onProgress`.
|
|
|
1122
1215
|
```sh
|
|
1123
1216
|
printf %s "$OPENAI_API_KEY" | shard secrets create OPENAI_API_KEY # value from standard input
|
|
1124
1217
|
shard secrets create DATABASE_URL --from-file ./database-url.txt # or from a file
|
|
1218
|
+
shard secrets create GITHUB_TOKEN --ask # or typed in a page shard opens (0.22.0+)
|
|
1125
1219
|
shard ws open acme/demo --template python-node-browser --secret OPENAI_API_KEY --secret DATABASE_URL
|
|
1126
1220
|
shard ws exec acme/demo -- python3 agent.py # sees both as environment variables
|
|
1127
1221
|
shard ws secrets acme/demo # names and status, never values
|
|
@@ -1149,7 +1243,9 @@ printf %s "$NEW_KEY" | shard secrets rotate OPENAI_API_KEY
|
|
|
1149
1243
|
- **`--json`:** stdout carries the API's own objects:
|
|
1150
1244
|
- `workspaces open`/`get` print the workspace view; `list` prints `{data, next_cursor}`.
|
|
1151
1245
|
- Lifecycle commands print the operation; `fork` prints `{operation, workspace}`.
|
|
1152
|
-
- `login`/`whoami` print `{api_url, organization_id, project_id, api_key:{id,key_id}, tool_permissions}
|
|
1246
|
+
- `login`/`whoami` print `{api_url, organization_id, project_id, api_key:{id,key_id}, tool_permissions}`; `whoami`
|
|
1247
|
+
adds `warnings` (`code`, `message`, `fix`) for a departed organization or a key in another accessible default
|
|
1248
|
+
organization (0.22.0+). Without a signed-in session, membership and default warnings are unavailable.
|
|
1153
1249
|
- `exec` prints `{session_id, exit_code, term_signal, timed_out, canceled, stdout, stderr, truncated, reconnects}`.
|
|
1154
1250
|
On a file-first workspace (0.5.0+), `exec` and `executions get` print the execution (see
|
|
1155
1251
|
[File-first workspaces](#file-first-workspaces)).
|
|
@@ -1345,17 +1441,39 @@ Run `shard ./` in your project to start Claude Code or Codex, usable immediately
|
|
|
1345
1441
|
|
|
1346
1442
|
New project folders are ready to use: `shard ./` and `shard agents new` initialize Git on `main` when needed and create an empty initial commit (CLI 0.14.2+). Existing files and staged work stay yours; the initial commit contains no files. Repositories without commits keep their current branch. If Git identity is missing, that one commit uses `Shardflux <noreply@shardflux.dev>` without changing your Git configuration.
|
|
1347
1443
|
|
|
1444
|
+
Machine saves require a machine source VM (`labels.shard_layer = "machine"`). On your computer, run
|
|
1445
|
+
`shard machine open --json`, make changes in that VM, then `shard machine save --wait`. The computer's CLI
|
|
1446
|
+
selects the machine VM; inside a VM, save uses that VM. A conversation or unmarked fork returns
|
|
1447
|
+
`filesystem_source_mismatch`: copy the intended files or repeat the install in the machine VM and save there.
|
|
1448
|
+
Project keys stay in their own project; a VM's native token cannot select another workspace.
|
|
1449
|
+
|
|
1348
1450
|
Your **machine** carries credentials, tools, dotfiles, logins and agent config; the project's **template** carries
|
|
1349
1451
|
toolchains, dependencies, services and project secrets. Both are private filesystem templates and include secrets
|
|
1350
1452
|
as ordinary files. Browser logins and Claude/Codex config belong to the machine. Set up tools and secrets normally inside the VM;
|
|
1351
|
-
your agent uses the
|
|
1453
|
+
your agent uses the matching machine or project save/rollback commands in its source VM. An agent working from your computer builds the machine with
|
|
1352
1454
|
`shard machine open` (0.17.1+): it creates or resumes the machine VM without attaching and prints its key for
|
|
1353
1455
|
`shard ws exec` and `shard files write`. `shard machine setup --from-this-computer` (0.20.0+) does it for you: your own
|
|
1354
1456
|
Claude Code (`claude -p`, else Codex) recreates this computer's CLIs and tools, language runtimes, shell config and
|
|
1355
1457
|
aliases, git identity and dotfiles on the machine, on your subscription, then saves it. On this computer it only reads;
|
|
1356
1458
|
`~/.ssh`, keychains, `.env`, token and credential files are never read. The apps and the first run start it once,
|
|
1357
|
-
right after you connect your agents.
|
|
1459
|
+
right after you connect your agents. `shard machine setup --status` shows the machine as your account has it, in the
|
|
1460
|
+
same line the apps show: ready, saving (with its place in the queue), or the one command to run next (0.22.0+); `shard
|
|
1461
|
+
setup --inspect --json` carries it as `onboarding.machine`. `connections_ready` (and the legacy `ready` field) means
|
|
1462
|
+
your account and an agent are connected; it does not mean tools from this computer carry over. `machine_ready`
|
|
1463
|
+
requires a ready saved version. The row names the version in use, a failed build's full error and recovery, or no
|
|
1464
|
+
saved version. An older API reports `unavailable`; a failed check reports `unknown`, with `version: null` when it
|
|
1465
|
+
could not be read. Conversations can start while the machine is not ready (0.22.0+).
|
|
1466
|
+
Setup checks the granted disk limit and available space before installing;
|
|
1467
|
+
tools that do not fit are reported as skipped. A failed agent-config copy, an explicit Claude tool permission refusal, an agent that
|
|
1468
|
+
never reaches the VM, or an absent setup report stops before saving (0.22.0+). A permission refusal is not retried
|
|
1469
|
+
through another agent. Setup never changes your plan or disk caps. Run the command
|
|
1470
|
+
again after resolving the reported refusal or limit.
|
|
1471
|
+
Every agent starts from the saved machine and project template when available. Save or roll back with `shard machine save|rollback` and
|
|
1358
1472
|
`shard template save|rollback`; changed files reach running agents live, software at the next start.
|
|
1473
|
+
`shard template delete` (0.22.0+) starts a project over from your machine: its saved versions go, new conversations
|
|
1474
|
+
start from your machine until setup saves a new one, and VMs running on it keep their files. In a terminal it asks
|
|
1475
|
+
first; scripts and agents pass `--yes`. `shard template` says when a template nobody used for 30 days follows your
|
|
1476
|
+
machine on its next use (0.20.0+).
|
|
1359
1477
|
|
|
1360
1478
|
Skills, commands, agents, output styles, memories and `CLAUDE.md` / `AGENTS.md` lines that Claude or Codex saves in a
|
|
1361
1479
|
cloud conversation come back to this computer by themselves, seconds after the turn ends, and into your saved
|
|
@@ -1363,6 +1481,9 @@ machine too (0.20.0+). A file you changed here at the same time keeps your versi
|
|
|
1363
1481
|
(`CLAUDE.cloud.md`); a deleted one goes to the Trash. Project memory follows the project both ways. The menu bar says
|
|
1364
1482
|
what arrived in one line, and `agent-config-return.jsonl` in the config directory lists every change.
|
|
1365
1483
|
`shard machine save --wait` and `shard template save --wait` return once the new version is ready (0.13.3+).
|
|
1484
|
+
A version larger than the plan's workspace disk names its size and the disk, with `retryable: false` and a hint: delete
|
|
1485
|
+
what the VM does not need, then save again, or move to a plan with a larger disk (`shard billing plans`); `--json`
|
|
1486
|
+
`details` carry `error_code`, `limit`, `value` and `actual` (0.22.0+).
|
|
1366
1487
|
Software installed under the home goes into the saved image, linked back at the same path; the save line names those
|
|
1367
1488
|
folders, and `--json` carries `moved_to_image` (0.18.0+).
|
|
1368
1489
|
`shard ./ codex` (or `claude`; `--codex` and `--claude` also work, 0.14.4+) starts that agent directly; `shard agents targets <project>/<agent>` lists each
|
|
@@ -1402,22 +1523,30 @@ Volume lists and details (0.14.0+) show `kind`. Project spaces show their measur
|
|
|
1402
1523
|
|
|
1403
1524
|
### Claude and ChatGPT/Codex accounts (0.18.0+)
|
|
1404
1525
|
|
|
1405
|
-
`shard agents accounts` lists your Claude and ChatGPT/Codex accounts with their plan, status,
|
|
1406
|
-
and how much of each usage window is left:
|
|
1526
|
+
`shard agents accounts` lists your Claude and ChatGPT/Codex accounts with their plan, status, which one is active
|
|
1527
|
+
(0.22.0+) and how much of each usage window is left:
|
|
1407
1528
|
|
|
1408
1529
|
```
|
|
1409
1530
|
Claude
|
|
1410
|
-
claude:1 marc@example.com (Max,
|
|
1531
|
+
claude:1 marc@example.com (Max, active) · Signed in
|
|
1411
1532
|
5-hour 43% (resets in 2h 10m) · Weekly 18% (resets in 4d 8h)
|
|
1533
|
+
claude:2 ops@example.com (Team) · Signed in
|
|
1534
|
+
5-hour 12% (resets in 4h 5m) · Weekly 9% (resets in 6d 2h)
|
|
1412
1535
|
ChatGPT / Codex
|
|
1413
|
-
codex:1 marc@example.com (Pro,
|
|
1536
|
+
codex:1 marc@example.com (Pro, active) · Signed in
|
|
1414
1537
|
5-hour 12% (resets in 3h 30m) · Weekly 35% (resets in 4d 23h)
|
|
1538
|
+
Switch Claude: shard agents accounts use claude:<n>
|
|
1415
1539
|
```
|
|
1416
1540
|
|
|
1541
|
+
Each provider has one active account (0.22.0+). Its login is the one your conversations use: new conversations start
|
|
1542
|
+
with it and running ones switch to it. `shard agents accounts use claude:2` makes another account active; running
|
|
1543
|
+
Claude conversations continue on it and Remote Control turns back on by itself, and Codex Cloud moves to the active
|
|
1544
|
+
ChatGPT account. Organization owners and admins choose the active account: a team account, or their own personal one.
|
|
1545
|
+
Another member's personal account can be made active only by that member.
|
|
1546
|
+
|
|
1417
1547
|
`shard agents accounts usage` shows every window as a bar. `shard agents accounts add claude` (or `codex`) signs in
|
|
1418
|
-
another account in a cloud VM
|
|
1419
|
-
|
|
1420
|
-
removes it. `--json` prints the API's account list.
|
|
1548
|
+
another account in a cloud VM and `shard agents accounts remove claude:2` removes one. To remove someone else's active
|
|
1549
|
+
account, make another one active first; your own you can always remove. `--json` prints the API's account list.
|
|
1421
1550
|
|
|
1422
1551
|
## Conversations
|
|
1423
1552
|
|
|
@@ -1432,6 +1561,27 @@ Conversation JSON includes `join_mode` and the worktree used by reviewers and wo
|
|
|
1432
1561
|
|
|
1433
1562
|
`shard conversations resume <id>` continues a saved conversation in a fresh VM under the same identity (0.14.0+). `shard ./ --resume` uses this same path. `shard conversations reader <project-id>` opens a small read-only workspace for saved branches and transcripts; the Mac transcript mirror opens it automatically when no project VM is live. Adaptive idle reclaims the reader.
|
|
1434
1563
|
|
|
1564
|
+
### Starting from your working state (0.22.0+)
|
|
1565
|
+
|
|
1566
|
+
A new conversation starts from your worktree as it is: committed history, uncommitted edits, untracked files and your
|
|
1567
|
+
`.env` files. Its VM gets them from a project cache that every VM of the project shares, so a start sends only what the
|
|
1568
|
+
cache lacks: a second conversation on the same state sends nothing, and a one-file edit sends its delta. Parts travel
|
|
1569
|
+
in parallel and resume where they stopped. Large untracked images, audio and video land as files the conversation's
|
|
1570
|
+
Git ignores, as yours does, and large ones keep arriving after the agent has your prompt.
|
|
1571
|
+
|
|
1572
|
+
### Prepared projects (0.22.0+)
|
|
1573
|
+
|
|
1574
|
+
```sh
|
|
1575
|
+
shard projects sync add ~/code/web # keep this project ready for new conversations
|
|
1576
|
+
shard projects sync list # selected projects and their state
|
|
1577
|
+
shard projects sync pause ~/code/web # stop preparing it (remove: forget it)
|
|
1578
|
+
```
|
|
1579
|
+
|
|
1580
|
+
The device helper (started by the menu bar or the Linux app) prepares each selected project in a short-lived VM: it
|
|
1581
|
+
puts the project's current state in the project cache, and when its dependency files change, installs them and saves
|
|
1582
|
+
the project template. Conversations then start without sending the project, with dependencies installed. Only the
|
|
1583
|
+
projects you add are prepared; onboarding and Settings → Projects in both desktop apps choose them too.
|
|
1584
|
+
|
|
1435
1585
|
### Menu bar conversation shortcut (0.15.0+)
|
|
1436
1586
|
|
|
1437
1587
|
The macOS menu bar's **New conversation** action (menu bar 0.3.0+) opens the same launcher as **Option-Shift-Space**. It requires a task and project, remembers Claude/Codex, and invokes the commands below. Configure the hotkey in the macOS Settings window (⌘,), with conflict detection and a fallback.
|
|
@@ -1456,3 +1606,20 @@ New Codex conversations use `shard agents new --app codex --path <directory>` or
|
|
|
1456
1606
|
`shard setup` uses your existing Codex ChatGPT login to register one executor for the account. Its small connector workspace stays resident and is billed as ordinary workspace memory/CPU usage, including while conversations wait. Use `--no-codex` to skip setup, `shard agents codex status` to inspect it, or `shard agents codex disable` to remove the executor and release its residency. Conversation VMs wake for tools and follow the normal adaptive idle policy afterwards.
|
|
1457
1607
|
|
|
1458
1608
|
Explicit `agents new --in terminal`, `--in t3`, and `--like` launches keep their existing VM routes. Local Git is prepared and validated before Cloud enrollment. This branch's Cloud feature is awaiting release. Existing local-mode conversations keep their original route. Cloud uses OpenAI's model/configuration capabilities; local app-server plugins and settings are not automatically transferred.
|
|
1609
|
+
|
|
1610
|
+
Save progress (0.22.0+): Machine and template saves show source size and an estimated duration, then queued/build state and phase updates immediately. With `--json`, progress events go to stderr and the final stdout document includes `preflight` and `phases`. Failure and timeout output retain the latest counters and `details.last_progress`, with the build id and recovery action. If an older API cannot expose the build, JSON stderr emits `save_started` with the version/build id and leaves the phase unknown. Missing final host reports preserve the last observed progress.
|
|
1611
|
+
|
|
1612
|
+
Desktop launch cards (0.22.0+): the bundled desktop apps clear and close the launcher on submission, then show each pending start in a layered card stack near the top of the display. **Show all launches** expands individual statuses and recovery.
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
### Pending execution cancellation (0.23.0+)
|
|
1616
|
+
|
|
1617
|
+
On guests advertising `exec_cancel_pending.v1`, successful cancellation can return the actual `running` state
|
|
1618
|
+
with `canceled: true` while the kernel holds a killed process. The execution's `error` explains pending drain,
|
|
1619
|
+
and becomes unverified after 30 seconds without claiming an exit or freeing ownership. Read/follow that
|
|
1620
|
+
session until its real final status; repeat cancellation is idempotent. An already exited foreground keeps
|
|
1621
|
+
its result while descendant drain can remain pending. TS/Python agent tools and MCP expose the reason as
|
|
1622
|
+
`status_reason` and keep the exit code null while active. CLI prints the reason and follow command.
|
|
1623
|
+
Older clients read the same session response fields.
|
|
1624
|
+
|
|
1625
|
+
Cloud history (0.23.0+): `shard agents open <conversation-id> --original` opens the original chat; `--history <thread-id>` opens an earlier linked chat. `--json` includes `previous_threads` with each history URL. Sign in with the Codex account that owns the selected chat.
|
package/dist/account-args.js
CHANGED
|
@@ -206,8 +206,8 @@ export const ACCOUNT_COMMANDS = [
|
|
|
206
206
|
activity: { type: 'boolean', description: 'With --inspect: the current commands, listening ports, sudo installs and browser window of --workspace, without waking it.' },
|
|
207
207
|
workspace: { type: 'string', value: '<key|conv_id>', description: 'The workspace or conversation to inspect for live onboarding activity.' },
|
|
208
208
|
inspect: { type: 'boolean', description: 'Report the onboarding steps and verify every connection live (account, Claude, Codex) without changing anything.' },
|
|
209
|
-
apps: { type: 'string', multiple: true, value: '<claude,codex>', description: 'The apps to verify (default: the ones found on this
|
|
210
|
-
connect: { type: 'boolean', description: 'With --inspect: also copy this
|
|
209
|
+
apps: { type: 'string', multiple: true, value: '<claude,codex>', description: 'The apps to verify (default: the ones found on this computer). Repeatable or comma separated.' },
|
|
210
|
+
connect: { type: 'boolean', description: 'With --inspect: also copy this computer’s Codex login and enable the account’s Codex remote device when Codex is picked.' },
|
|
211
211
|
'retry-codex': { type: 'boolean', description: 'With --inspect --connect: start a Codex remote device that failed or is stuck starting again, once.' },
|
|
212
212
|
't3-connect': { type: 'boolean', description: 'With --inspect: start your T3 Connect sign-in for T3 Code (0.0.45, over SSH); the t3 row carries its page and code (t3_link). After it, your projects appear in T3 Code and the T3 app (0.19.0+).' },
|
|
213
213
|
'org-name': { type: 'string', value: '<name>', description: 'Name of the organization to create when you have none.' },
|
|
@@ -269,6 +269,11 @@ export const ACCOUNT_COMMANDS = [
|
|
|
269
269
|
options: { confirm: { type: 'string', value: '<slug>', description: 'The organization’s slug, typed out (required).' }, ...YES('the deletion') },
|
|
270
270
|
},
|
|
271
271
|
{ path: ['projects', 'list'], summary: 'List the organization’s projects (* marks the default)', positionals: [], options: { ...ORG } },
|
|
272
|
+
{ path: ['projects', 'sync', 'list'], summary: 'Show selected local projects and their preparation state', positionals: [], options: {} },
|
|
273
|
+
{ path: ['projects', 'sync', 'add'], summary: 'Prepare and keep this selected local project synced', positionals: [{ name: 'path', required: true }], options: { wait: { type: 'boolean', description: 'Prepare now and wait for its published environment; otherwise the device helper prepares it in the background.' } } },
|
|
274
|
+
{ path: ['projects', 'sync', 'pause'], summary: 'Pause background preparation of this local project', positionals: [{ name: 'path', required: true }], options: {} },
|
|
275
|
+
{ path: ['projects', 'sync', 'remove'], summary: 'Remove this local project from background preparation', positionals: [{ name: 'path', required: true }], options: {} },
|
|
276
|
+
{ path: ['projects', 'sync', 'run'], summary: 'Run selected-project preparation in the background', positionals: [], options: {}, hidden: true },
|
|
272
277
|
{
|
|
273
278
|
path: ['projects', 'create'],
|
|
274
279
|
summary: 'Create a project (owners and admins)',
|