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

Uploaded Python 3Windows ARM64

onyx_cli-0.2.1-py3-none-win_amd64.whl (6.3 MB view details)

Uploaded Python 3Windows x86-64

onyx_cli-0.2.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.2.1-py3-none-manylinux_2_17_aarch64.whl (6.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

onyx_cli-0.2.1-py3-none-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

onyx_cli-0.2.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.2.1-py3-none-win_arm64.whl.

File metadata

  • Download URL: onyx_cli-0.2.1-py3-none-win_arm64.whl
  • Upload date:
  • Size: 6.3 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.1-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 01bfb3322901f6767cf7e03be0a0c2e9b67f7b5028bb4e6c4d94299e5ef88699
MD5 746ee551331d31c0d2a7fa04d3d65b2b
BLAKE2b-256 dd94c43ae4815e8a2615ae03d00cde119fbaa0ad6f85889a3e13ed80152f7811

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 6.3 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.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f433a667238f6cee7b3d7caf23798cc9c7725c0d7e45799767f40be67114cda7
MD5 3ca5fab62eddc8a4b11a65ccabf2bfc0
BLAKE2b-256 07ce30d2a7cc0e070d879413ed47ffe82ab1d494a42e962ff5c4b93c45b47f38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.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.2.1-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 e77d43f3e59fa964d85881babea678d0adaddd3506c8f868770cbe91ba423882
MD5 7f001730daa83fb9f84f0bd1b3bbdf46
BLAKE2b-256 7bf9a9286bb2536d5ebdaf927a12359ea468b795df5d6eaa9e60e3973ecf7345

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.1-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 6.3 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.1-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 c76d118c61e131eff6d964706aefb9d8a45fbd2c7e5485f90bfb6af4734aa8cc
MD5 0c19f3f1a9f21ac1c5d7bb471cc80b80
BLAKE2b-256 5fb344b185cafcd0ba9dc82458ec16ddc1c5976816853398c73e9afb31a8e665

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.1-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 6.3 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.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6a768fc60985256c617724da4c5efa715d51c63fbd7b6c2c36bf303fa3278b68
MD5 4f82dce770387549ee0a74bfba96faa4
BLAKE2b-256 31869a5c4cf51d1b03ce1d6464aecbd400e0fc659f397b59107d0a63c80c4d14

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.2.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.2.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0b047379069d15e0c5d3d0f33aed262e4c822b1b3a844affef4331d0d2496cb9
MD5 12767b8ef68a2ca92c663f1f9d100452
BLAKE2b-256 01fe1fd592a527f3a92675e0b1e70f9a0298372aee3f126eec9b84aa0acd7911

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