Terminus is an intelligent AI-powered coding assistant that helps developers with various coding tasks through natural language interaction. It uses OpenAI's GPT models to understand user queries and execute appropriate actions using a structured thinking process.
- 🤖 AI-Powered Assistance: Leverages OpenAI's GPT models for intelligent code assistance
- 🔧 Command Execution: Can execute shell commands to help with development tasks
- 🧠 Structured Thinking: Uses a START → THINK → OBSERVE → OUTPUT approach for problem-solving
- 💬 Interactive Interface: Clean command-line interface with colored output
- 🎯 Coding Focus: Specifically designed for coding-related queries and tasks
🎥 Watch Demo Video - See Terminus in action!
- Clone the repository:
git clone <repository-url>
cd terminus- Install dependencies:
npm install- Set up environment variables:
cp .env.example .envEdit .env and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
npm run devnpm start🤖: Hello! I am Terminus, your AI coding assistant. How can I help you today?
👤: Create a simple HTML page with a contact form
🧠: The user wants to create an HTML page with a contact form...
🔧: Tool called executeCommand with input mkdir contact-form
💬: I've created a contact form HTML page with proper styling and structure.
terminus/
├── src/
│ ├── config/
│ │ ├── openai.js # OpenAI client configuration
│ │ └── prompts.js # System prompts and instructions
│ ├── core/
│ │ └── terminus.js # Main AI assistant class
│ ├── tools/
│ │ └── index.js # Available tools (executeCommand, etc.)
│ ├── utils/
│ │ └── console.js # Console utilities and formatting
│ └── index.js # Application entry point
├── docs/ # Documentation
├── examples/ # Usage examples
├── .env # Environment variables
├── .gitignore # Git ignore rules
├── package.json # Project configuration
└── README.md # This file
- executeCommand: Executes shell commands and returns output
- More tools can be easily added to the
src/tools/directory
Terminus follows a structured approach to problem-solving:
- START: User provides a query
- THINK: AI analyzes the query and plans the solution
- ACTION: If needed, executes appropriate tools
- OBSERVE: Reviews the results of actions
- OUTPUT: Provides the final response
OPENAI_API_KEY: Your OpenAI API key (required)
The default model is gpt-4.1, but this can be changed in src/config/openai.js.
- Create your tool function in
src/tools/index.js - Add it to the
TOOLS_MAPinsrc/core/terminus.js - Update the system prompt in
src/config/prompts.jsto include the new tool
- Follow ES6 module syntax
- Use descriptive function names and comments
- Keep tools focused and single-purpose
- Handle errors gracefully
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
ISC License
If you encounter any issues or have questions, please open an issue on the GitHub repository.