|
1 | | -# verda |
| 1 | +# Verda CLI |
2 | 2 |
|
3 | | -verda command-line application |
| 3 | +Command-line interface for [Verda Cloud](https://verda.com) — manage VMs, volumes, SSH keys, startup scripts, and more from your terminal. |
4 | 4 |
|
5 | | -## Prerequisites |
| 5 | +## Install |
6 | 6 |
|
7 | | -- **Go 1.25+** |
8 | | -- **golangci-lint** (optional, for linting) |
| 7 | +### Quick install (macOS / Linux) |
9 | 8 |
|
10 | | -## Quick Start |
| 9 | +```bash |
| 10 | +curl -sSL https://raw.githubusercontent.com/verda-cloud/verda-cli/main/scripts/install.sh | sh |
| 11 | +``` |
| 12 | + |
| 13 | +Install to a custom directory: |
| 14 | + |
| 15 | +```bash |
| 16 | +VERDA_INSTALL_DIR=~/.local/bin curl -sSL https://raw.githubusercontent.com/verda-cloud/verda-cli/main/scripts/install.sh | sh |
| 17 | +``` |
| 18 | + |
| 19 | +Install a specific version: |
| 20 | + |
| 21 | +```bash |
| 22 | +VERDA_VERSION=v1.0.0 curl -sSL https://raw.githubusercontent.com/verda-cloud/verda-cli/main/scripts/install.sh | sh |
| 23 | +``` |
| 24 | + |
| 25 | +### Manual download |
| 26 | + |
| 27 | +Download the binary for your platform from [GitHub Releases](https://github.com/verda-cloud/verda-cli/releases): |
11 | 28 |
|
12 | | -### Build |
| 29 | +| Platform | File | |
| 30 | +|----------|------| |
| 31 | +| macOS (Apple Silicon) | `verda_VERSION_darwin_arm64.tar.gz` | |
| 32 | +| macOS (Intel) | `verda_VERSION_darwin_amd64.tar.gz` | |
| 33 | +| Linux (x86_64) | `verda_VERSION_linux_amd64.tar.gz` | |
| 34 | +| Linux (ARM64) | `verda_VERSION_linux_arm64.tar.gz` | |
| 35 | +| Windows (x86_64) | `verda_VERSION_windows_amd64.zip` | |
| 36 | +| Windows (ARM64) | `verda_VERSION_windows_arm64.zip` | |
| 37 | + |
| 38 | +Extract and move to your PATH: |
| 39 | + |
| 40 | +```bash |
| 41 | +tar xzf verda_*.tar.gz |
| 42 | +sudo mv verda /usr/local/bin/ |
| 43 | +``` |
| 44 | + |
| 45 | +### Go install (for Go developers) |
13 | 46 |
|
14 | 47 | ```bash |
15 | | -make build |
| 48 | +go install github.com/verda-cloud/verda-cli/cmd/verda@latest |
16 | 49 | ``` |
17 | 50 |
|
18 | | -### Run |
| 51 | +### Verify installation |
19 | 52 |
|
20 | 53 | ```bash |
21 | | -./bin/verda --help |
| 54 | +verda version |
22 | 55 | ``` |
23 | 56 |
|
24 | | -## Development |
| 57 | +## Getting Started |
| 58 | + |
| 59 | +### 1. Configure credentials |
25 | 60 |
|
26 | 61 | ```bash |
27 | | -make test # Run all tests |
28 | | -make lint # Run linter |
29 | | -make lint.fix # Auto-fix lint issues |
30 | | -make clean # Remove build artifacts |
| 62 | +verda auth login |
31 | 63 | ``` |
32 | 64 |
|
33 | | -### Git hooks (optional) |
| 65 | +This starts an interactive wizard to save your API credentials to `~/.verda/credentials`. |
34 | 66 |
|
35 | | -Sample pre-commit script lives in **`githooks/pre-commit`** (runs `go build`, `go vet`, optional `golangci-lint`, and short tests for affected packages). Wire it once per clone: |
| 67 | +### 2. List your VMs |
36 | 68 |
|
37 | 69 | ```bash |
38 | | -make hooks.install # sets git config core.hooksPath to githooks/ |
| 70 | +verda vm list |
39 | 71 | ``` |
40 | 72 |
|
41 | | -> **Note:** The template repo’s **`hooks/`** directory is only for `verdactl` post-generation scripts and is not part of the scaffolded project. Use **`githooks/`** for git hooks in generated apps. |
| 73 | +### 3. Create a VM |
42 | 74 |
|
43 | | -## Project Structure |
| 75 | +```bash |
| 76 | +# Interactive wizard |
| 77 | +verda vm create |
| 78 | + |
| 79 | +# Non-interactive |
| 80 | +verda vm create \ |
| 81 | + --kind gpu \ |
| 82 | + --instance-type 1V100.6V \ |
| 83 | + --location FIN-01 \ |
| 84 | + --os ubuntu-24.04-cuda-12.8-open-docker \ |
| 85 | + --os-volume-size 100 \ |
| 86 | + --hostname gpu-runner |
| 87 | +``` |
| 88 | + |
| 89 | +## Commands |
44 | 90 |
|
45 | 91 | ``` |
46 | | -githooks/ Sample pre-commit (optional: make hooks.install) |
47 | | -cmd/verda/ Entry point |
48 | | -internal/verda-cli/ |
49 | | - cmd/ Cobra commands |
50 | | - cmd/util/ CLI utilities (factory, iostreams) |
51 | | - options/ Shared CLI options |
| 92 | +Auth Commands: |
| 93 | + auth Manage shared credentials and profiles |
| 94 | +
|
| 95 | +VM Commands: |
| 96 | + vm Manage VM instances |
| 97 | +
|
| 98 | +Resource Commands: |
| 99 | + ssh-key Manage SSH keys |
| 100 | + startup-script Manage startup scripts |
| 101 | + volume Manage volumes |
| 102 | +
|
| 103 | +Other Commands: |
| 104 | + settings Manage CLI settings |
| 105 | + version Print version information |
52 | 106 | ``` |
| 107 | + |
| 108 | +### VM |
| 109 | + |
| 110 | +| Command | Description | |
| 111 | +|---------|-------------| |
| 112 | +| `verda vm create` | Create a VM (interactive wizard or flags) | |
| 113 | +| `verda vm list` | List and inspect VM instances | |
| 114 | +| `verda vm action` | Start, shutdown, hibernate, or delete a VM | |
| 115 | + |
| 116 | +### Volume |
| 117 | + |
| 118 | +| Command | Description | |
| 119 | +|---------|-------------| |
| 120 | +| `verda volume create` | Create a block storage volume | |
| 121 | +| `verda volume list` | List volumes | |
| 122 | +| `verda volume action` | Detach, rename, resize, clone, or delete | |
| 123 | +| `verda volume trash` | List deleted volumes (restorable within 96h) | |
| 124 | + |
| 125 | +### SSH Keys & Startup Scripts |
| 126 | + |
| 127 | +| Command | Description | |
| 128 | +|---------|-------------| |
| 129 | +| `verda ssh-key list / add / delete` | Manage SSH keys | |
| 130 | +| `verda startup-script list / add / delete` | Manage startup scripts | |
| 131 | + |
| 132 | +### Settings |
| 133 | + |
| 134 | +| Command | Description | |
| 135 | +|---------|-------------| |
| 136 | +| `verda settings theme` | View or change the color theme | |
| 137 | +| `verda settings theme --select` | Interactive theme picker | |
| 138 | + |
| 139 | +Available themes: `default`, `dracula`, `catppuccin`, `catppuccin-latte`, `nord`, `tokyonight`, `github-light`, `solarized-light` |
| 140 | + |
| 141 | +### Auth |
| 142 | + |
| 143 | +| Command | Description | |
| 144 | +|---------|-------------| |
| 145 | +| `verda auth login` | Save API credentials (interactive wizard) | |
| 146 | +| `verda auth show` | Show active profile and credentials path | |
| 147 | +| `verda auth use PROFILE` | Switch active auth profile | |
| 148 | + |
| 149 | +## Global Flags |
| 150 | + |
| 151 | +| Flag | Description | |
| 152 | +|------|-------------| |
| 153 | +| `--debug` | Enable debug output (API request/response details) | |
| 154 | +| `--timeout` | HTTP request timeout (default: 30s) | |
| 155 | +| `--base-url` | Override API base URL | |
| 156 | +| `--config` | Path to config file (default: `~/.verda/config.yaml`) | |
| 157 | + |
| 158 | +## Configuration |
| 159 | + |
| 160 | +Credentials are stored in `~/.verda/credentials` (AWS-style INI format): |
| 161 | + |
| 162 | +```ini |
| 163 | +[default] |
| 164 | +verda_base_url = https://api.verda.com/v1 |
| 165 | +verda_client_id = your-client-id |
| 166 | +verda_client_secret = your-client-secret |
| 167 | +``` |
| 168 | + |
| 169 | +Settings (theme, etc.) are stored in `~/.verda/config.yaml`. |
| 170 | + |
| 171 | +Override the config directory with `VERDA_HOME` environment variable. |
| 172 | + |
| 173 | +## Contributing |
| 174 | + |
| 175 | +See [CLAUDE.md](CLAUDE.md) and [AGENTS.md](AGENTS.md) for development setup and coding conventions. |
| 176 | + |
| 177 | +## License |
| 178 | + |
| 179 | +See [LICENSE](LICENSE) for details. |
0 commit comments