Skip to main content

A fast, streaming, multi-provider terminal AI chat client with codebase awareness.

Project description

q — Production Terminal AI Assistant with Codebase Awareness

q is a fast, production-grade command-line AI client supporting Google Gemini, OpenAI, and Anthropic (Claude) with Codebase Awareness, Piped STDIN Input, Real-Time Live Markdown Rendering, and Fast Provider/Model Switching.

PyPI Version


Powerful Codebase & UNIX Features

  • 📂 Codebase Awareness (-c / --codebase): Indexes project structure and source code files into prompt context (q -c "how is config loaded").
  • 📄 File Inclusion (-f / --file): Attach a specific file to your query (q -f q/cli.py "explain the main function").
  • ⚡ Piped STDIN Input: Pipe command outputs or file contents straight into q (cat file.py | q "explain this", git diff | q "review these changes").
  • 🎨 Real-Time Live Markdown Rendering: Uses rich to render bold text, code blocks with syntax highlighting, blockquotes, headings, and bullet points live as the AI streams tokens.
  • 🔑 Multi-Provider BYOK (Bring Your Own Key): Native support for Google Gemini, OpenAI, and Anthropic.
  • 🚀 Fast Provider & Model Switching: Switch providers or models on the fly using CLI flags (q -p anthropic ..., q -m gpt-4o ...) or interactive slash commands (/provider, /model).
  • 💬 Interactive Chat REPL: Run q with no arguments to start a multi-turn conversation session with context memory.

Installation

Option 1: Install via PyPI (Recommended)

pip install q-cli-ai

Option 2: Install from Source

git clone https://github.com/oz456/q.git
cd q
pip install -e .

Usage Examples

1. Codebase Awareness & File Inclusion

# Ask questions about your entire codebase
q -c how does configuration loading work

# Attach a specific file
q -f q/cli.py explain the main CLI loop

2. UNIX Pipe STDIN Support

cat setup.py | q explain this setup file
git diff | q review these code changes

3. Direct Questions & Fast Provider Overrides

q why is the sky blue
q -p anthropic explain quantum computing
q -p openai -m gpt-4o write a python script

4. Interactive Chat REPL

q

Command Line Flags

Flag Shortcut Description Example
--codebase -c Include project codebase structure & files in context q -c "how does provider setup work"
--file -f Attach specific file content to context q -f q/cli.py "explain main"
--provider -p Specify AI provider (gemini, openai, anthropic) q -p anthropic why is water wet
--model -m Specify AI model name q -m gpt-4o write a poem
--setup -s Re-run setup wizard manually q --setup
--reset -r Clear all saved provider API keys q --reset
--version -v Display package version q --version
--help -h Display CLI help menu q --help

Slash Commands (Inside Interactive Mode)

Command Description
/help Display slash command help table
/codebase Index current codebase structure & files into context
/file <path> Attach a specific file to conversation context
/provider [name] View current provider or launch interactive selection menu
/model [name] View current model or enter custom model name
/key [api_key] View or update API key for active provider
/clear Reset conversation memory for current session
/history Print full session transcript
/exit or /quit Exit interactive mode

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

q_notyourtype-0.1.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

q_notyourtype-0.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file q_notyourtype-0.1.0.tar.gz.

File metadata

  • Download URL: q_notyourtype-0.1.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for q_notyourtype-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a804104106a0d7fe7470aab213c5dbcf110052a0ff6adbe799d72b778b052195
MD5 b7cb63d20c1f1daeefbcad6c45d137bb
BLAKE2b-256 55ca2f4e5cf56df738b7d055af95d15f82cfbf1bbb28c2453fe455880dd0dae1

See more details on using hashes here.

File details

Details for the file q_notyourtype-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: q_notyourtype-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for q_notyourtype-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41015dc4803454d301354255ed2f2e23322cd1078768439d805ae334eeb4f4a3
MD5 29356335fdb6f3124f414e79b674d537
BLAKE2b-256 ff9a7608039a002a9be18dbb9e7463ca1ab3a1818143bb303b3cfb243274a2c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page