Skip to main content

Terminal interface for chatting with your Onyx agent

Project description

Onyx CLI

Release CLI PyPI

A terminal interface for chatting with your Onyx agent. Built with Go using Bubble Tea for the TUI framework.

Installation

pip install onyx-cli

Or with uv:

uv pip install onyx-cli

Setup

Run the interactive setup:

onyx-cli configure

This prompts for your Onyx server URL and API key, tests the connection, and saves config to ~/.config/onyx-cli/config.json.

Environment variables override config file values:

Variable Required Description
ONYX_SERVER_URL No Server base URL (default: https://cloud.onyx.app)
ONYX_API_KEY Yes API key for authentication
ONYX_PERSONA_ID No Default agent/persona ID

Usage

Interactive chat (default)

onyx-cli

One-shot question

onyx-cli ask "What is our company's PTO policy?"
onyx-cli ask --agent-id 5 "Summarize this topic"
onyx-cli ask --json "Hello"
Flag Description
--agent-id <int> Agent ID to use (overrides default)
--json Output raw NDJSON events instead of plain text

List agents

onyx-cli agents
onyx-cli agents --json

Serve over SSH

# Start a public SSH endpoint for the CLI TUI
onyx-cli serve --host 0.0.0.0 --port 2222

# Connect as a client
ssh your-host -p 2222

Clients can either:

  • paste an API key at the login prompt, or
  • skip the prompt by sending ONYX_API_KEY over SSH:
export ONYX_API_KEY=your-key
ssh -o SendEnv=ONYX_API_KEY your-host -p 2222

Useful hardening flags:

  • --idle-timeout (default 15m)
  • --max-session-timeout (default 8h)
  • --rate-limit-per-minute (default 20)
  • --rate-limit-burst (default 40)

Commands

Command Description
chat Launch the interactive chat TUI (default)
ask Ask a one-shot question (non-interactive)
agents List available agents
serve Serve the interactive chat TUI over SSH
configure Configure server URL and API key
validate-config Validate configuration and test connection
install-skill Install the agent skill file into a project

Slash Commands (in TUI)

Command Description
/help Show help message
/clear Clear chat and start a new session
/agent List and switch agents
/attach <path> Attach a file to next message
/sessions List recent chat sessions
/configure Re-run connection setup
/connectors Open connectors in browser
/settings Open settings in browser
/quit Exit Onyx CLI

Keyboard Shortcuts

Key Action
Enter Send message
Escape Cancel current generation
Ctrl+O Toggle source citations
Ctrl+D Quit (press twice)
Scroll / Shift+Up/Down Scroll chat history
Page Up / Page Down Scroll half page

Building from Source

Requires Go 1.24+.

cd cli
go build -o onyx-cli .

Development

# Run tests
go test ./...

# Build
go build -o onyx-cli .

# Lint
staticcheck ./...

Publishing to PyPI

The CLI is distributed as a Python package via PyPI. The build system uses hatchling with manygo to cross-compile Go binaries into platform-specific wheels.

CI release (recommended)

Tag a release and push — the release-cli.yml workflow builds wheels for all platforms and publishes to PyPI automatically:

tag --prefix cli

To do this manually:

git tag cli/v0.1.0
git push origin cli/v0.1.0

The workflow builds wheels for: linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64.

Manual release

Build a wheel locally with uv. Set GOOS and GOARCH to cross-compile for other platforms (Go handles this natively — no cross-compiler needed):

# Build for current platform
uv build --wheel

# Cross-compile for a different platform
GOOS=linux GOARCH=amd64 uv build --wheel

# Upload to PyPI
uv publish

Versioning

Versions are derived from git tags with the cli/ prefix (e.g. cli/v0.1.0). The tag is parsed by internal/_version.py and injected into the Go binary via -ldflags at build time.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

onyx_cli-0.3.1-py3-none-win_arm64.whl (5.8 MB view details)

Uploaded Python 3Windows ARM64

onyx_cli-0.3.1-py3-none-win_amd64.whl (6.4 MB view details)

Uploaded Python 3Windows x86-64

onyx_cli-0.3.1-py3-none-manylinux_2_17_x86_64.whl (6.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

onyx_cli-0.3.1-py3-none-manylinux_2_17_aarch64.whl (5.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

onyx_cli-0.3.1-py3-none-macosx_11_0_arm64.whl (5.9 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

onyx_cli-0.3.1-py3-none-macosx_10_12_x86_64.whl (6.3 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file onyx_cli-0.3.1-py3-none-win_arm64.whl.

File metadata

  • Download URL: onyx_cli-0.3.1-py3-none-win_arm64.whl
  • Upload date:
  • Size: 5.8 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for onyx_cli-0.3.1-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 30826e93dd0c1a1fda9f7cbfcb439e82241f0e470d4dc49b9ababde1dacb15c0
MD5 eb1f838ae906213b52362b5b1cdb3681
BLAKE2b-256 2a0959dcada9a2d4931e0eec3aa501f4e8cd50d95af3e6934746e9c58d1db26c

See more details on using hashes here.

File details

Details for the file onyx_cli-0.3.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: onyx_cli-0.3.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for onyx_cli-0.3.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 99f9f85a0c23ce0c6209016349876c4b1551bb85c1be0222399aa605863e76cc
MD5 0bea929dba9b5ece5863c76ef4fcc359
BLAKE2b-256 bae9c873bece5509bd20aa3e75b30dd7e1d61f5e065bd80ab0c3f90e9f6dc11d

See more details on using hashes here.

File details

Details for the file onyx_cli-0.3.1-py3-none-manylinux_2_17_x86_64.whl.

File metadata

  • Download URL: onyx_cli-0.3.1-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for onyx_cli-0.3.1-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7ca19f211a69e4bbd986907ecc9203f09ed81d1b7e9f97da3c0dacbf5429ee71
MD5 2a64eb583f5e998490fd090ae1f7edb6
BLAKE2b-256 f0e1104ab2e0fe02444d230254cab1f8221f505d9d9b4c9c52c2cf5da66a61ca

See more details on using hashes here.

File details

Details for the file onyx_cli-0.3.1-py3-none-manylinux_2_17_aarch64.whl.

File metadata

  • Download URL: onyx_cli-0.3.1-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: Python 3, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for onyx_cli-0.3.1-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 2f7311fedda76762927f245ea5b03320abb0419c895e7ed40a3e3a09647e6373
MD5 0ef2c3fb591112734d1693309a5f1c07
BLAKE2b-256 a7526dd65607160d4efb5c05373e17d64f50c0c14210d7ee7aaf694d0b5c823c

See more details on using hashes here.

File details

Details for the file onyx_cli-0.3.1-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: onyx_cli-0.3.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 5.9 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for onyx_cli-0.3.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc51dc1b45d42090f3b4aba6853d1be4232b79c452a5d24d604e86af4c6e583f
MD5 685b5ed86e2aa38c7e07809f8d0684ce
BLAKE2b-256 552fdbd8784859b244a00d7493995bcd33fd81b0082a1ae396923803b2bbd3fe

See more details on using hashes here.

File details

Details for the file onyx_cli-0.3.1-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: onyx_cli-0.3.1-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 6.3 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for onyx_cli-0.3.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 790cc5de706bc2bd825c44f9b1b0d9503b623c7e1865bda3ef22ee3c7ffbc57f
MD5 ed72bf7c6c3c3689e18f7a3a4c2325dc
BLAKE2b-256 301e8044bf88e92af2734d6736a5ac29766e0594650c98de1adb95e2b98b9eff

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