A super lightweight single-file PowerShell script that connects any OpenAI-compatible endpoint to your codebase as a hands-on coding agent.
No frameworks, no dependencies, just PowerShell.
- File Operations — Read, write, and edit files with precision (line ranges, string replacement)
- Command Execution — Run arbitrary PowerShell commands and capture output
- Vision Support — Automatically encodes images (PNG, JPG, GIF, WebP) as base64 for multimodal models
- Streaming — Real-time streaming of reasoning and responses
- Skills System — On-demand instruction sets that extend agent capabilities without bloating the system prompt
- Project Memory — Injects
AGENTS.mdinto the system prompt for persistent context - Chat History — Saves conversations to
.agents/history.mdfor future reference - Interactive Controls
Esc— Stop generation mid-stream/new— Reset conversation history/summarize— Compress conversation into a summary for continued context/set <param> <value>— Tweak sampling parameters on the fly/<KEY>=<value>— Set any.envvariable at runtime (persists to file)/help— Show available commandsexit— Quit
| Tool | Description |
|---|---|
read |
Read file content. Supports start_line / end_line for chunking. Auto-detects images. |
write |
Create or overwrite a file. |
edit |
Find-and-replace text within a file. |
run |
Execute a PowerShell command and return output. |
use_skill |
Load a skill's full instructions on demand. |
Skills are modular instruction sets in .agents/skills/. Only a manifest (name + description) is loaded into the system prompt — full instructions are loaded on demand via use_skill, keeping context lean.
| Skill | Description |
|---|---|
browser-cdp |
Control Chrome via Chrome DevTools Protocol — web automation, scraping, UI testing |
screenshot |
Capture a screenshot of the primary monitor with cursor overlay |
click |
Simulate mouse clicks at specific screen coordinates |
sendkeys |
Simulate keyboard input and key combinations |
caveman |
Ultra-compressed communication mode — cuts token usage ~75% |
grill-me |
Stress-test a plan or design through relentless questioning |
test-workflow |
Verifies basic file system tools by performing write, edit, read, and delete operations in sequence |
To add a skill, create .agents/skills/<name>.md with YAML frontmatter (name + description) and optionally a companion .ps1 script.
winget install Microsoft.PowerShellirm https://ollama.com/install.ps1 | iexollama pull gemma4:e4bcp .env.example .envEdit .env to set your model, endpoint, and preferences:
API_URL=http://localhost:11434/v1/chat/completions
API_KEY=sk-no-key-required
MODEL_NAME=gemma4:e4b
TEMPERATURE=0.7
TOP_P=0.9
REPEAT_PENALTY=1.1
MAX_TOKENS=4096
# Agent Settings
SHOW_REASONING=true
SHOW_FILE_READS=true
SHOW_FILE_EDITS=true
SHOW_FILE_WRITES=true
SHOW_CONSOLE_RETURN=false
SHOW_USE_SKILL=falseWorks with any OpenAI-compatible endpoint — Ollama, llama.cpp, LM Studio, vLLM, etc.
.\localcode-ps.ps1localcode-ps.ps1 # Agent entry point (single file, ~200 lines)
.env # Local configuration (not tracked)
.env.example # Configuration template
.agents/
AGENTS.md # Persistent project memory & instructions
history.md # Chat history log
skills/
<name>.md # Skill instructions (YAML frontmatter + markdown)
<name>.ps1 # Optional companion script
- The browser-cdp skill launches Chrome with an isolated debug profile (
Chrome\Agent) — it does not touch your real Chrome profile or sign-in state. - Skills with companion
.ps1scripts (screenshot, click, sendkeys, cdp) require Windows.
MIT