Internal CLI
A lightweight interactive CLI for testing and exploring providers, tools, media, and token controls. This is AbstractCore’s internal chat CLI—not an external agentic CLI.
Using Codex / Gemini CLI / Crush? Use the OpenAI-compatible server instead: see the HTTP Server Guide.
Table of Contents
Quick Start
The internal CLI is installed as abstractcore-chat.
# Local provider (Ollama)
abstractcore-chat --provider ollama --model qwen3:4b-instruct
# Cloud providers
abstractcore-chat --provider openai --model gpt-4o-mini
abstractcore-chat --provider anthropic --model claude-haiku-4-5
# OpenAI-compatible local servers
# Note: include /v1 in the base URL.
abstractcore-chat --provider lmstudio --model qwen/qwen3-4b-2507 --base-url http://localhost:1234/v1
abstractcore-chat --provider openai-compatible --model local-model --base-url http://localhost:1234/v1
# Streaming
abstractcore-chat --provider ollama --model qwen3:4b-instruct --stream
Tip: python -m abstractcore.utils.cli ... is equivalent if you prefer module execution.
API keys
Cloud providers require API keys in your environment:
- OpenAI:
OPENAI_API_KEY - Anthropic:
ANTHROPIC_API_KEY - OpenRouter:
OPENROUTER_API_KEY
Token Controls
Set token budgets at startup or adjust them inside the REPL.
# Startup flags
abstractcore-chat --provider openai --model gpt-4o-mini --max-tokens 16384 --max-output-tokens 1024
# In the REPL
/max-tokens 16384
/max-output-tokens 1024
/max-tokens auto
/max-output-tokens auto
Thinking / Reasoning
Toggle unified thinking/reasoning mode (best-effort across providers/models):
/thinking auto
/thinking on
/thinking off
/thinking low
/thinking medium
/thinking high
Control whether reasoning (when available) is displayed separately:
/show-reasoning auto
/show-reasoning on
/show-reasoning off
Built-in Commands
A few useful commands shipped with the CLI:
/compact— compacts chat history (fast local summarizer model)/facts [file]— extract facts as triples (optionally save JSON-LD)/judge— evaluate discussion quality (LLM-as-a-judge demonstrator)/intent [participant]— intent analysis (optionally per participant)
Media Attachments (@filename)
Attach files directly in your prompt using @path/to/file (requires media extras):
pip install "abstractcore[media]"
# Image analysis
abstractcore-chat --provider openai --model gpt-4o --prompt "What's in @photo.jpg?"
# PDF document analysis
abstractcore-chat --provider anthropic --model claude-haiku-4-5 --prompt "Summarize @report.pdf"
# Office documents and data files
abstractcore-chat --provider openai --model gpt-4o --prompt "Extract action items from @slides.pptx"
abstractcore-chat --provider openai --model gpt-4o --prompt "Analyze @spreadsheet.xlsx"
abstractcore-chat --provider openai --model gpt-4o-mini --prompt "Spot anomalies in @metrics.csv"
Supported file types
- Images: PNG, JPEG, GIF, WEBP, BMP, TIFF
- Documents: PDF, DOCX, XLSX, PPTX
- Data/Text: CSV, TSV, TXT, MD, JSON, XML
Async CLI Demo (Educational)
AbstractCore includes an educational async CLI demo to learn async patterns. This is for learning, not production.
python examples/async_cli_demo.py --provider ollama --model qwen3:4b
python examples/async_cli_demo.py --provider lmstudio --model qwen/qwen3-vl-30b --stream