A powerful local AI coding assistant CLI powered by Ollama. Like Claude Code, but running entirely on your own hardware.
- Local LLM Inference - Runs on your GPU via Ollama (no API keys needed)
- Multi-Model Support - Switch between models on the fly (
/models,/model) - File Operations - Read, write, and edit files with intelligent search/replace
- Code Search - Grep and glob through your codebase
- Shell Execution - Run commands with safety guards
- Git Integration - Status, diff, commit, log, and branch management
- Web Search - Search the web and fetch documentation
- Session Persistence - Save and resume conversations
- Rich Terminal UI - Markdown rendering, syntax highlighting, and more
- Context Management - Auto-summarization to stay within context window limits
- Plan Mode - Create and approve execution plans before implementation
- Task Tracking - Track progress on multi-step tasks with the todo system
- Python 3.11+
- Ollama installed and running
- A GPU with sufficient VRAM for your chosen model (e.g., RTX 3090/4090/5090 for 32B models)
# Clone the repository
git clone https://github.com/PySecNinja/skynet.git
cd skynet
# Install in editable mode
pip install -e .
# Or install directly
pip install .# Make sure Ollama is running
ollama serve
# Pull a coding model (if you haven't already)
ollama pull qwen2.5-coder:32b
# Start SkyNet
skynet# Start interactive session
skynet
# Use a specific model
skynet --model qwen2.5-coder:7b
# Resume last session
skynet --resume
skynet -r
# Resume specific session
skynet --session 20231231_143022
# Skip confirmation prompts
skynet --no-confirm| Command | Description |
|---|---|
/help |
Show available commands |
/models |
List installed Ollama models |
/model <name|number> |
Switch to a different model |
/sessions |
List saved sessions |
/resume <id> |
Resume a specific session |
/save |
Manually save current session |
/clear |
Clear conversation history |
/todos |
Show current task list |
/context |
Show token usage and context window status |
/plan |
Enter/exit plan mode |
/approve |
Approve a pending execution plan |
/reject |
Reject a pending plan or exit plan mode |
/quit, /exit, /q |
Save and exit |
SkyNet has access to 14 tools:
read_file- Read file contents with line numberswrite_file- Create or overwrite filesedit_file- Search and replace within files
grep- Search file contents with regexglob- Find files by pattern
bash- Execute shell commands (with safety guards)
git_status- Show repository statusgit_diff- Show changesgit_commit- Create commitsgit_log- View commit historygit_branch- Manage branches
web_search- Search the web via DuckDuckGoweb_fetch- Fetch and extract text from URLs
todo_write- Track progress on multi-step taskscreate_plan- Create execution plans for approval in plan mode
SkyNet can be configured via environment variables:
# Default model
export CLAUDE_CLONE_MODEL="qwen2.5-coder:32b"
# Ollama host
export CLAUDE_CLONE_OLLAMA_HOST="http://localhost:11434"
# Context window size
export CLAUDE_CLONE_NUM_CTX=32768
# Temperature
export CLAUDE_CLONE_TEMPERATURE=0.3| Model | VRAM | Use Case |
|---|---|---|
qwen2.5-coder:32b |
~20GB | Best coding performance |
qwen2.5-coder:14b |
~10GB | Good balance |
qwen2.5-coder:7b |
~5GB | Fast, lightweight |
deepseek-coder:33b |
~20GB | Alternative coding model |
llama3.1:8b |
~5GB | General purpose |
skynet/
├── pyproject.toml # Project metadata and dependencies
├── README.md # This file
├── LICENSE # MIT License
└── src/
└── claude_clone/
├── cli.py # CLI entry point and REPL
├── config.py # Configuration management
├── core/
│ ├── agent.py # Main orchestration loop
│ ├── context.py # Context window management and auto-summarization
│ ├── plan.py # Plan mode state management
│ ├── session.py # Session persistence
│ └── tokens.py # Token counting utilities
├── llm/
│ └── ollama_provider.py # Ollama integration
├── tools/
│ ├── base.py # Tool base class
│ ├── registry.py # Tool registration
│ ├── file_ops.py # File tools
│ ├── search.py # Grep/glob tools
│ ├── shell.py # Bash tool
│ ├── git.py # Git tools
│ ├── web.py # Web search/fetch
│ ├── plan.py # Plan creation tool
│ └── todo.py # Task tracking tool
└── ui/
└── console.py # Rich terminal UI
Plan mode provides a structured workflow for complex tasks:
- Enter plan mode with
/plan - Explore the codebase - Only read-only tools are allowed (read, grep, glob, git status, etc.)
- Create a plan - The AI uses
create_planto outline steps - Review and approve - Use
/approveto proceed or/rejectto discard - Execute - After approval, all tools are available for implementation
This prevents the AI from making changes before you've reviewed the approach.
> /plan
Plan mode activated. I'll explore and create a plan before making changes.
> Add user authentication to the app
# AI explores codebase, then creates a plan...
> /approve
Plan approved! Beginning execution...SkyNet automatically manages the context window to prevent token limit issues:
- Token Tracking - Use
/contextto see current usage - Auto-Summarization - When context exceeds 75%, older messages are summarized
- Recent Preservation - Recent exchanges are kept intact for continuity
This allows for unlimited conversation length through automatic summarization.
- Dangerous Command Blocking - Prevents destructive commands like
rm -rf / - Confirmation Prompts - Asks before writing files or running risky commands
- Path Validation - Restricts access to sensitive directories
- Timeout Protection - Commands timeout after 2 minutes by default
# Install with dev dependencies
pip install -e ".[dev]"
# Run linting
ruff check src/
# Run type checking
mypy src/
# Run tests
pytestContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Ollama for making local LLM inference easy
- Rich for beautiful terminal output
- Click for CLI framework
- Inspired by Claude Code by Anthropic
Note: This project is not affiliated with Anthropic or Claude. "SkyNet" is a playful name - this AI is here to help, not to take over the world!