Official command-line interface for HarchOS — the sovereign cloud infrastructure platform.
- Sovereign by default — region=morocco, sovereignty=strict out of the box
- Multi-profile configuration — manage multiple environments in
~/.harchos/profiles.yaml - Structured output — JSON, YAML, and human-readable table formats
- CI/CD friendly —
--dry-run,--quiet,--output jsonfor automation - Secure credential storage — system keyring with file fallback
- Cross-platform — static binaries for Linux, macOS, and Windows
brew install HarchCorp/tap/harchosDownload the latest release from GitHub Releases.
git clone https://github.com/HarchCorp/harchos-cli.git
cd harchos-cli
make build# Login with API key
harchos auth login --api-key hrk_live_your_key_here
# Check authentication status
harchos auth status# List workloads
harchos workloads list
# Deploy a container workload
harchos workloads deploy --name my-app --image nginx:latest --type container --replicas 2
# Scale a workload
harchos workloads scale wl_abc123 --replicas 5
# Migrate a workload (respecting sovereignty)
harchos workloads migrate wl_abc123 --target-region europe-west# List models
harchos models list
# Deploy a model for inference
harchos models deploy --name bert-classifier --version v1 --framework pytorch --gpu A100
# Upload a model
harchos models upload --name my-model --version v1 --framework onnx --source ./model.onnx
# Benchmark a model
harchos models benchmark mdl_abc123 --metrics latency,throughput --duration 5m# Check hub status
harchos hubs status
# List hubs by region
harchos hubs list --region morocco# Monthly energy report
harchos energy report --period monthly
# Weekly report for a specific hub
harchos energy report --period weekly --hub hub-morocco-01# Tail logs from a workload
harchos logs tail wl_abc123
# Follow logs in real-time
harchos logs tail wl_abc123 --follow
# Show last 100 lines
harchos logs tail wl_abc123 --tail 100Profiles are stored in ~/.harchos/profiles.yaml:
active_profile: default
profiles:
default:
name: default
api_endpoint: https://api.harchos.io/v1
region: morocco
sovereignty: strict
timeout: 30
output_format: table
auth_type: apikey
production:
name: production
api_endpoint: https://api.harchos.io/v1
region: morocco
sovereignty: strict
timeout: 60
output_format: json
auth_type: oauth| Flag | Short | Description | Default |
|---|---|---|---|
--profile |
-p |
Configuration profile | default |
--output |
-o |
Output format: json, yaml, table | table |
--quiet |
-q |
Suppress all output | false |
--dry-run |
Simulate without changes | false |
|
--timeout |
API timeout (seconds) | 30 |
|
--region |
Override region | morocco |
|
--sovereignty |
Override sovereignty mode | strict |
|
--endpoint |
Override API endpoint |
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Usage error |
| 10 | API unauthorized |
| 11 | API forbidden |
| 12 | API not found |
| 13 | API rate limited |
| 14 | API server error |
| 15 | API connection error |
| 16 | API timeout |
| 17 | API conflict |
| 18 | API bad request |
| 19 | API unavailable |
# Bash
harchos completion bash > /etc/bash_completion.d/harchos
# Zsh
harchos completion zsh > "${fpath[1]}/_harchos"
# Fish
harchos completion fish > ~/.config/fish/completions/harchos.fish
# PowerShell
harchos completion powershell > HarchOS.ps1# Build
make build
# Test
make test
# Lint
make lint
# Cross-compile all platforms
make build-allApache License 2.0 — see LICENSE for details.
See CONTRIBUTING.md for guidelines.
Built with ❤️ by HarchCorp — Sovereign infrastructure for the sovereign developer.