Skip to main content

Installation & Configuration

Installation

Install the CLI alongside the SDK from PyPI:

pip install qarion-cli

For local development from the monorepo:

pip install -e ./sdk
pip install -e "./cli[dev]"

After installation, the qarion command is available in your shell:

qarion --version

Configuration

The CLI reads credentials the same way the SDK does — through command-line flags or environment variables.

Set your credentials once so every invocation picks them up automatically:

export QARION_API_KEY="qk_your_api_key_here"
export QARION_BASE_URL="https://api.qarion.com"

Then simply run commands without extra flags:

qarion spaces list

Inline Flags

Override credentials per invocation when needed:

qarion --api-key qk_other_key --base-url https://staging.qarion.com spaces list

Shell Completion

The CLI supports tab-completion for bash, zsh, and fish through Click's built-in shell completion.

Bash

eval "$(_QARION_COMPLETE=bash_source qarion)"

To persist across sessions, add the line to your ~/.bashrc.

Zsh

eval "$(_QARION_COMPLETE=zsh_source qarion)"

To persist across sessions, add the line to your ~/.zshrc.

Fish

_QARION_COMPLETE=fish_source qarion | source

To persist across sessions, save the output to ~/.config/fish/completions/qarion.fish.

Output Formats

By default, the CLI renders results as rich terminal tables. For machine-readable output, pass the --json flag:

# Human-readable table (default)
qarion products list acme

# Machine-readable JSON
qarion --json products list acme

The --json flag is a global option, so it must appear before the command group name.

Requirements

  • Python ≥ 3.10
  • qarion-sdk — installed automatically as a dependency
  • click — CLI framework
  • rich — terminal table rendering