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.0b3.tar.gz (44.9 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.0b3-py3-none-any.whl (61.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hop3_cli-0.4.0b3.tar.gz
  • Upload date:
  • Size: 44.9 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.0b3.tar.gz
Algorithm Hash digest
SHA256 8e28b1122f489ef41a5e62b93ae3497cd43011baa1fb2343c8e86285d25bd65c
MD5 20b65803c0dc47fd6b93e8a76aad9451
BLAKE2b-256 8d6c778f6da63db3e9ad94347fffaa35786d5316e8742b832821a4d15e5e2a02

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hop3_cli-0.4.0b3-py3-none-any.whl
  • Upload date:
  • Size: 61.9 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.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 268a3709ccce76c9f3fe9e0c8253a710b4f89851c5968e6622aa7e0a9fe5d8fa
MD5 da7382e5f0196bf2901a5fa6605ce858
BLAKE2b-256 01f0c27b59a65ef538d4ac7f2d79c7ec094ad20ecda65e67fc140053782f6849

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