From 8ec2d1cdf4d54d1fcdfbb284285943ed51f71376 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 7 Oct 2026 17:39:07 +0000 Subject: [PATCH 1/2] docs(agent-shell): update fork command syntax in readme The README still showed the old positional `fork ` form, a separate `forks` command, and a `createForksListCommand` export, none of which exist anymore. Document `fork [] --name [--snapshot ]` and `fork --list`, drop the removed export, and fix a few other drifted spots: add `presign --key`, add `forcePathStyle` to the `TigrisConfig` shape, and switch the development commands from npm to pnpm. Assisted-by: Claude Opus 5.5 via Claude Code Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_015Qg5NUvpUUpqnqd6ow5Xdv --- .changeset/agent-shell-readme-fork-syntax.md | 5 ++ packages/agent-shell/README.md | 54 +++++++++----------- 2 files changed, 29 insertions(+), 30 deletions(-) create mode 100644 .changeset/agent-shell-readme-fork-syntax.md diff --git a/.changeset/agent-shell-readme-fork-syntax.md b/.changeset/agent-shell-readme-fork-syntax.md new file mode 100644 index 00000000..0f3e60c2 --- /dev/null +++ b/.changeset/agent-shell-readme-fork-syntax.md @@ -0,0 +1,5 @@ +--- +'@tigrisdata/agent-shell': patch +--- + +Update the README to the current `fork` syntax: `fork [] --name [--snapshot ]` creates a fork and `fork [] --list` lists forks. The removed `forks` command and `createForksListCommand` export are no longer documented. diff --git a/packages/agent-shell/README.md b/packages/agent-shell/README.md index b1de380f..1b71db89 100644 --- a/packages/agent-shell/README.md +++ b/packages/agent-shell/README.md @@ -145,6 +145,7 @@ Generate presigned URLs for sharing or uploading. presign /path/to/file.txt # GET URL, 1 hour expiry presign /path/to/file.txt --expires 7200 # GET URL, 2 hour expiry presign /path/to/file.txt --put # PUT URL for uploads +presign /path/to/file.txt --key tid_... # Sign with this access key (required after 'login') ``` ### snapshot @@ -159,19 +160,13 @@ snapshot my-bucket --list # List all snapshots ### fork -Branch your dataset. Create a copy-on-write fork for safe experimentation. +Branch your dataset. Create a copy-on-write fork for safe experimentation, or list the forks of a bucket. ```bash -fork source-bucket my-fork # Fork a bucket -fork source-bucket my-fork --snapshot 1713200000 # Fork from a specific snapshot -``` - -### forks - -List forks of a bucket. - -```bash -forks my-bucket +fork source-bucket --name my-fork # Fork a bucket +fork source-bucket --name my-fork --snapshot 1713200000 # Fork from a specific snapshot +fork --name my-fork # Fork the bucket mounted at the current directory +fork source-bucket --list # List forks of a bucket ``` ## Multi-Bucket @@ -239,11 +234,11 @@ await bash.exec("cp /datasets/data.csv ./local.csv"); ### `@tigrisdata/agent-shell` -| Export | Description | -| -------------- | ----------------------------------------------------------------------------------------------------- | -| `TigrisShell` | Main class — persisted storage shell backed by Tigris | -| `TigrisConfig` | Config type: `{ accessKeyId?, secretAccessKey?, sessionToken?, organizationId?, bucket?, endpoint? }` | -| `ShellOptions` | Shell options type: `{ cwd?, env? }` | +| Export | Description | +| -------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `TigrisShell` | Main class — persisted storage shell backed by Tigris | +| `TigrisConfig` | Config type: `{ accessKeyId?, secretAccessKey?, sessionToken?, organizationId?, bucket?, endpoint?, forcePathStyle? }` | +| `ShellOptions` | Shell options type: `{ cwd?, env? }` | #### `TigrisShell` @@ -269,13 +264,12 @@ new TigrisShell(config: TigrisConfig, shellOptions?: ShellOptions) ### `@tigrisdata/agent-shell/commands` -| Export | Description | -| -------------------------------- | ---------------------------- | -| `createTigrisCommands(config)` | Create all Tigris commands | -| `createPresignCommand(config)` | Create presign command only | -| `createSnapshotCommand(config)` | Create snapshot command only | -| `createForkCommand(config)` | Create fork command only | -| `createForksListCommand(config)` | Create forks command only | +| Export | Description | +| ------------------------------- | ---------------------------- | +| `createTigrisCommands(config)` | Create all Tigris commands | +| `createPresignCommand(config)` | Create presign command only | +| `createSnapshotCommand(config)` | Create snapshot command only | +| `createForkCommand(config)` | Create fork command only | ## Examples @@ -291,21 +285,21 @@ All examples require `TIGRIS_STORAGE_ACCESS_KEY_ID`, `TIGRIS_STORAGE_SECRET_ACCE ## Development ```bash -# Install dependencies -npm install +# Install dependencies (from the monorepo root) +pnpm install # Type check -npm run typecheck +pnpm --filter @tigrisdata/agent-shell typecheck # Lint and format -npm run lint -npm run lint:fix +pnpm --filter @tigrisdata/agent-shell lint +pnpm --filter @tigrisdata/agent-shell lint:fix # Run tests -npm test +pnpm --filter @tigrisdata/agent-shell test # Build -npm run build +pnpm --filter @tigrisdata/agent-shell build ``` ## License From 9ba227574e58f94588548f50e068dce6119abbf3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 7 Oct 2026 17:40:18 +0000 Subject: [PATCH 2/2] docs(agent-shell): use fork --name in snapshot-and-fork example The example still called `fork ` with two positional arguments, which the current fork command rejects. Pass the fork name with `--name` instead. Assisted-by: Claude Opus 5.5 via Claude Code Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_015Qg5NUvpUUpqnqd6ow5Xdv --- packages/agent-shell/examples/snapshot-and-fork.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/agent-shell/examples/snapshot-and-fork.ts b/packages/agent-shell/examples/snapshot-and-fork.ts index 9258e373..b2bf480c 100644 --- a/packages/agent-shell/examples/snapshot-and-fork.ts +++ b/packages/agent-shell/examples/snapshot-and-fork.ts @@ -22,7 +22,7 @@ console.log('Snapshot:', snap.stdout.trim()); // Create a fork to experiment safely const forkName = `${bucket}-experiment`; -const fork = await shell.exec(`fork ${bucket} ${forkName}`); +const fork = await shell.exec(`fork ${bucket} --name ${forkName}`); console.log('Fork created:', fork.stdout.trim()); // List snapshots