Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Kyun CLI (Beta)

A command-line interface for using kyun.sh.

Note: This project is currently in beta.


Installation

The following assumes you are on Linux. Windows is not supported yet.

Install from PyPI (Recommended)

Install with pipx:

sudo apt install pipx
pipx ensurepath
pipx install kyuncli

# Now you can use Kyun CLI
kyun account login

# To upgrade
pipx upgrade kyuncli

# To uninstall
pipx uninstall kyuncli

Install from releases

Use the .whl link from Releases:

pipx install <link-to-release>

Build it yourself

If you prefer to build the package yourself:

sudo apt install pipx
pipx ensurepath

git clone https://git.kyun.sh/nthpyrodev/kyuncli.git
cd kyuncli
python3 -m venv .venv
source .venv/bin/activate
pip install build
python -m build
deactivate

# Install your locally built wheel
pipx install dist/kyuncli-*.whl

# Now you can use Kyun CLI
kyun account login

# To uninstall
pipx uninstall kyuncli

Installing in a virtual environment (for development)

git clone https://git.kyun.sh/nthpyrodev/kyuncli.git
cd kyuncli
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Shell Autocompletion (Linux)

Enable tab completion using:

echo 'eval "$(_KYUN_COMPLETE=bash_source kyun)"' >> ~/.bashrc
source ~/.bashrc

Usage

Account Management

# Create a new account
kyun account create

# Login to your account and create the API to use
kyun account login

# Switch between accounts
kyun account switch <hash>

# List all accounts
kyun account list

# Check balance
kyun account balance

# Remove an account (does not delete your account, just removes it locally)
kyun account remove <hash>

SSH Key Management

# List SSH keys
kyun account ssh list

# Add SSH key from file
kyun account ssh add --file ~/.ssh/id_rsa.pub --name "My Key"

# Add SSH key directly
kyun account ssh add --key "ssh-rsa AAAAB3..." --name "My Key"

# Rename SSH key
kyun account ssh rename <key_id> "New Name"

# Delete SSH key
kyun account ssh delete <key_id>

Contact Information Management

# Get contact information
kyun account contact get

# Update email address
kyun account contact update --email "your@email.com"

# Update Matrix ID
kyun account contact update --matrix "@user:matrix.org"

# Update both email and Matrix
kyun account contact update --email "your@email.com" --matrix "@user:matrix.org"

# Link Telegram account
kyun account contact telegram link --code "ABC123"

# Unlink Telegram account
kyun account contact telegram unlink

2FA/OTP Management

# Check if 2FA is enabled
kyun account otp status

# Enable 2FA (Also creates backup scratch token)
kyun account otp enable

# Disable 2FA
kyun account otp disable

Danbo Management

# List all danbos
kyun danbo list

# Get detailed danbo info
kyun danbo get <danbo_id>

# Buy a new danbo
kyun danbo buy

# Rename a danbo
kyun danbo rename <danbo_id> "New Name"

# View danbo resource usage statistics
kyun danbo stats <danbo_id>

# View stats for last 60 minutes
kyun danbo stats <danbo_id> --minutes 60

# Delete a danbo (Irreversible)
kyun danbo manage delete <danbo_id>

# Cancel a danbo (deleted on next renewal)
kyun danbo manage cancel <danbo_id>

# Cancel a danbo with 2FA code
kyun danbo manage cancel <danbo_id>

Danbo Power Management

# Start a danbo
kyun danbo power start <danbo_id>

# Stop a danbo
kyun danbo power stop <danbo_id>

# Reboot a danbo
kyun danbo power reboot <danbo_id>

# Graceful shutdown
kyun danbo power shutdown <danbo_id>

Danbo Specs Management

# View current specs
kyun danbo get <danbo_id>

# Check max upgrade options
kyun danbo specs max-upgrade <danbo_id>

# Change specs
kyun danbo specs change <danbo_id>

Danbo IP Management

# Show danbo information
kyun danbo get <danbo_id>

# Add IPv4
kyun danbo ip add <danbo_id>

# Remove IPv4
kyun danbo ip remove <danbo_id> <ip_address>

# Set primary IP
kyun danbo ip set-primary-ip <danbo_id> <ip_address>

# List reverse DNS entries for an IP
kyun danbo ip rdns list <danbo_id> <ip_address>

# Add reverse DNS entry
kyun danbo ip rdns add <danbo_id> <ip_address> <domain>

# Remove reverse DNS entry
kyun danbo ip rdns remove <danbo_id> <ip_address> <domain>

Danbo SSH Management

# View authorized keys
kyun danbo ssh get-authorized <danbo_id>

# Set authorized keys from account (Replaces existing)
kyun danbo ssh set-authorized <danbo_id> --from-account

# Set authorized keys from file (Replaces existing)
kyun danbo ssh set-authorized <danbo_id> --file ~/.ssh/authorized_keys

# Add key to authorized keys
kyun danbo ssh add-to-authorized <danbo_id> --key "ssh-rsa AAAAB3..."

# Remove key from authorized keys
kyun danbo ssh remove-from-authorized <danbo_id> --key "ssh-rsa AAAAB3.."

# Get SSH host keys
kyun danbo ssh get-host-keys <danbo_id>

Danbo Bandwidth Management

# Check current bandwidth limit
kyun danbo bandwidth get <danbo_id>

