A shell-first coding harness that lets the model steer execution and context
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Freehand is a local Python agent harness with a deliberately small model-facing interface: a runtime description of roughly 350 tokens and a single bash tool. The model chooses the execution strategy, sets per-command timeouts, can detach jobs, and manages what remains in context instead of relying on fixed-threshold compaction. After each turn, the harness reports context size, token usage and cached share, cost, and elapsed time back to the model.
The pyproject.toml uses setuptools>=77 and names the distribution freehand-ai, while the CLI and import package are named freehand. Inference runs through a configured provider; OpenAI-compatible Chat Completions is the documented custom-endpoint route. Project instructions and skills load only in trusted folders, and the harness can connect to configured MCP servers without changing its one-tool model-facing design.
Key Capabilities & Differentiators
The CLI supports OpenAI through eligible ChatGPT subscriptions or an API key, Anthropic login, and custom OpenAI-compatible Chat Completions endpoints, including gateways such as LiteLLM. /model switches the active model and its provider without restarting the session. The terminal, browser and beta desktop interfaces support streaming Markdown, interrupts, session resume, per-turn undo and HTML export. The desktop adds a workbench with files, changes, Git and a terminal alongside the conversation.
The project’s published benchmark runs cover 11 settings across five suites with GPT-6-astra, Claude Opus 5.5 and Gemini 4 Carbon. In the Terminal-Bench 4 Opus comparison, Freehand scored 61.9% at $3.38 per task, versus 54.9% at $4.91 for Claude Code. That is a measured result for this pairing, not a general cost or accuracy expectation.
Trade-offs & Limitations
Compared with Claude Code or Codex, Freehand gives the model more latitude and supplies fewer built-in guardrails for planning, tooling and memory. The advantage is model-dependent: on Terminal-Bench 4, Claude Code with Claude Sonnet 5.5 scored 41.6% versus Freehand’s 34.9%; Codex with GPT-6 Sol scored 34.9% versus Freehand’s 29.2%. Test the intended model on representative work before assuming that fewer harness policies will improve cost or completion rates.
The security tradeoff is immediate: no built-in sandbox or approval prompt mediates execution. Commands inherit the user’s permissions and can access reachable files, credentials, environment variables and the network. Folder trust controls whether project instructions and skills load; it does not constrain command permissions. Treat per-turn undo as a workflow feature, not as a guarantee that external side effects can be reversed.
Hardware & Deployment Guide
The supported host platforms are macOS and Linux; the CLI and browser interface also run inside Linux on WSL2. The installer uses uv and provisions Python 3.12. freehand web opens the browser interface, freehand -c resumes the last session in the current directory, and freehand -p runs without an interactive UI. The beta desktop app requires a source build with Node 22.12 or later and an installed freehand CLI; signed installers are not published.
The harness runs locally, but the normal model path uses a configured API endpoint. A local model endpoint can be evaluated through the compatibility route if it implements the required Chat Completions behavior; offline operation is not established by the local install alone. There is no local GPU requirement for API inference. Size the host for its shell workloads and isolate untrusted work in a container or VM. The Python project is marked alpha, and no latest GitHub release is listed.
bash tool; the model manages what stays in context./model can switch both model and provider mid-session; compatible Chat Completions endpoints can be configured explicitly.freehand -p separates activity on stderr from the final summary on stdout.AGENTS.md and project skills, but do not sandbox shell commands.Teams piloting frontier-model coding agents on builds, tests and repository maintenance in a controlled environment, with a choice of providers and per-turn cost visibility.
You require built-in execution approvals or sandboxing, signed desktop installers, or strong results from smaller models without validating your workload first.
Quick Start & Installation
curl -LsSf https://raw.githubusercontent.com/microsoft/FreeHand/main/install.sh | sh
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| FreeHand ★ | 1.3k | +1.3k | Python | MIT | A shell-first coding harness that lets the model steer execution and context |
| Codewhale | 41.2k | +38 | Rust | MIT | Rust coding agent with swappable models, sandboxed execution, and turn receipts |
| aider | 50.3k | +78 | Python | Apache-2.0 | A Git-integrated terminal CLI for editing code with cloud or local models. |
| gemini-cli | 109.6k | +376 | TypeScript | Apache-2.0 | A Node.js terminal agent for enterprise Gemini coding workflows and MCP tools |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/microsoft/FreeHand.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about FreeHand
How do I integrate Freehand into a script or connect it to a model gateway?
freehand -p "…" for headless execution. Activity goes to stderr and the final summary goes to stdout; that summary is not documented as a structured JSON response. Connect to OpenAI or Anthropic, or use --provider openai-chat with --api-base and --api-key-env for an OpenAI-compatible Chat Completions endpoint. Freehand can also connect to configured MCP servers.Does Freehand need a GPU, and how should I size the host?
Can we use Freehand commercially and meet a self-hosting requirement?
When is Freehand a better fit than Claude Code?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy