feat: tab completion, command cleanup, presign --key, fork rework#27
Merged
Conversation
Adds a position-aware completer covering built-in bash commands (via just-bash's getCommandNames), REPL + custom commands, bucket names for mount/snapshot/fork/forks, mount points for umount/flush, and filesystem paths inside the virtual FS. Also ignore .claude/ session files so they don't trip the pre-commit biome check. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add src/commands/args.ts with argError/sdkError/parseFlags helpers so error formatting is consistent and unknown options / missing values are rejected up front. - Tighten presign, snapshot, fork parsers: reject unknown flags and extra positional args, validate --expires as a positive integer, forbid --name+--list, distinguish missing source vs missing name, reject source == name. - Print 'No snapshots.' / 'No forks.' on stdout when listings are empty (matching df's pattern), instead of silent output. - Merge the standalone 'forks' command into 'fork --list'. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
just-bash v3 enabled defense-in-depth by default, which blocks process.env reads during script execution. The Tigris/AWS SDK reads env (e.g. AWS_PROFILE) inside TigrisAdapter, so ls inside a mounted bucket threw a SecurityViolationError. We don't enable js-exec / python / node, so the sandbox provides no value in our setup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- presign: add --key flag. Wins over config.accessKeyId when both exist, required when logged in via 'login' (no access key in session). Passed to GetPresignedUrlOptions.accessKeyId so the URL signer is whatever the user names. - snapshot: <bucket> is now optional; falls back to the cwd's mounted bucket via the shell's resolveBucket helper. - fork: same cwd fallback for <source-bucket>; the previous <fork-name> positional becomes a --name flag, so the shape is fork [<source>] --name <name> [--snapshot V] for create and fork [<source>] --list for listing. Help text and tests updated to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
katieschilling
approved these changes
May 21, 2026
|
🎉 This PR is included in version 0.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/commands/args.tshelper withargError/sdkError/parseFlags— used by all custom commands so error formatting is consistent and unknown options / missing values are rejected up front.presign,snapshot,fork: reject unknown flags / extra positionals, validate--expires, forbid conflicting flags, distinguish missing source vs missing name.No snapshots./No forks.(instead of silent output) when listings are empty.forksintofork --list.presign --key <accessKeyId>— wins overconfig.accessKeyId; required when logged in vialogin(no access key in session). Passed viaGetPresignedUrlOptions.accessKeyId.snapshot [<bucket>]andfork [<source-bucket>]— bucket positional is now optional; falls back to the cwd's mounted bucket.forkreshape:<fork-name>positional becomes--name <fork-name>flag. New shape:defenseInDepth. It was blocking the Tigris/AWS SDK'sprocess.envreads insideTigrisAdapter, solsinside a mounted bucket threw aSecurityViolationError..gitignore: ignore.claude/so local Claude Code session files don't trip the pre-commit biome hook.161 tests, all passing.
Test plan
lsworks inside a mounted bucket (was failing onfeat/auto-completebefore the defense-in-depth fix).pres<TAB>,gr<TAB>), a partial bucket (mount my<TAB>), and a partial path (ls /work<TAB>).presign /file.txtworks afterconfigure; errors with a usage message afterloginuntil you pass--key tid_xxx.snapshot,snapshot --list,fork --name newbucket,fork --listall work without naming the bucket.(cwd not in a mounted bucket).🤖 Generated with Claude Code
Note
Medium Risk
Medium risk due to upgrading core deps (
just-bash,@tigrisdata/storage) and disablingjust-bashdefenseInDepth, which changes runtime sandboxing behavior and could affect execution/security expectations.Overview
REPL UX: Adds async tab-completion via
ReplSession.complete()and newrepl/complete.ts, completing command names (REPL + custom +just-bash), bucket names, mount points, and virtual-FS paths.Command cleanup: Introduces
commands/args.ts(parseFlags,argError,sdkError) and refactorspresign,snapshot, andforkto reject unknown flags/extra positionals, validate values, and format errors consistently.presignnow supports--key(required for OAuth sessions) and passesaccessKeyIdtogetPresignedUrl;snapshot/forkcan omit the bucket/source and fall back to the cwd mount, and empty listings now printNo snapshots./No forks..Fork rework: Removes the separate
forkscommand and replaces listing withfork --list; creation now usesfork [<source>] --name <fork> [--snapshot …]and uses SDKlistForks.Runtime/tooling: Disables
just-bashdefenseInDepthinTigrisShellto avoid SDKprocess.envblocking, bumps multiple deps (notablyjust-bashv3,@tigrisdata/storage), and updates ignores/lint config to exclude.claude/. Tests are expanded substantially to cover new parsing and completion behavior.Reviewed by Cursor Bugbot for commit 8eb642a. Bugbot is set up for automated code reviews on this repo. Configure here.