What is Lazy Terminal?
Lazy Terminal is an intelligent command-line assistant that connects language models with external tools through MCP (Modular Component Protocol), enabling seamless terminal automation and smart interaction.
How to use Lazy Terminal?
To use Lazy Terminal, install the required packages with pip install -r requirements.txt
, configure your model credentials in config/models.yaml
, and launch the assistant with python main.py
.
Key features of Lazy Terminal?
- Dynamic Tool Routing: Automatically chooses between direct response or tool invocation.
- Contextual Memory: Maintains conversation context for up to 50 interactions.
- Multi-model Support: Easily integrate various language models via Coagent.
- Robust JSON Handling: Extracts and processes structured model responses.
- Secure Bash Execution: Runs safe, controlled bash scripts through MCP tools.
Use cases of Lazy Terminal?
- Automating file management tasks in the terminal.
- Executing complex commands with minimal user input.
- Integrating various AI models for enhanced command-line interactions.
FAQ from Lazy Terminal?
- Can Lazy Terminal execute any bash command?
Yes, it can execute safe and controlled bash commands through its MCP tools.
- Is Lazy Terminal easy to set up?
Yes, with a simple installation and configuration process, you can get started quickly.
- What programming languages does Lazy Terminal support?
Lazy Terminal is primarily built with Python and supports various language models.
🐢 Lazy Terminal
Lazy Terminal is an intelligent command-line assistant that connects language models with external tools through MCP (Modular Component Protocol). It dynamically determines whether a query should be directly answered or passed to a registered tool, enabling seamless terminal automation and smart interaction (you are lazy; it isn't).
🔧 Features
- Dynamic Tool Routing: Automatically chooses between direct response or tool invocation.
- Contextual Memory: Maintains conversation context (default 50 interactions).
- Multi-model Support: Easily integrate various language models via Coagent.
- Robust JSON Handling: Extracts and processes structured model responses.
- Secure Bash Execution: Runs safe, controlled bash scripts through MCP tools.
🚀 Quick Start
Installation
pip install -r requirements.txt
Configuration
- Edit
config/models.yaml
to include your model credentials. - Edit
config/mcp_servers.yaml
to list your MCP servers.
Running
Launch the assistant with:
python main.py
Start interacting with Lazy Terminal directly from your console!
🛠 Example Usage
Start the bash runner server:
python test_servers/bash_runner.py
Sample interaction:
User input:
You: List all .txt files in ~/Documents and save output to files.txt
Assistant tool invocation:
{
"tool_name": "run_bash_script",
"parameters": {
"commands": "ls ~/Documents/*.txt > files.txt"
}
}
Lazy Terminal will then execute this safely and return the results.
🔑 Environment Variables
Set model API keys as environment variables, e.g.:
export DEEPSEEK_API_KEY="your-api-key"
Ensure they match your settings in models.yaml
.
📌 Roadmap
- Implement advanced memory compression.
- Add interactive UI (terminal/web).
- Enhance error handling and logging.
- Extend toolset (e.g., file handling, browser automation).
- Multi-tool calling
🤝 Credits
Enjoy building your intelligent terminal assistant!