Skip to main content

No project description provided

Project description

hop3-cli

Command-line interface for interacting with Hop3 servers.

Overview

hop3-cli is a thin client that communicates with hop3-server via JSON-RPC over HTTP or SSH tunneling. It provides a familiar Heroku-like CLI experience for deploying and managing applications.

Features

  • Application management - Deploy, start, stop, restart, and scale applications
  • Environment variables - Securely manage app configuration
  • Log streaming - View real-time application logs
  • Addon management - Provision and manage backing services (PostgreSQL, Redis, MySQL)
  • SSH tunneling - Secure communication with remote servers
  • Multiple output formats - Human-readable, JSON, or quiet mode

Installation

From PyPI (end users)

pip install hop3-cli

For development

# From workspace root
cd packages/hop3-cli
uv pip install -e ".[dev]"

Quick Start

# Configure server connection
export HOP3_SERVER_URL="https://hop3.example.com"
# Or use SSH tunneling
export HOP3_SERVER="user@hop3.example.com"

# Authenticate
hop3 auth login

# Deploy an application
cd my-app
hop3 deploy

# View logs
hop3 logs my-app

# List applications
hop3 apps

Configuration

Configuration can be set via environment variables or config file (~/.config/hop3/config.toml).

Variable Description Default
HOP3_SERVER_URL Server URL (HTTP mode) -
HOP3_SERVER Server hostname (SSH mode) -
HOP3_AUTH_TOKEN Authentication token -
HOP3_CONFIG_DIR Config directory ~/.config/hop3

Architecture

hop3-cli/
├── src/hop3_cli/
│   ├── main.py          # Entry point, argument parsing
│   ├── config.py        # Configuration management
│   ├── tunnel.py        # SSH tunnel management
│   ├── rpc/
│   │   └── client.py    # JSON-RPC client
│   ├── commands/
│   │   ├── local.py     # Local commands (init, config)
│   │   └── help.py      # Help system
│   └── ui/
│       ├── console.py   # Output formatting
│       └── prompts.py   # Interactive prompts
└── tests/

Communication flow:

User → CLI → [SSH Tunnel] → HTTP → hop3-server → JSON-RPC response → CLI → User

Development

Running tests

# From package directory
uv run pytest tests/ -v

# With coverage
uv run pytest tests/ --cov=hop3_cli

Code quality

# Lint
uv run ruff check src/

# Format
uv run ruff format src/

# Type check
uv run pyright src/

Documentation

Related Packages

  • hop3-server - The server that hop3-cli communicates with
  • hop3-tui - Alternative terminal UI interface

License

Apache-2.0 - Copyright (c) 2024-2025, Abilian SAS

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hop3_cli-0.4.0b1.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hop3_cli-0.4.0b1-py3-none-any.whl (45.3 kB view details)

Uploaded Python 3

File details

Details for the file hop3_cli-0.4.0b1.tar.gz.

File metadata

  • Download URL: hop3_cli-0.4.0b1.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for hop3_cli-0.4.0b1.tar.gz
Algorithm Hash digest
SHA256 b7341c2e0847a0531b821de01fae17507e94f9185db647e7178e368d85c719de
MD5 ad94e47e38fbf263fed90a20259ac43b
BLAKE2b-256 f224f55565ca78bf3392530315327227ab6873721c29f19849c26551d6a1ce3b

See more details on using hashes here.

File details

Details for the file hop3_cli-0.4.0b1-py3-none-any.whl.

File metadata

  • Download URL: hop3_cli-0.4.0b1-py3-none-any.whl
  • Upload date:
  • Size: 45.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for hop3_cli-0.4.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 acf4d842e014a515901c5b3522af085feb705099528436144d2c079759c8b5b4
MD5 fee5b2c1312496f555cfb799f518fd80
BLAKE2b-256 80864d3a081add1ca9d1c016e2dcc4f0a677c48ccbd1798a58c1f0bcaa68a35f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page