Plug-and-play terminal security layer for LLM agents. Drop-in gatekeeper that prevents dangerous shell commands. Works with OpenAI, Claude, Gemini & more.
<div align="center">
<img src="SecureShell.png" alt="SecureShell Logo" width="200"/>
# SecureShell
[](https://www.npmjs.com/package/secureshell-ts)
[](https://pypi.org/project/secureshell/)
[](https://opensource.org/licenses/MIT)
[](https://www.typescriptlang.org/)
[](https://www.python.org/)
**A plug-and-play security layer for LLMs and Agents that prevents dangerous command execution.**
</div>
SecureShell acts as "sudo for LLMs" - a drop-in zero-trust gatekeeper that evaluates every shell command before execution. It blocks hallucinated commands, prevents platform mismatches (e.g., Unix commands on Windows), and helps agents learn from mistakes.
## Why SecureShell?
LLM agents with shell access can hallucinate dangerous commands like `rm -rf /` or `dd if=/dev/zero`. SecureShell solves this by:
- **Zero-Trust Gatekeeper** - Every command treated as untrusted until validated by independent gatekeeper
- **Platform-Aware** - Automatically blocks Unix commands on Windows (and vice versa)
- **Risk Classification** - GREEN/YELLOW/RED tiers with automatic handling
- **Agent Learning** - Clear feedback helps agents self-correct
- **Drop-in Integration** - Plug into LangChain, LangGraph, MCP, or use standalone
- **Multi-LLM Support** - Works with any LLM provider
## Quick Start
### TypeScript
```bash
npm install secureshell-ts
```
```typescript
import { SecureShell, OpenAIProvider } from 'secureshell-ts';
const shell = new SecureShell({
provider: new OpenAIProvider({
apiKey: process.env.OPENAI_API_KEY,
model: 'gpt-4.1-mini'
}),
template: 'development'
});
const result = await shell.execute(
'ls -la',
'LGoogle's AI-powered research notebook that ingests your documents and becomes an expert on your content. Generates audio overviews, study guides, FAQs, and interactive discussions from uploaded sources.
Google DeepMind's experimental AI agent that can navigate websites, fill forms, and complete multi-step browser tasks autonomously. Uses Gemini's multimodal understanding to interact with web interfaces.
Google DeepMind's universal AI assistant prototype that can see, hear, and respond in real-time through your device camera and microphone. Demonstrates the future of multimodal AI interaction.
Google Cloud's enterprise platform for building, deploying, and managing AI agents powered by Gemini. Supports multi-agent orchestration, tool integration, and enterprise governance.
Gemini's agentic research capability that autonomously browses the web, synthesizes information from dozens of sources, and produces comprehensive research reports on any topic.
Interactive coding and content creation agent that generates, previews, and iterates on code, documents, and interactive applications in a side panel. Supports HTML/CSS/JS, Python, and more.