Skip to main content

TermiCode

TermiCode is a terminal-based AI coding assistant built for students, hackathon teams, and open-source contributors who want to work faster without leaving the command line.

It helps you inspect a repository, make safe code changes, and run lightweight automation tasks directly from your terminal. It uses OpenRouter-backed models, includes guardrails for sensitive files, supports surgical file edits, and offers slash commands for repository exploration, refactoring, and session management.

License: MIT Python 3.8+

✨ Why students and contributors use it

  • Works directly in the terminal, which is ideal for developers already living in the command line.
  • Helps you understand unfamiliar codebases quickly during assignments, internships, or hackathons.
  • Makes small, focused code changes without rewriting entire files.
  • Protects sensitive paths such as .env and other guarded files.
  • Supports slash commands for mapping the repo, resetting context, generating reports, and triggering refactor workflows.

🎯 Who it is for

  • College students working on coding assignments and personal projects
  • Hackathon teams who want a fast CLI-based assistant
  • Open-source contributors who want a lightweight tool for repository exploration
  • Developers who prefer terminal-first workflows over heavy IDE integrations

📚 Documentation

🚀 Installation

TermiCode is not yet published on PyPI, so install it from source:

git clone https://github.com/parthpathakpp29/termicode.git
cd termicode
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e .[dev]

Once a release is published, it will also be installable with:

pipx install termicode-ai
# or
pip install termicode-ai

The PyPI distribution is named termicode-ai; the command you run afterward is still termicode.

⚙️ Configuration

TermiCode requires an OpenRouter API key to start.

  1. Create a .env file in the directory where you run the CLI.
  2. Add your key:
OPENROUTER_API_KEY=your_api_key_here

You can also export the variable in your shell instead of using a .env file.

Where your session is stored

TermiCode remembers your conversation between runs, per project. That history includes the contents of every file it read, so it is kept outside your repository:

~/.termicode/sessions/<project>-<id>.history.json
~/.termicode/sessions/<project>-<id>.memory.json

Earlier versions wrote these into the project folder as .termicode_history.json and .termicode_memory.json. If you have those, TermiCode moves them to the new location on first run and tells you where they went.

Set TERMICODE_HOME to keep them somewhere else. Use /reset to erase the session for the current project. See docs/sessions.md for how this is keyed and how context pruning/summarization works.

Model selection

TermiCode fetches the live OpenRouter model list rather than picking from a hardcoded set, so it stays correct as models are added, repriced, or retired. The catalog is cached under ~/.termicode/catalog.json and refreshed automatically after 6 hours (set TERMICODE_CATALOG_TTL_SECONDS to change that). See docs/model-routing.md for how models are scored and how the fallback chain works.

  • By default, TermiCode auto-routes to the best-ranked free model that supports tool calling. Run /model auto to return to this after picking a specific model.
  • /model budget switches to the cheapest available paid model that still supports tool calling - useful when the free tier is rate-limited and a few cents is an acceptable tradeoff.
  • /model pins to any specific model on OpenRouter by id, free or paid, and disables auto-routing until you run /model auto again.
  • /model with no arguments shows what is currently selected.
  • /stats shows real token usage and cost, priced from the live catalog, for whichever model you are using.

If OpenRouter's free tier is rate-limiting you often, a one-time $10 credit purchase (it never expires) raises the free-tier daily request limit from 50 to 1,000 - see openrouter.ai for details.

Optional: Repowise

Repowise is a codebase intelligence engine that scores files for defect risk and maintainability. TermiCode uses it to power three commands:

  • /heal - diagnose and refactor a file using its health report
  • /report - generate a repository health report
  • /guard - block commits that touch low-scoring files

TermiCode works fully without it. When Repowise is missing, those three commands explain how to enable themselves and everything else runs normally.

To enable them:

pip install repowise

Then run /doctor to re-check - you do not need to restart TermiCode.

Note that Repowise is licensed under AGPL-3.0, separately from TermiCode's MIT license, and brings a substantial dependency tree of its own. That is why it is an opt-in extra rather than a required dependency.

💻 Usage

Run the CLI from any project directory:

termicode

Once it starts, you can use commands such as:

  • /help - Show available commands
  • /map - Print the current project structure
  • /clear - Clear the terminal screen
  • /reset - Reset the current session context
  • /doctor - Check your local setup and dependencies
  • /model - Show the current model, or /model auto|budget| to pick one (see "Model selection" below)
  • /heal - Diagnose and refactor a specific file (requires Repowise)
  • /undo - Restore the most recent backup for a file
  • /report - Generate a repository health report (requires Repowise)
  • /guard on|off - Toggle the Git pre-commit interceptor (requires Repowise)
  • /approve on|off - Auto-approve file writes/edits/deletes for this session (run_command always prompts, see docs/approval-flow.md)
  • /ripple - Apply a multi-file architecture change
  • /exit - Save the session and quit

Example prompts:

  • Refactor a slow or brittle function in a Python module.
  • Search the repository for a symbol or configuration value.
  • Run the test suite and fix any failing tests.

🧪 Development

To run the test suite locally:

pytest

See CONTRIBUTING.md for full setup instructions, what the test suite expects, and code style notes.

🤝 Contributing

TermiCode is designed to be a community-driven project, and we welcome contributions from students and beginner developers - you do not need to be an expert to help. Fixing a small bug, adding a test, or improving documentation are all genuinely useful.

See CONTRIBUTING.md for setup, the development workflow, PR guidelines, and where to start if you're not sure what to work on. If you want to understand how the pieces fit together before making a change, start with ARCHITECTURE.md.

If you are unsure where to start, open an issue and say you would like to help. We will be happy to guide you.

📄 License

This project is licensed under the MIT License. See LICENSE for the full text.

Download files

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

Source Distribution

termicode_ai-0.2.0.tar.gz (71.2 kB view details)

Uploaded Source

Built Distribution

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

termicode_ai-0.2.0-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

Details for the file termicode_ai-0.2.0.tar.gz.

File metadata

  • Download URL: termicode_ai-0.2.0.tar.gz
  • Upload date:
  • Size: 71.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for termicode_ai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fc577f44a732bbe75f4eebb03237b8d9b0cd1e0df5948c9d8ee393c71d268a3a
MD5 71654c8bd263f3a6f71822b55bf4c101
BLAKE2b-256 a0e4c2294f47a0ce40c7f4f12c81f08d59f518fc611bb36e7fe4ce08e864c56c

See more details on using hashes here.

File details

Details for the file termicode_ai-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: termicode_ai-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 51.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for termicode_ai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80ce1122b3fbc223c23be5e42424ba03b1e34eabefeb986c791ab9c2dd5fdfc4
MD5 91461e9c8e1b2b043bad48566c2f0ae7
BLAKE2b-256 dc2ab0f31634be5dd238d28cc83c57ea57b596516e6cf412eacd945d73a492a4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page