Retro CLI Chat
A CLI Chat tool designed specifically for Windows Terminal
English | δΈζ
- Auto-save all conversations to local
sessions/ /historyto quickly switch, search, preview, rename, and delete sessions- Support export/import for easy backup and sharing
- Support OpenAI and any OpenAI-compatible API
- Customize
base_url,headersto adapt to various services - One-click switching between different Providers and Models
/attachto select local files- Images automatically converted to base64
- Text files automatically inlined (supports JSON, YAML, XML, etc.)
- Define custom prompts in
skills/<skill_name>/ - Type
@skill_nameto quickly trigger - Auto-matching support: AI selects Skills based on context
- Streaming output: see AI responses in real-time
- Press
Escto interrupt requests at any time - Rich rendering: Markdown, code highlighting, out of the box
Make sure you have uv installed (recommended Python package manager)
# In project root directory
uv sync
uv run nexumβ First run will:
- Prompt for your nickname (
user_id) - Auto-create config directories:
skills/,sessions/,export/ - Generate
providers.jsontemplate (you need to fill in API Key)
Edit providers.json in the root directory:
{
"schema_version": "providers@v1",
"providers": [
{
"name": "openai",
"api_key": "sk-YOUR_KEY_HERE",
"base_url": "https://api.openai.com/v1",
"models": ["gpt-4o-mini"],
"streaming": true
}
]
}π‘ Tips:
base_urlis optional, used for third-party service compatibility- Set
streamingtofalseto disable streaming output - Supports custom
headers, such as special authentication methods
After running, just type your questions like chatting with AI normally.
Want to know all commands? Type /help.
- Type message directly to send
- Press
Ctrl+JorEscthenEnterfor newline (depending on yoursend_keysetting) - Press
Escto interrupt ongoing response
/new Create new session
/history Manage sessions (switch/rename/delete/search)
/export Export current session to export/
/import Import session JSON
/provider Manage Providers (add/list/switch/delete)
/model Manage Models (list/switch)
/attach Select file to attach to next message
/attach list View current pending attachments
/attach clear Clear attachments
/skills Select Skill or toggle auto-selection
/clearskill Clear current session's Skill
@skill_name Trigger specific Skill in input
/regen Regenerate last response
/edit [text] Edit last message and resend
/settings Modify user settings
A Skill is a preset prompt set designed to make AI play specific roles or focus on specific tasks.
For example:
@python: Make AI a Python expert@translate: Focus on translation tasks@review: Code review expert
Each Skill is a skills/<skill_name>/ directory:
skills/
βββ python/
βββ SKILL.md # Main prompt
βββ references/
βββ system.md # System prompt (optional)
βββ prompt.md # Core Prompt (optional)
βββ README.md # Documentation (optional)
The program reads these files in order and concatenates them to your system_prompt.
Manual Trigger:
Type @skill_name in input, supports prefix matching:
@pymay matchpython- Multiple matches will show a selection list
Auto-Selection:
When enabled (/skills auto on), AI automatically selects appropriate Skill based on your question.
Provider configuration:
| Field | Description |
|---|---|
name |
Provider name for switching |
api_key |
API key |
base_url |
API endpoint (optional, for compatible services) |
models |
Available model list |
headers |
Custom request headers (optional) |
streaming |
Enable streaming output |
User settings:
| Field | Description |
|---|---|
user_id |
Your nickname |
active_provider |
Current Provider in use |
active_model |
Current Model in use |
send_key |
Send method: enter or ctrl_enter |
markdown_style |
Markdown theme: dark or others |
auto_skill |
Enable auto Skill selection |
system_prompt |
Global system prompt |
- Send message:
Enter - Newline:
Ctrl+JorEscthenEnter
- Send message:
EscthenEnter - Newline:
Enter
π‘ Why Esc+Enter? Most terminals cannot distinguish Ctrl+Enter, so Esc+Enter is used instead
Press Esc to interrupt ongoing response at any time.
After interruption:
- "Half-finished" responses won't be saved
- Last user message is retained
- Use
/regento retry or/editto modify and rerun
After selecting files via /attach, attachments are "pending" and submitted with the next user message:
| File Type | Processing Method |
|---|---|
Images (image/*) |
Converted to base64 |
Text (text/*, JSON, YAML, XML) |
Auto-read and inlined (max 200KB per file) |
| Other binary | Only filename description attached |
Esc, attachments won't auto-restore. To retry, use /regen or re-attach with /attach.
nexum/
βββ app/ Application orchestration, command dispatch, chat flow
βββ cli/ Terminal interaction (input, UI, interruption)
βββ llm/ OpenAI client wrapper
βββ config/ Config read/write and validation
βββ sessions/ Session model and storage
βββ skills/ Skill system
βββ core/ Common utilities
"The Machine doesn't act directly; it connects people, events, and consequences. Once a connection is made, things naturally happen along that chain." β Tribute to Person of Interest
Nexum in Latin means "a connection or bond that has been established." This project plays exactly that role: it doesn't create intelligence, it just reliably connects your intentions, API calls, and model capabilities.
When the connection is made, the path of action already exists.
uv sync
uv run python -m compileall nexum- β Give a Star β Let more people discover it
- π Submit Issues β Tell me what can be improved
Thank you π