https://github.com/dtnewman/zev
A simple CLI tool to help you remember terminal commands
https://github.com/dtnewman/zev
cli llm
Last synced: 7 months ago
JSON representation
A simple CLI tool to help you remember terminal commands
- Host: GitHub
- URL: https://github.com/dtnewman/zev
- Owner: dtnewman
- License: mit
- Created: 2025-03-24T05:21:42.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-04-30T17:02:50.000Z (7 months ago)
- Last Synced: 2025-04-30T18:22:32.416Z (7 months ago)
- Topics: cli, llm
- Language: Python
- Homepage:
- Size: 7.85 MB
- Stars: 558
- Watchers: 3
- Forks: 29
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cli-apps-in-a-csv - zev - A simple CLI tool to generate terminal commands using AI. (<a name="ai-cli-commands"></a>AI terminal command generator)
- awesome-cli-apps - zev - A simple CLI tool to generate terminal commands using AI. (<a name="ai-cli-commands"></a>AI terminal command generator)
README
# Zev 🔍
[](https://badge.fury.io/py/zev)
[](https://opensource.org/licenses/MIT)
Zev helps you remember (or discover) terminal commands using natural language.

## 🔧 Installation
```bash
pip install zev
```
- **Note:** This project runs on top of LLM APIs like OpenAI, Google's Gemini, or [Ollama](https://ollama.com/).
## 📦 Dependencies
For clipboard functionality (copying and pasting) to work properly, you may need to install:
- On Linux: `xclip` or `xsel` (for X11) or `wl-clipboard` (for Wayland)
- On macOS: No additional dependencies needed
- On Windows: No additional dependencies needed
## 🎮 Usage
#### Option 1: Interactive Mode
```bash
zev
```
#### Option 2: Direct Query
```bash
zev ''
```
## 📝 Examples
```bash
# Find running processes
zev 'show all running python processes'
# File operations
zev 'find all .py files modified in the last 24 hours'
# System information
zev 'show disk usage for current directory'
# Network commands
zev 'check if google.com is reachable'
# Git operations
zev 'show uncommitted changes in git'
```
## 🛡️ Safety Considerations
⚠️ Commands are generated by LLMs. While the tool attempts to flag dangerous commands, it may not always do so. Use caution.

## ⚙️ Settings
### **Supported LLM Providers:**
- OpenAI
- Google Gemini
- Ollama
You can update your API keys and provider settings by running:
```bash
zev --setup
```
### OpenAI
To use OpenAI, you need an OpenAI account and a subscription. You can create an API key on [this page](https://platform.openai.com/settings/organization/api-keys).
### Google Gemini (Free)
To use Google's Gemini models, you need a Google AI Studio account. You can create a Gemini API key in [Google AI Studio](https://aistudio.google.com/).
## 🐪 Using with Ollama
You can use Zev with [Ollama](https://ollama.ai/) as an alternative to hosted providers, which lets you run all commands locally. To set this up:
1. Install and start [Ollama](https://ollama.com/) with a model of your choice
2. Run `zev --setup` and put in the proper settings. For example:
```
? Pick your LLM provider: Ollama
? Enter the Ollama URL: http://localhost:11434/v1
? Enter the model to use (e.g. llama3.2): llama3.2
```
Note that to switch backends, you can re-run `zev --setup` again at any time.
## 🤝 Contributing
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.