Skip to main content

Terminal interface for chatting with your Onyx agent

Project description

Onyx CLI

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: http://localhost:3000)
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

Commands

Command Description
chat Launch the interactive chat TUI (default)
ask Ask a one-shot question (non-interactive)
agents List available agents
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.1.0-py3-none-win_arm64.whl (5.3 MB view details)

Uploaded Python 3Windows ARM64

onyx_cli-0.1.0-py3-none-win_amd64.whl (6.0 MB view details)

Uploaded Python 3Windows x86-64

onyx_cli-0.1.0-py3-none-manylinux_2_17_x86_64.whl (5.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

onyx_cli-0.1.0-py3-none-manylinux_2_17_aarch64.whl (5.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

onyx_cli-0.1.0-py3-none-macosx_11_0_arm64.whl (5.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

onyx_cli-0.1.0-py3-none-macosx_10_12_x86_64.whl (5.9 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: onyx_cli-0.1.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 5.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.1.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 09dc09acb24f8669fb3bf90c6c1636bbd720ec871f019305c222ba743dfdca5b
MD5 2fbc1795c9f767e694fb5147dc63074c
BLAKE2b-256 4df0530d8bf988861bc1645973eedf0b6e203fefefa451b8ed8c57686302fa41

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 6.0 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.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b786dc4eff0259dcb1f5a60687b67e43eb987aea4ac053b2bb539d4bf0660ba0
MD5 4cb0acfeecac043a97ba820a802a5022
BLAKE2b-256 54f3a3a002fc95ce03305dd5de78c208341b976299da504b51aebd4f70ec1090

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.1.0-py3-none-manylinux_2_17_x86_64.whl
  • Upload date:
  • Size: 5.8 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.1.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 13bebe71860a5580ee37bb685a5765916cb7ddcec8b137cf21ea025b721b9c39
MD5 0ae4841cf0e80a862feb585c8f833704
BLAKE2b-256 0a1278251d8682a93b000dc939e76b2f27cfec208e048f12f590d614bb2095ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.1.0-py3-none-manylinux_2_17_aarch64.whl
  • Upload date:
  • Size: 5.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.1.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 7bea29c5f5f1e847ccf24b42209048cdb9caa0b605c27a8ce46013b721cc44f5
MD5 ef84a36d1622c91626be939a93c6e84a
BLAKE2b-256 f6c903e07b89f67761cc7bce29352d2c5fc7b19c09b79b3e61475a9dd6cd850d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.1.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 5.4 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.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eb5f0a8c0b44dc423cd8b033458391bdcc101785dc61ffdc8d62dbec986eead6
MD5 73f87c8e99ab70c25ee491609bb12733
BLAKE2b-256 7c15f73812966a65f0011f57e4675080ad9d4fc70c2b8035782bb4187fceb091

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onyx_cli-0.1.0-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 5.9 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.1.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8ae92da4a8206d8ba1ac4254d8c9616d5863c966f0bd30178cd2cd5f9ddcf402
MD5 330d0611a973849435d0689ef6f54a56
BLAKE2b-256 d22b128c5462dfc0036329863b78e2d48cb3cf6304d30ee4629e9972ed406773

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