feat(claude-skill): add Claude Code skill installer command#284
Open
feat(claude-skill): add Claude Code skill installer command#284
Conversation
Add stdin piping and improved output for CLI composability.
Stop/Start/Delete:
- Accept instance names from stdin (one per line)
- Accept multiple instance names as arguments
- Output instance names when piped for chaining
- Add --all flag to stop command
Ls improvements:
- Add --json flag for JSON output
- Output plain table when piped (for grep/awk)
- Add JSON and pipe support to ls orgs
Examples:
brev ls | awk '/RUNNING/ {print $1}' | brev stop
brev ls | grep "test-" | awk '{print $1}' | brev delete
brev ls --json | jq '.[] | select(.status == "RUNNING")'
brev stop --all
- Extract trackLsAnalytics() in ls.go - Extract runBatchStart() and runSingleStart() in start.go Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Member
Author
Manual QA Results
|
- Consolidate duplicate isStdoutPiped() from delete, ls, start, stop - Consolidate duplicate getInstanceNames() from delete, stop - Consolidate duplicate getInstanceNamesFromStdin() from start - Create IsStdoutPiped(), IsStdinPiped(), GetInstanceNames(), GetInstanceNamesWithPipeInfo() - Remove ~108 lines of duplicated code
- Return errors from runBatchStart instead of silently swallowing them - Remove unused Piped field from StartOptions - Add scanner.Err() check after stdin scan loop in piping.go
- Add ExitCodeError type to distinguish failure modes - Batch start returns exit code 2 for partial failure, 1 for all failed - main.go propagates custom exit codes from ExitCodeError
Address drewmalin's review: don't send names to stdout when there are partial failures, since the next piped command would act on them even without pipefail. Also send admin delete message to stderr instead of stdout, and remove unused ExitCodeError type.
Add `brev claude-skill` command to install the brev-cli skill for Claude Code AI assistant. The skill enables natural language GPU instance management. Features: - `brev claude-skill` command to install/uninstall - Automatic prompt during `brev login` if Claude detected - Standalone bash installer for non-brev users - Full skill with prompts, examples, and reference docs The skill enables commands like: - "Create an A100 instance for ML training" - "Search for GPUs with 40GB VRAM" - "Stop all my running instances" Install via: brev claude-skill # or curl -fsSL https://raw.githubusercontent.com/brevdev/brev-cli/main/scripts/install-claude-skill.sh | bash
Use explicit octal notation (0o755, 0o644) for file permissions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allows testing skill installation from a different branch: BREV_SKILL_BRANCH=pr/claude-skill brev claude-skill Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the env var option for installing from a specific branch when using the `brev claude-skill` CLI command. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Documents the vision for making Brev CLI more Unix-idiomatic and agent-friendly, including: - Pipe detection and output format switching - Implemented pipeable commands (ls, search, stop, start, delete, create) - Search filters (--stoppable, --min-disk, etc.) - JSON output mode - Example workflows for batch operations - Future plans: brev logs, brev wait, pipeable brev cp
Skills bridge raw CLI and natural language by providing: - Natural language to CLI translation - Context-aware defaults for ML workloads - Error recovery and retry logic - Workflow orchestration Added example of autonomous training job workflow.
3e0539d to
0441d5b
Compare
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
brev claude-skillcommand to install/uninstall the Claude Code skillbrev loginflow (detects if Claude Code is installed)Test plan
brev claude-skillto install the skill (requires post-merge testing - downloads from main)brev claude-skill --uninstallto remove itbrev loginand verify skill installation prompt appears when Claude Code is detected (requires integration testing)curl -fsSL https://raw.githubusercontent.com/brevdev/brev-cli/main/scripts/install-claude-skill.sh | bash(requires post-merge testing)Note: Install tests require post-merge testing since the command downloads skill files from the
mainbranch on GitHub.