swiftroutercli
v4.0.4
Published
The official SwiftRouter Command Line Interface using React Ink Components
Readme
SwiftRouter CLI
The Official Command Line Interface for SwiftRouter API Gateway, built with React Ink.
V3 Features (Codex Parity)
- Interactive Markdown Renderer: Syntactically highlights Assistant markdown responses within the terminal.
- Intelligent Bash Execution: Automatically detects
bashsnippet blocks and prompts:Execute suggested command? [Y/n]. - RAG Local Workspaces: Injects
process.cwd()state and files directly into a system prompt context so the AI knows where you are. - Persistent History Storage: Automatically saves conversation threads to
~/.swiftrouter-cli/history.jsonand recalls them using up/down keys in the input. - Slash Commands & Menus: Type
/modelsto pop open a sleekink-select-inputmenu fetched directly from the SwiftRouter/v1/modelsAPI endpoint. Navigate with up/down arrows! - System Commands: Type
/clearto reset the terminal history buffer, or/exit//quitto cleanly exit the CLI.
Installation
npm install -g swiftroutercliConfiguration
Upon first launch, the CLI asks for configuration parameters. You can also configure via system ENV variables:
SWIFTROUTER_API_KEYSWIFTROUTER_BASE_URL(Defaults tohttp://localhost:3000)
Usage
Simply run the CLI anywhere on your system:
swiftroutercli chat- Type
/modelsto select models interactively. - Type
/clearto reset the session. - Type
/exitto quit.
Additional Commands
swiftroutercli config --set-api-key <KEY> --set-base-url <URL>: Manually configure CLIswiftroutercli models: List available models nativelyswiftroutercli status: Check authentication and connection statusswiftroutercli logout: Clear local configuration securely
Built With
inkmarked-terminalink-select-inputeventsource-parser
License
ISC
