term2

A powerful terminal-based AI assistant that helps you get things done on your computer through natural conversation

A powerful terminal-based AI assistant that helps you get things done on your computer through natural conversation. term2 brings AI capabilities directly to your terminal, with three operating modes tailored to different workflows and robust safety features to keep you in control.

Key Features

  • 🎭 Three Operating Modes:

    • Default Mode: Full-power codebase work with all editing tools
    • Lite Mode: Fast, read-only mode for general terminal tasks and SSH sessions
    • Mentor Mode: Collaborative problem-solving with dual-AI consultation
  • 🤖 Multi-Provider Support: Works with OpenAI, OpenRouter (Claude, Gemini, DeepSeek), and any OpenAI-compatible API including local LLMs (Ollama, LM Studio, vLLM)

  • 🔒 Safe Execution: Every command requires your explicit approval with diff preview before execution

  • 🛠️ Advanced Tools: Shell execution, file patching, search/replace, grep, find files, file reading, and web search

  • 💬 Slash Commands: Quick actions like /clear, /quit, /model, /mentor, /lite for easy control

  • 🌐 SSH Mode: Execute commands and edit files on remote servers over SSH

  • 🧠 Reasoning Effort Control: Configurable reasoning levels for O1/O3 models

  • 🎯 Streaming Responses: See the AI’s thoughts and reasoning in real-time

Operating Modes

Default Mode

Full-featured mode for codebase development work with all editing tools and project context loading.

Lite Mode

Lightweight mode for general terminal tasks without codebase context. Perfect for:

  • System administration and server management
  • Investigating logs and config files
  • SSH sessions for remote server work
  • Quick command help when not working on a codebase

Mentor Mode

Dual-AI approach where your primary AI handles reconnaissance and implementation, while a more powerful mentor model provides strategic guidance and challenges assumptions. Ideal for:

  • Complex architectural decisions
  • Major refactoring reviews
  • Getting unstuck on difficult problems

Installation

npm install --global @qduc/term2
export OPENAI_API_KEY="your-api-key-here"
term2

Usage Examples

# Start in different modes
term2                    # Default mode for codebase work
term2 --lite            # Lite mode for general terminal help
term2 -m gpt-5.2        # Use specific model

# SSH mode for remote work
term2 --ssh user@host --remote-dir /path/to/project
term2 --ssh user@host --lite  # SSH + lite mode

Safety Features

  • Command approval required for every operation
  • Diff preview for file changes before approval
  • Risk analysis for dangerous operations
  • Path safety checks for sensitive directories
  • No hidden actions - all tool usage is transparent

Tech Stack

Check out the GitHub repository for detailed documentation and advanced usage.