# Set bandwidth limit (--limit flag optional)
kyun danbo bandwidth set <danbo_id> --limit 100

# Clear bandwidth limit
kyun danbo bandwidth clear <danbo_id>

Danbo OS Management

# Install an OS on a danbo
kyun danbo os install <danbo_id>

# Get the installed OS name
kyun danbo os get <danbo_id>

# Set the OS name
kyun danbo os set <danbo_id> "Debian 12 Bookworm"

Danbo Subdomain Management

# List subdomains
kyun danbo subdomains list <danbo_id>

# Create subdomain
kyun danbo subdomains create <danbo_id> --name "subdomain" --domain "kyun.li" --ip "ip_address"

# Delete subdomain
kyun danbo subdomains delete <danbo_id> <subdomain_id>

Danbo Brick Management

# List attached Bricks
kyun danbo bricks list <danbo_id>

# Attach Brick to danbo
kyun danbo bricks attach <danbo_id> <brick_id>

# Detach Brick from danbo
kyun danbo bricks detach <danbo_id> <brick_id>

Brick Storage Management

# List all Bricks
kyun brick list

# Get Brick details
kyun brick get <brick_id>

# Buy a new Brick
kyun brick buy

# Grow a Brick
kyun brick grow <brick_id>

# Check max growth
kyun brick max-grow <brick_id>

# Delete a Brick (Irreversible)
kyun brick delete <brick_id>

# Unsuspend a Brick
kyun brick unsuspend <brick_id>

Monero Deposit Management

# View exchange rates
kyun deposit rates

# List pending deposits
kyun deposit pending

# Create new deposit
kyun deposit create

# Get deposit info
kyun deposit get <deposit_id>

# Check deposit status
kyun deposit status <deposit_id>

Stripe Billing Management

# Add a payment method
kyun stripe addcard

# Don't open in browser automatically
kyun stripe addcard --url-only

# Show QR code
kyun stripe addcard --qr

# Stripe customer portal (general billing including invoices and payment methods)
kyun stripe portal

# Don't open in browser automatically
kyun stripe portal --url-only

# Show QR code
kyun stripe portal --qr

Support Chat

# List all chats
kyun chat list

# Start new chat
kyun chat start

# Start chat using ultra private mode
kyun chat start --private

# Open live chat session
kyun chat open <chat_id>

# Use commands inside live chat session:
# /help

# Delete chat
kyun chat delete <chat_id>

# Check online staff
kyun chat staff

# Enable ultra private mode
kyun chat privacy enable <chat_id>

# Disable ultra private mode
kyun chat privacy disable <chat_id>

Notifications

# Use --all to enable/disable for all accounts, or --hash to specify a specific account, otherwise defaults to currently active account.
# Just enabling a notification type will not allow it to run immediately, make sure you have run kyun notify cron install.
# No need to rerun kyun notify cron install after enabling/disabling notification type.

# Notify when a danbo is suspended
kyun notify danbo suspend enable

# Notify if balance is too low at specified hours ahead of a danbo renewal, default is one notification 72 hours in advance
kyun notify danbo renewal enable --hours-before 72 --hours-before 24

# Notify if balance is too low at specified hours ahead of a brick renewal, default is one notification 72 hours in advance
kyun notify brick renewal enable --hours-before 96 --hours-before 36

# Notify when a brick is suspended
kyun notify brick suspend enable

# Notify on new livechat message
kyun notify chat enable

# Change how many hours in advance of insufficient balance for renewal you are notified (replaces previous)
kyun notify danbo renewal hours 72 24

# Change how many hours in advance of insufficient balance for renewal you are notified (replaces previous)
kyun notify brick renewal hours 72

# Show which notification types are set for all accounts added to kyuncli
kyun notify status

# Manually run all enabled notification checks
kyun notify run

# Run notification checks every 5 minutes
kyun notify cron install

# Remove notification check entry from cron
kyun notify cron remove

Configuration

Config File Location

Account info is stored in a config file:

  • Linux: ~/.config/kyuncli/config.json
  • macOS: ~/Library/Application Support/kyuncli/config.json

Metadata

Release files for kyuncli 0.3.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kyuncli 0.3.0b2
File Size Uploaded
kyuncli-0.3.0b2.tar.gz 53.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kyuncli 0.3.0b2
File Interpreter ABI Platform
kyuncli-0.3.0b2-py3-none-any.whl Python 3 none any Details

Total release size: 106.5 kB

Release files / kyuncli-0.3.0b2.tar.gz

Download URL kyuncli-0.3.0b2.tar.gz
Size 53.8 kB
Tags Source
SHA-256 checksum
How to use checksums
62805a359db879f9a4501857b4cf7802e303db76442bde2137fcdcff05008b21
BLAKE2b-256 checksum
How to use checksums
3d9fc7b6607f0910ba8bb60fa28b8c01842a67cc8628e6158301d6e71828d6a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / kyuncli-0.3.0b2-py3-none-any.whl

Download URL kyuncli-0.3.0b2-py3-none-any.whl
Size 52.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
247b4cfaf463b96151354a38204cdcd2b5d664b09f51e1f31fcf0adf11780d35
BLAKE2b-256 checksum
How to use checksums
a03c1c4fdca8565354d48d35d309519714051767493dcbe15a8a205de5f40484
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.3.0b2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page