ZETA - Zero-Latency Editing Terminal Agent: A friendly local AI terminal agent
Project description
ZETA - Zero-Latency Editing Terminal Agent
ZETA is a friendly, local AI terminal agent designed for non-technical users. It runs completely offline using Ollama with the MiniMax M2 model, making it perfect for learning to code without relying on external APIs.
โจ Features
๐ฏ Ask โ Act โ Explain Flow
- Smart Clarification: Detects vague inputs and asks helpful clarifying questions with numbered options
- Safe Operations: Never edits files without your confirmation
- Plain English Explanations: Every action is explained in simple, understandable terms
- Learning Log: All interactions are logged to
zeta_log.mdfor your learning journey
๐ Teaching Mode
- Toggle with
--teachflag or usezeta teachcommand - Detailed explanations with definitions (e.g., "HTML is the skeleton of a webpage")
- Interactive learning sessions
๐ Critic Loop (Optional)
- Enable with
--criticflag - Reviews code for bugs, style, and security issues
- Provides scores (1-10) and suggests fixes for scores below 8
๐ ๏ธ Powerful Tools
- ReadFile: Read any file in your project
- WriteFile: Create or edit files (with automatic parent directory creation)
- RunCommand: Execute shell commands safely
- ListFiles: Browse your project structure
๐ Installation
Prerequisites
- Python 3.8+ installed
- Ollama installed and running
- MiniMax M2 model pulled in Ollama:
ollama pull minimax-m2:cloud
Install ZETA
# Clone or download this repository
cd zeta_cli
# Install in development mode
pip install -e .
# Or install dependencies manually
pip install click langchain-ollama langchain langgraph rich
๐ Usage
Basic Commands
# Run a task
zeta run "make a to-do app"
# With teaching mode
zeta run "create a calculator" --teach
# With critic mode
zeta run "write a Python script" --critic
# Combine both modes
zeta run "build a webpage" --teach --critic
# Interactive teaching session
zeta teach
# View your learning log
zeta log
Example Flow
$ zeta run "make a to-do app"
๐ค I need a bit more information!
What kind of to-do app would you like?
1. A simple HTML webpage with JavaScript
2. A Python terminal application
3. A command-line tool
Choose an option [1]: 1
Great choice! Let's make a simple HTML webpage with JavaScript.
[ZETA processes your request...]
[Displays created files and explanation]
Would you like to learn how this works? [y/N]: y
[Shows detailed lesson about HTML and JavaScript]
๐ Teaching Mode Examples
Basic Teaching Session
$ zeta teach
๐ Teaching Mode
Learn coding concepts in detail
What would you like to learn about?
Type 'exit' to end the session
You: What is HTML?
๐ Lesson: HTML stands for HyperText Markup Language. Think of it as the skeleton
of a webpage - it defines the structure and content...
You: How does JavaScript work?
๐ Lesson: JavaScript is like the brain of your webpage. It makes things interactive...
Teaching Mode with Tasks
$ zeta run "create a button" --teach
[Creates button.html]
Explanation: I created an HTML file with a button element. HTML uses tags like
<button> to create interactive elements. The button I created will display
"Click me!" when viewed in a browser. When teaching mode is enabled, I'll explain
that HTML provides structure, while JavaScript (which we can add) makes it do
things when clicked.
Would you like to learn how this works? [y/N]: y
๐ Critic Mode
When enabled, ZETA reviews your code:
$ zeta run "write a Python function to add numbers" --critic
[Creates add.py]
Code Review:
Score: 7/10
Issues:
- Missing type hints
- No error handling for non-numeric inputs
Suggestions:
- Add type hints: def add(a: int, b: int) -> int:
- Add try/except for invalid inputs
Would you like me to fix these issues? [y/N]
๐ Learning Log
All your interactions are saved to zeta_log.md:
## 2024-01-15 14:30:22
**Action:** User task: make a to-do app
**Explanation:** I created a simple HTML to-do app with a clean interface...
**Lesson:** HTML provides structure, CSS makes it pretty, and JavaScript
makes it interactive. Think of it like building a house: HTML is the frame,
CSS is the paint, and JavaScript is the electricity that makes lights work.
---
View your log anytime:
zeta log
๐๏ธ Project Structure
zeta_cli/
โโโ zeta.py # Main CLI application
โโโ setup.py # Installation configuration
โโโ README.md # This file
โโโ zeta_log.md # Auto-generated learning log
๐ง Configuration
ZETA uses the Ollama model minimax-m2:cloud by default. To use a different model, edit the MODEL_NAME constant in zeta.py:
MODEL_NAME = "your-model-name"
๐จ Features in Detail
1. Vague Task Detection
ZETA automatically detects when your request is too vague:
$ zeta run "make a chatbot"
๐ค I need a bit more information!
What kind of chatbot would you like?
1. A simple terminal-based chatbot
2. A web-based chatbot with HTML interface
3. A Python script chatbot
2. Safe File Operations
ZETA never modifies files without confirmation:
[Before writing file.html]
Would you like me to create/modify file.html? [y/N]: y
โ File created successfully!
3. Encouraging Language
ZETA uses friendly, encouraging messages:
- "Great choice!"
- "Nice! Your app is live."
- "Let's do this!"
- "Awesome work!"
4. Plain English Explanations
No jargon without explanation:
- โ "Created a REST API endpoint"
- โ "Created a REST API endpoint - that's like a mailbox where your app can receive requests and send back data"
๐ Troubleshooting
Ollama Connection Issues
If you see connection errors:
- Make sure Ollama is running:
ollama serve - Verify the model is installed:
ollama list - Pull the model if needed:
ollama pull minimax-m2:cloud
Model Not Found
If the model isn't available:
# List available models
ollama list
# Pull the MiniMax M2 model
ollama pull minimax-m2:cloud
# Or use a different model by editing zeta.py
๐ค Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
๐ License
MIT License - feel free to use ZETA for any purpose.
๐ Acknowledgments
๐ก Tips for Non-Technical Users
- Start Simple: Begin with basic tasks like "create a text file" or "make a simple webpage"
- Use Teaching Mode: Always use
--teachwhen learning something new - Ask Questions: ZETA loves to explain! Ask "what is X?" anytime
- Review Your Log: Check
zeta logregularly to review what you've learned - Be Specific: The more details you provide, the better ZETA can help
Happy Coding! ๐
Remember: Every expert was once a beginner. ZETA is here to help you learn at your own pace!
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zeta_cli-1.0.0.tar.gz.
File metadata
- Download URL: zeta_cli-1.0.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06bfa46f38349cb24d969986b59bf683c6f5bc009b2322f546ac904ecad3e207
|
|
| MD5 |
7c7d3674f29614de930a80070a9c53c2
|
|
| BLAKE2b-256 |
594500e14416c2d12a54c5ae57ec47f2bf30f1d1b759e6fbcf8a5022bbffd4e2
|
File details
Details for the file zeta_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: zeta_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f4d5fe2842b316811dd3494530fd6cf0bc5e33422fdf4e7967cf66769398682
|
|
| MD5 |
7da6461b85e60227a141944a06289390
|
|
| BLAKE2b-256 |
3c3d1c4d3c3910539ef76d1b2686bf00d65a4d0f737c058f99048c2fea7a1fb9
|