Langterm translates natural language to executable shell commands using local AI models through Ollama. It works on Windows, macOS, and Linux.
- Node.js 18+ - Required to run langterm
- Ollama - Install from https://ollama.com
- An Ollama model - Pull one before first use:
ollama pull codestral:22b # or for a lighter/faster model: ollama pull deepseek-coder:6.7b
npx langtermnpm install -g langtermWhen you run langterm for the first time, it will:
- Check if Ollama is running
- Show available models
- Let you select your preferred model
- Save your choice for future use
# Interactive mode
langterm
# Direct command
langterm list all files larger than 100MB
# With quotes for complex commands
langterm "find all Python files modified in the last week"langterm show disk usage sorted by size
langterm find process running on port 8080
langterm create tar archive excluding node_modules
langterm "convert all PNG images to JPG in current directory"
langterm extract audio from video.mp4 as mp3langterm --setup- Reconfigure model selectionlangterm --model <name>- Use a specific model for this runlangterm --help- Show help messagelangterm --version- Show version
- You describe what you want in plain English
- Langterm sends your request to your local Ollama model
- The AI generates the appropriate shell command
- You review the command and press Enter to execute (or Ctrl+C to cancel)
Langterm saves your model preference in ~/.langtermrc. You can:
- Run
langterm --setupto change models - Edit the file directly
- Use
--modelflag to temporarily use a different model
Make sure Ollama is running:
ollama servePull a model first:
ollama pull codestral:22b- Try being more specific in your description
- Some models work better than others for command generation
- Codestral and DeepSeek Coder models are recommended
All processing happens locally on your machine. No data is sent to external servers.
MIT