Feat/cli improvements and new features cooked#5
Merged
Conversation
Add five CLI improvements to close the gap with modern cloud CLIs: 1. `--output json|yaml|table` global flag (-o) for structured output across all list and describe commands, enabling scripting and automation pipelines (e.g. `verda vm list -o json | jq`). 2. `verda completion` command for bash, zsh, fish, and powershell shell completions using Cobra's built-in generation. 3. `verda ssh <instance>` command to SSH into a running VM by hostname or ID. Resolves IP from the API and exec's into ssh. Supports --user, --key, and pass-through args via --. 4. `verda vm describe` and `verda volume describe` commands to show detailed info about a single resource (aliased as get/show), with full --output flag support. 5. `--wait` and `--wait-timeout` flags on vm create, vm action, volume create, and volume action. Generic polling utility with animated spinner for interactive use and silent mode for structured output. Includes 33 new unit tests covering all features. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add documentation for ssh, describe, completion commands, --output flag, structured output examples, and --wait flag. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add three new command groups:
- `verda images` — browse OS images with --type and --category
filters. Shows name, category, and details (e.g., CUDA version).
- `verda availability` — check instance type availability per
location. Supports --location, --type, and --spot flags.
Single-type check returns a boolean; full matrix shows all
available types per datacenter.
- `verda cost` — cost estimation, pricing, and billing:
- `estimate` — calculate hourly/daily/monthly costs for an
instance type + optional volumes, with spot pricing support
- `price-history` — show historical fixed and dynamic pricing
- `balance` — display current account balance
All commands support --output json/yaml for scripting.
Includes tests for cost math, formatting, and filtering logic.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The /instance-types/{type} endpoint returns 404. Fetch all instance
types and filter client-side instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Verda API requires lowercase 'usd', not 'USD'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The /instance-types/price-history endpoint has been removed by the API (410 Gone). Dynamic pricing is no longer supported. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
List available datacenter locations with code, name, and country. Supports --output json/yaml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- `verda cost running` shows burn rate of all running instances with per-instance breakdown including attached volume costs - Add scripts/live-test.sh for automated integration testing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When --output is json or yaml, return nil from Factory.Status() so spinners don't write escape codes to stdout and break piping. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- `verda instance-types` lists all types with specs and pricing, with --gpu, --cpu, and --spot filters. Groups output by GPU vs CPU. - `verda vm list` now prints a static table when stdout is piped or redirected, instead of launching the interactive picker. Interactive mode still works in a terminal. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Strip duplicate count prefix from API GPU descriptions (e.g., "1x 1x H100 SXM5 80GB" → "1x H100 SXM5") - Strip trailing VRAM from description (shown in separate column) - Format large RAM values as TB (e.g., 1440GB → 1.4TB) - Widen GPU column for longer names Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Compute max hostname length so columns stay aligned with long names. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Separate "Flags" from "Global Flags" in help output - Register --output flag completion values (json/yaml/table) - Remove dead JSON bool field from vm list options - Fix Poll() timeout to return error instead of nil - Consolidate duplicate polling code from status_view.go into shared wait.go - Centralize status messages and terminal statuses in status_messages.go - Add interactive picker for verda ssh (no-arg shows running instances) - Add interactive picker for vm describe and volume describe (no-arg shows list) - Add reusable TestFactory in cmd/util/testing.go for command-level tests - Add arg-validation and status message tests - Fix pre-existing lint issues (stuttering type names, hugeParam, goimports) - Ignore .ai/notes/ and docs/plans/ in .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Version: show human-readable text by default, JSON only with -o json - Image: show image slug instead of volume name, append OS name if different - Compute: strip duplicate "1x" prefix from GPU description - Pricing: remove redundant field (only fixed pricing exists) - Storage Status: show actual status (attached/detached) with "(OS)" label Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Full build details still available via verda version -o json. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Joins instance type specs, pricing, and live availability data into a single view — sorted by price, filterable by location, type, kind, and spot. Addresses user request for a native alternative to the Python availability script. Usage: verda vm availability verda vm availability --location FIN-01 --kind gpu --spot verda vm availability -o json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ssh.go: suppress G204 for intentional syscall.Exec into ssh - images_test.go, instancetypes_test.go: use empty slice instead of nil to avoid G602 false positive on nil range Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Description
Type of Change
Checklist
.ai/skills/new-command.md)go build ./...passesgo test ./...passes--debugoutput included for API-calling commands