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

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.2.0-py3-none-win_arm64.whl (6.2 MB view details)

Uploaded Python 3Windows ARM64

onyx_cli-0.2.0-py3-none-win_amd64.whl (6.2 MB view details)

Uploaded Python 3Windows x86-64

onyx_cli-0.2.0-py3-none-manylinux_2_17_x86_64.whl (6.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

onyx_cli-0.2.0-py3-none-manylinux_2_17_aarch64.whl (6.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

onyx_cli-0.2.0-py3-none-macosx_11_0_arm64.whl (6.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

onyx_cli-0.2.0-py3-none-macosx_10_12_x86_64.whl (6.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: onyx_cli-0.2.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 6.2 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.2.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 1c484da229847d8ab57d428d4b3beddd6cdf980c5d30329ffb9790528c32ca63
MD5 bfa7f5959d535f48cdfa8c50d9f8dfbe
BLAKE2b-256 2198a2e62b04391d86cce3ae3d3b7c9b8c514f86fe216d29bf1f2d93a46da1c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 6.2 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.2.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a5867ead61c7d7060a5b75d4ac4bc3a823fe29e3338e273eb8c163ef4bee5740
MD5 61e85a9907bf4c9c775dd63fb4d1d5e9
BLAKE2b-256 e808d1c8d61827c07aa5f88c3cf70e00fa3d3b18ee997ad41f582fd55038dd92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.0-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 6.2 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.2.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7e53e8ae6f17a248df628f4c756fb39401b6e6eacdd01b38e1ee5960054986b1
MD5 c244cd6c7cafffa212b05685ea24609f
BLAKE2b-256 7fd5b75bb7fbfd2386c16a13aeb1a2ba5283adb0832e49b36012e6066f07fa73

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.0-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 6.2 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.2.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 d45f64c3a9fa0ae6e7d13ec1eb965249a1b28122c25b03d3e4569252773f428c
MD5 ef6ada0ecac129c9fc03f08b6104dfe5
BLAKE2b-256 733afd02d0a6e42a9df0769c41f736c24a59f2d3aa981459d54b4327dc9301b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 6.2 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.2.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e2462680a0b17f8ed10d5ed58edf64c8b4bdf9b6b78465553ffed9b865ab2cb
MD5 d6dc7e8d58b05643a729a11dcf2d84db
BLAKE2b-256 ce46fb087353f578eee5b74c38712705ef9b80b542cb2c56181955348bc8d83d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.0-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 6.2 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.2.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4e10e23b4029978514e882f475f63ad1f635f86c3832a49a4d75aa9f4fa98380
MD5 723046ca77645630171f0de63db2f8a0
BLAKE2b-256 355c0e3298f96ec0404d869f0366a9e4c79843e297a66e480beefc49f107a9a2

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