AI coding assistant with direct filesystem access. Learning project.
bunx github:thatbeautifuldream/mini-claude-codenpx github:thatbeautifuldream/mini-claude-codepnpm dlx github:thatbeautifuldream/mini-claude-codeyarn dlx github:thatbeautifuldream/mini-claude-codeexport OPENAI_API_KEY=your-key-herebun installbun run devScreen.Recording.2026-02-26.at.10.51.10.PM.mov
Uses ToolLoopAgent from ai SDK:
const agent = new ToolLoopAgent({
model: openai("gpt-4o"),
tools: bashToolkit.tools,
instructions: INSTRUCTIONS,
stopWhen: stepCountIs(50),
});Each turn streams steps via onStepFinish:
agent.stream({
messages: trimmed,
onStepFinish(stepResult) {
// Captures tool calls, results, token usage
},
});Bash tool wraps just-bash with safety hooks:
createBashTool({
sandbox: customBash,
onBeforeBashCall: blockDangerousCommands,
onAfterBashCall: logFailures,
});Direct filesystem via ReadWriteFs:
new ReadWriteFs({ root: rootPath });Custom commands:
defineCommand("explain", readFile);
defineCommand("lint", suggestLinter);
defineCommand("deps", showDeps);| Command | What |
|---|---|
/help |
Show commands |
/clear |
Clear history |
/git |
Git status + commits |
/exit |
Quit |
Blocks DANGEROUS_COMMANDS via onBeforeBashCall:
rm -rf /,rm -rf *,rm -rf .dd if=,mkfs,fdiskgit push --force,git reset --hard
MIT