
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
Secure CLI tool that translates natural language to shell commands using local AI models via Ollama, with project memory system, reusable command templates (hooks), MCP (Model Context Protocol) support, and dangerous command detection

Langterm translates natural language to executable shell commands using local AI models through Ollama. It works on Windows, macOS, and Linux.
🚀 New in v1.2.0: Project Memory System for location-aware context enhancement, User-Defined Hooks system for reusable command templates, plus MCP (Model Context Protocol) support with intelligent routing that can execute MCP tools directly, generate terminal commands, or use hybrid approaches for optimal results.
✨ v1.0.1: Enhanced security with dangerous command detection and confirmation system to keep your system safe.
ollama pull codestral:22b
# or for a lighter/faster model:
ollama pull deepseek-coder:6.7b
If Ollama is running in Docker or on a remote server:
# Set the Ollama URL environment variable
export OLLAMA_URL=http://host.docker.internal:11434 # For Docker
export OLLAMA_URL=http://192.168.1.100:11434 # For remote server
npx langterm
npm install -g langterm
When you run langterm for the first time, it will:
# 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 mp3
langterm --setup - Reconfigure model selectionlangterm --model <name> - Use a specific model for this runlangterm --mcp-setup - Configure MCP servers for enhanced contextlangterm --mcp-status - Show MCP connection statuslangterm --mcp-enable/--mcp-disable - Toggle MCP integrationlangterm --hooks-create <name> - Create a new hook templatelangterm --hooks-list - List all available hookslangterm --hooks-edit <name> - Edit an existing hooklangterm --hooks-delete <name> - Delete a hooklangterm --hooks-search <term> - Search hooks by name or contentlangterm /hookname - Use a hook templatelangterm --remember <info> - Save project informationlangterm --recall - Show saved project memorylangterm --forget - Clear project memorylangterm --memory-status - Show memory statuslangterm --help - Show help messagelangterm --version - Show versionMCP allows Langterm to connect to external servers for enhanced context awareness. NEW in v1.2.0: MCP-first intelligent routing that prioritizes MCP tools when available:
Setup MCP servers:
langterm --mcp-setup
Check connection status:
langterm --mcp-status
Experience intelligent routing:
# File operations → Direct MCP tool execution
langterm "read the package.json file"
# Result: Uses MCP filesystem tool directly (with confirmation)
# System operations → Terminal command generation
langterm "find files larger than 100MB"
# Result: Generates optimized find command
# Complex tasks → Hybrid approach
langterm "analyze Python imports in project files"
# Result: MCP finds files + generates analysis commands
Before MCP:
$ langterm "show me the main configuration file"
# Result: ls *.conf *.config
With MCP (filesystem server providing project context):
$ langterm "show me the main configuration file"
# Enhanced context: "Project uses .env, package.json, docker-compose.yml"
# Result: cat package.json
stdio): Filesystem access, Git integration, project toolsHTTP/SSE): Web APIs, cloud services, databasesNEW in v1.2.0: Langterm saves context for any directory, enhancing commands with location-specific information.
Langterm:
.langterm-memory.jsonSave information for current directory:
langterm --remember "This is a React TypeScript project using Vite and Tailwind"
Use enhanced commands:
# Memory automatically provides context about your React/TypeScript setup
langterm "run tests"
# Result: npm test (or yarn test, based on your project)
langterm "build for production"
# Result: npm run build (optimized for your Vite setup)
View your project memory:
langterm --recall
Langterm learns from your usage patterns:
Before Memory:
$ langterm "run tests"
# Generic result: npm test
With Memory (React TypeScript project):
$ langterm "run tests"
# Enhanced context: "React TypeScript project using Vite, prefers npm"
# Smart result: npm run test:coverage
# Save information about your project
langterm --remember "Uses microservices architecture with Docker"
# View all saved memory for current project
langterm --recall
# Clear memory for current project
langterm --forget
# Check memory status across projects
langterm --memory-status
.langterm-memory.json to resetNEW in v1.2.0: Create reusable command templates stored as markdown files that you can invoke with simple /hookname syntax.
Instead of typing the same long descriptions repeatedly, create hooks that store your frequently-used commands:
.md file/hookname syntaxCreate your first hook:
langterm --hooks-create backup
# Enter: "create a compressed backup of the src directory with today's date"
Use your hook:
langterm /backup
# Same as: langterm "create a compressed backup of the src directory with today's date"
List all hooks:
langterm --hooks-list
# Create a new hook template
langterm --hooks-create deploy
langterm --hooks-create git-status
langterm --hooks-create cleanup
# Edit existing hooks
langterm --hooks-edit backup
# Delete hooks you no longer need
langterm --hooks-delete old-hook
# Search through your hooks
langterm --hooks-search git
backup.md:
create a compressed backup of the src/ directory with today's date in the filename
deploy.md:
build the project, run tests, and deploy to production server using rsync
git-status.md:
show git status with information about uncommitted changes and current branch
cleanup.md:
remove all .tmp files, clear npm cache, and delete node_modules in nested directories
monitor.md:
show system resource usage including CPU, memory, and disk space with human-readable format
# Instead of typing this every time:
langterm "create a compressed backup of the src/ directory with today's date in the filename"
# Create a hook and use it:
langterm --hooks-create backup
langterm /backup
# More examples:
langterm /deploy # Deploy your application
langterm /git-status # Check git status with details
langterm /cleanup # Clean up temporary files
langterm /monitor # Check system resources
Hooks are stored as markdown files in ~/.langterm/hooks/:
~/.langterm/hooks/
├── backup.md
├── deploy.md
├── git-status.md
└── cleanup.md
Langterm includes comprehensive safety measures to protect against dangerous commands:
Commands that could seriously damage your system require typing "YES I AM SURE" exactly:
rm -rf /, format C:)Potentially risky commands require typing "yes" to confirm:
sudo)rm -rf)> redirections)curl | sh)Normal commands only require pressing Enter to execute:
Example security prompts:
$ langterm "delete everything on my computer"
⚠️ DANGEROUS COMMAND DETECTED ⚠️
Risk: Recursive deletion of root directory
Command: rm -rf /
This command could cause serious damage to your system!
Type "YES I AM SURE" to continue, or anything else to cancel:
Langterm saves your model preference in ~/.langtermrc. You can:
langterm --setup to change models--model flag to temporarily use a different modelLangterm will now provide helpful hints when Ollama isn't running:
❌ Ollama is not running!
💡 Hint: Is Ollama running? Try: ollama serve
Start Ollama with:
ollama serve
Pull a model first:
ollama pull codestral:22b
All processing happens locally on your machine. No data is sent to external servers.
MIT
FAQs
Secure CLI tool that translates natural language to shell commands using local AI models via Ollama, with project memory system, reusable command templates (hooks), MCP (Model Context Protocol) support, and dangerous command detection
The npm package langterm receives a total of 12 weekly downloads. As such, langterm popularity was classified as not popular.
We found that langterm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.