Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TeensyCode

A small, local-first AI coding agent harness. You point it at a project, give it a task in plain English, and it reads, searches, and edits files — then runs the project's own verification commands to prove the work.

Built on the Vercel AI SDK (ToolLoopAgent) and run with Bun.

What it can do

  • Read and search files, run shell commands, and write/edit code
  • Spawn subagents (read-only explorer, trusted executor) for bigger tasks
  • Discover and load project skills/SKILL.md files
  • Derive verification gates (typecheck, lint, test, build) from package.json and require the agent to run them
  • Gate risky shell commands behind an approval allowlist
  • Pick your sandbox: run on the host (local) or inside just-bash's in-memory filesystem

Requirements

  • Bun >= 1.x
  • An OpenRouter API key for model access (set OPENROUTER_API_KEY)

Usage

bun install
bun run index.ts -- /path/to/project "Add OAuth login. Check the auth-patterns skill first."

Options

Flag Default Description
--sandbox local local or just-bash
--model openrouter/free Model ID to use

Agent text prints to stdout; tool calls, step traces, and errors print to stderr.

Project layout

index.ts                    # entrypoint: CLI, wiring, agent loop
src/
  sandbox.ts                # Sandbox interface (read/write/exec)
  sandbox-local.ts          # host-backed implementation
  sandbox-just-bash.ts      # in-memory just-bash implementation
  tools.ts                  # tool factories (read, grep, bash, write, edit, ...)
  registry.ts               # named tool registry + wrapTool hooks
  approval.ts               # command allowlist / trust gating
  system.ts                 # system prompt builder
  skills.ts                 # skill discovery
  verification.ts           # derive gates from package.json
  cache.ts                  # prompt-cache markers
skills/                     # project skills (SKILL.md files)

Development

bun run typecheck   # npx tsc --noEmit
bun run verify      # typecheck + lint + test

Roadmap

  • Port the harness core to Rust

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages