CLI: non-interactive mode for capsule export#13
Closed
Angelmmiguel wants to merge 1 commit intomainfrom
Closed
Conversation
Replace manual process.argv parsing with commander for subcommand routing, option parsing, and help/version generation. Refactor resolveSession() to support agent:sessionId specifiers and dual-mode (interactive/non-interactive) operation. Add resolveAnonymization() with --anonymize flag support (all/none/comma-separated keys). The export command now works in non-TTY contexts with --output, --format, and --anonymize flags. Co-Authored-By: Rover <noreply@endor.dev>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
capsule | e55a6fd | Commit Preview URL Branch Preview URL |
Feb 23 2026, 11:32 AM |
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
process.argvhandling tocommander, defining all subcommands (share,export,serve) as proper commander commands--output,--anonymize, and--formatflags tocapsule export(and partially toshare) for fully non-interactive usage in CI/scriptsagent:sessionIdshorthand (e.g.,claude:abc123) in addition to file paths--anonymize all, auto-generated output name), failing early if required info is missingCloses #11
Changes
packages/cli/src/index.ts— Replaced manual argv parsing withcommanderprogram and subcommand definitionspackages/cli/src/commands/export.ts— Added--output,--anonymize,--formatoptions; non-interactive mode supportpackages/cli/src/commands/share.ts— Adapted to commander; added--formatand--anonymizeoptionspackages/cli/src/commands/serve.ts— Adapted to commanderpackages/cli/src/flows/session.ts— Addedagent:idshorthand resolution, format flag fallback, non-TTY error handlingpackages/cli/src/flows/anonymize-prompt.ts— Accept pre-selected anonymization options, skip prompt when fully specifiedpackages/cli/package.json— Addedcommanderdependencypnpm-lock.yaml— Updated lockfile