Skip to content

HarchCorp/harchos-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HarchOS CLI

Official command-line interface for HarchOS — the sovereign cloud infrastructure platform.

CI Release Go Report Card

Features

  • 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 json for automation
  • Secure credential storage — system keyring with file fallback
  • Cross-platform — static binaries for Linux, macOS, and Windows

Installation

Homebrew (macOS/Linux)

brew install HarchCorp/tap/harchos

Binary Download

Download the latest release from GitHub Releases.

Build from Source

git clone https://github.com/HarchCorp/harchos-cli.git
cd harchos-cli
make build

Quick Start

Authenticate

# Login with API key
harchos auth login --api-key hrk_live_your_key_here

# Check authentication status
harchos auth status

Workloads

# 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

Models

# 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

Hubs

# Check hub status
harchos hubs status

# List hubs by region
harchos hubs list --region morocco

Energy Reports

# Monthly energy report
harchos energy report --period monthly

# Weekly report for a specific hub
harchos energy report --period weekly --hub hub-morocco-01

Logs

# 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 100

Configuration

Profiles 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

Global Flags

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

Exit Codes

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

Shell Completions

# 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

Development

# Build
make build

# Test
make test

# Lint
make lint

# Cross-compile all platforms
make build-all

License

Apache License 2.0 — see LICENSE for details.

Contributing

See CONTRIBUTING.md for guidelines.


Built with ❤️ by HarchCorp — Sovereign infrastructure for the sovereign developer.

About

HarchOS CLI — Command-Line Interface for Sovereign AI Cloud Infrastructure | Multi-Profile, Structured Output, CI/CD Ready

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors