From b4567ed0fe7ede14e529d0dce9d2e60ebce87be4 Mon Sep 17 00:00:00 2001 From: Evan Tahler Date: Tue, 17 Feb 2026 15:33:04 -0800 Subject: [PATCH 1/3] Add CLAUDE.md with project overview and developer reference Includes repository purpose, command reference, project structure, environment setup, and CI pipeline details. Co-Authored-By: Claude Haiku 4.5 --- CLAUDE.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..07f09ea --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,37 @@ +# CLAUDE.md + +## What This Is + +CLI agent template built with Bun + TypeScript. Provides an interactive chat interface powered by OpenAI's agent framework with Arcade.dev toolkit integration. Designed as a starting point for engineers building AI agents with external tool execution. + +## Commands + +| Command | Purpose | +|---------|---------| +| `bun install` | Install dependencies | +| `bun test` | Run tests (mocked, no API keys needed) | +| `bun lint` | Check formatting (Prettier) | +| `bun format` | Fix formatting | +| `bun build agent.ts --compile --outfile agent` | Compile to standalone binary | +| `./agent.ts chat [message]` | Run the agent | + +## Project Structure + +- `agent.ts` — CLI entry point (Commander.js). Single `chat` command with `-t, --toolkits` option +- `classes/wrappedAgent.ts` — Abstract base agent with streaming, conversation history, interactive REPL +- `classes/config.ts` — Loads required env vars: `OPENAI_API_KEY`, `OPENAI_MODEL`, `LOG_LEVEL`, `ARCADE_API_KEY`, `USER_ID` +- `classes/logger.ts` — Logging with levels, colors (chalk), spinners (ora), tool call tracking +- `agents/general.ts` — Main agent implementation extending WrappedAgent +- `utils/tools.ts` — Arcade.dev toolkit → OpenAI agent tool conversion +- `utils/client.ts` — OpenAI client initialization +- `tests/` — Tests for CLI parsing, config loading, and logger + +## Environment + +- Runtime: Bun (v1.2.9+) +- TypeScript with ESNext target, bundler module resolution +- See `.env.example` for required environment variables + +## CI + +GitHub Actions runs three jobs: compile, lint, test. All must pass. From 5288424252e56074f2d90f0f4d8f5bdf79d4eddc Mon Sep 17 00:00:00 2001 From: Evan Tahler Date: Tue, 17 Feb 2026 15:35:53 -0800 Subject: [PATCH 2/3] Fix prettier formatting in CLAUDE.md Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 07f09ea..b6b5c75 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,14 +6,14 @@ CLI agent template built with Bun + TypeScript. Provides an interactive chat int ## Commands -| Command | Purpose | -|---------|---------| -| `bun install` | Install dependencies | -| `bun test` | Run tests (mocked, no API keys needed) | -| `bun lint` | Check formatting (Prettier) | -| `bun format` | Fix formatting | -| `bun build agent.ts --compile --outfile agent` | Compile to standalone binary | -| `./agent.ts chat [message]` | Run the agent | +| Command | Purpose | +| ---------------------------------------------- | -------------------------------------- | +| `bun install` | Install dependencies | +| `bun test` | Run tests (mocked, no API keys needed) | +| `bun lint` | Check formatting (Prettier) | +| `bun format` | Fix formatting | +| `bun build agent.ts --compile --outfile agent` | Compile to standalone binary | +| `./agent.ts chat [message]` | Run the agent | ## Project Structure From e44e85c8b76ac1e22886e835e14c6d51e775855c Mon Sep 17 00:00:00 2001 From: Evan Tahler Date: Tue, 17 Feb 2026 15:36:43 -0800 Subject: [PATCH 3/3] Add bun format reminder to CLAUDE.md CI section Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index b6b5c75..1946734 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -35,3 +35,5 @@ CLI agent template built with Bun + TypeScript. Provides an interactive chat int ## CI GitHub Actions runs three jobs: compile, lint, test. All must pass. + +Run `bun format` before committing to avoid lint failures.