Klynx CLI (klynx-cli)
klynx-cli is the official command-line and TUI interface for Klynx.
It provides:
- An interactive terminal UI (
klynx) - A headless automation mode (
klynx run ...) - Session persistence, model switching, auth helpers, diagnostics, and shell completion
The package installs two equivalent commands:
klynxklynx-cli
Install (PyPI)
pip install -U klynx-cli
Optional browser tooling (needed only for browser-based tools):
playwright install chromium
Quick Start (5 Minutes)
1) Configure your model API key
klynx auth login --model gpt-4o
Or set environment variables manually (example):
export OPENAI_API_KEY="sk-..."
2) Launch the interactive TUI
klynx
3) Run one task immediately
klynx "review the current repository and propose a refactor plan"
4) Run in headless mode
klynx run "fix the failing tests and explain the root cause"
5) Resume the latest session
klynx resume --last
Usage Tutorial
Tutorial A: Interactive coding workflow in TUI
- Start TUI:
klynx - Enter a task, for example:
implement retry logic for the API client and add tests
- Use slash commands inside TUI:
/help/context/compact/model
- Continue follow-up prompts in the same session to iterate.
Tutorial B: CI-friendly headless execution
Use run for scripted workflows:
klynx run --json "summarize current test failures"
klynx run --show-tools "apply fixes and run verification"
klynx run --mode plan --approval on-request "design and implement a migration path"
Tutorial C: Work across multiple directories
Allow additional directories when needed:
klynx run --add-dir ../shared-lib --add-dir ../docs "check cross-repo compatibility"
Tutorial D: Manage session history
klynx session list
klynx session show --last
klynx session compact --last
klynx session delete <session_id>
Common Commands
klynx run "..."
klynx resume --last
klynx session list
klynx auth status
klynx auth login --model gpt-4o
klynx models list
klynx models set gpt-4o --scope global
klynx config show
klynx doctor
klynx completion powershell
Configuration and Credentials
Configuration precedence:
- Built-in defaults
~/.klynx/config.toml.klynx/config.toml.klynx/tui/config.yaml(legacy TUI config)- Environment variables (for example
KLYNX_DEFAULT_PROVIDER,KLYNX_DEFAULT_MODEL) - CLI overrides (
-c key=value)
Credential lookup precedence:
- Process environment variables
~/.klynx/.env.klynx/.env- Values written by
klynx auth login
TUI Output Configuration
You can tune transcript visibility in .klynx/tui/config.yaml:
output:
visible_events: [warning, error, answer, tool_exec]
show_reasoning_indicator: true
show_raw_stdout: false
tool_result_max_lines: 8
Logging and Diagnostics
klynx run --log-level DEBUG --print-logs "debug this task"
klynx doctor --json
- Logs are written to
~/.klynx/logs/klynx-cli.log --print-logsalso mirrors logs to stderrdoctorchecks import health, writable paths, tool availability, and auth readiness
Shell Completion
klynx completion bash
klynx completion powershell
PowerShell load example:
klynx completion powershell | Invoke-Expression
Exit Codes
0: success1: runtime failure2: usage error3: config validation failure4: session not found
Related Package
klynx-cli depends on the core SDK package klynx and installs it automatically via PyPI dependency resolution.
Metadata
Release files for klynx-cli 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| klynx_cli-0.0.6.tar.gz | 54.4 kB | Without provenance | Details for klynx_cli-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| klynx_cli-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for klynx_cli-0.0.6-py3-none-any.whl |
Total release size: 115.5 kB
Release files / klynx_cli-0.0.6.tar.gz
| Download URL | klynx_cli-0.0.6.tar.gz |
|---|---|
| Size | 54.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1314c82e38dd904371145c0d5cb0d5703cd2d4bf50246b69fc080d53cab0d6a
|
|
BLAKE2b-256 checksum How to use checksums |
418f1bd1694c8bc075d0ea62b97996333b6e05332358fc2f992d71ee9db0b4b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / klynx_cli-0.0.6-py3-none-any.whl
| Download URL | klynx_cli-0.0.6-py3-none-any.whl |
|---|---|
| Size | 61.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c4bff370064b88e25db374ffbd6dcf04bab86e981b6f1d13cfb116d229ea7a2
|
|
BLAKE2b-256 checksum How to use checksums |
33b677f473578c47ceac2bd24de664f2cc3049d2b49bd061237269ff78826a73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for klynx-cli 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.