From 108b736b7f4d20b69dbf53cf8bed9f1c4bfeb97a Mon Sep 17 00:00:00 2001 From: Zack Anselm Date: Mon, 8 Jun 2026 00:52:22 +0000 Subject: [PATCH 1/2] Rename from therr-agent to tiny-code Audit of the initial build-out: replace all references to the old working name (therr-agent / @therr/agent) with tiny-code. - package name and bin: tiny-code (package.json + package-lock.json) - env var prefix THERR_AGENT_* -> TINY_CODE_* - config dir ~/.config/therr-agent -> ~/.config/tiny-code - project config file therr-agent.config.json -> tiny-code.config.json - CLI usage text and REPL banner - README, AGENTS.md, .env.example - test fixtures (env keys, config filenames, temp-dir prefixes) Build, lint, typecheck, and all 59 tests pass. --- .env.example | 4 ++-- AGENTS.md | 2 +- README.md | 20 ++++++++++---------- package-lock.json | 6 +++--- package.json | 4 ++-- src/cli.ts | 4 ++-- src/config/load.ts | 16 ++++++++-------- src/repl.ts | 2 +- tests/commands/loader.test.ts | 2 +- tests/config/context.test.ts | 2 +- tests/config/load.test.ts | 18 +++++++++--------- tests/tools/fileTools.test.ts | 2 +- 12 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.env.example b/.env.example index 62a24b7..23d4820 100644 --- a/.env.example +++ b/.env.example @@ -3,5 +3,5 @@ ANTHROPIC_API_KEY= GEMINI_API_KEY= # Optional overrides (also settable via config file / CLI flags) -# THERR_AGENT_PROVIDER=anthropic # anthropic | gemini -# THERR_AGENT_MODEL=claude-opus-4-8 +# TINY_CODE_PROVIDER=anthropic # anthropic | gemini +# TINY_CODE_MODEL=claude-opus-4-8 diff --git a/AGENTS.md b/AGENTS.md index 888edef..02f652d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ -# Project Instructions for therr-agent +# Project Instructions for tiny-code This file is loaded into the agent's system prompt when it runs in this repo. diff --git a/README.md b/README.md index 6e114be..e146cb1 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -# therr-agent +# tiny-code A small, extensible CLI coding agent. Interactive terminal REPL, interchangeable **Anthropic** and **Gemini** models, and just the core features you actually use: read/write/edit files, run shell commands, search code, and a custom commands/skills system. No business logic baked in. -> Status: early (v0.x). The package/binary name (`@therr/agent` / `therr-agent`) -> is a working name and may change before the first npm publish. +> Status: early (v0.x). The package/binary name (`tiny-code`) may change before +> the first npm publish. ## Install ```bash -npm install -g @therr/agent +npm install -g tiny-code ``` Or run from source: @@ -34,9 +34,9 @@ export GEMINI_API_KEY=... ## Usage ```bash -therr-agent # start the REPL (uses an available key) -therr-agent --provider gemini # force a provider -therr-agent --model claude-opus-4-8 +tiny-code # start the REPL (uses an available key) +tiny-code --provider gemini # force a provider +tiny-code --model claude-opus-4-8 ``` In the REPL: type a request, watch it work. Mutating actions (writes, edits, @@ -55,7 +55,7 @@ conventions there. ## Custom commands (skills) Drop markdown files with YAML frontmatter into `./.agent/commands/` (per project) -or `~/.config/therr-agent/commands/` (global): +or `~/.config/tiny-code/commands/` (global): ```markdown --- @@ -73,8 +73,8 @@ after the command (appended if the placeholder is absent). ## Configuration -Optional `therr-agent.config.json` in the project root (or -`~/.config/therr-agent/config.json`). Precedence: defaults < config file < env < +Optional `tiny-code.config.json` in the project root (or +`~/.config/tiny-code/config.json`). Precedence: defaults < config file < env < CLI flags. ```json diff --git a/package-lock.json b/package-lock.json index 1fd825e..fc7364a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@therr/agent", + "name": "tiny-code", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@therr/agent", + "name": "tiny-code", "version": "0.1.0", "license": "MIT", "dependencies": { @@ -17,7 +17,7 @@ "zod-to-json-schema": "^3.24.0" }, "bin": { - "therr-agent": "dist/cli.js" + "tiny-code": "dist/cli.js" }, "devDependencies": { "@changesets/cli": "^2.29.0", diff --git a/package.json b/package.json index 6dd3b27..ca3d71a 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { - "name": "@therr/agent", + "name": "tiny-code", "version": "0.1.0", "description": "A small, extensible CLI coding agent with interchangeable Anthropic and Gemini models.", "type": "module", "bin": { - "therr-agent": "dist/cli.js" + "tiny-code": "dist/cli.js" }, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/cli.ts b/src/cli.ts index 1e11bef..b664658 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -6,10 +6,10 @@ import type { CliOverrides, Provider } from './config/load.js'; const require = createRequire(import.meta.url); const pkg = require('../package.json') as { version: string }; -const USAGE = `therr-agent — a small, extensible CLI coding agent +const USAGE = `tiny-code — a small, extensible CLI coding agent Usage: - therr-agent [options] + tiny-code [options] Options: --provider anthropic | gemini (default: inferred from API keys) diff --git a/src/config/load.ts b/src/config/load.ts index f7057ea..f71112b 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -73,10 +73,10 @@ function readFileConfig(path: string): FileConfig { */ export function loadConfig(overrides: CliOverrides = {}, cwd: string = process.cwd()): ResolvedConfig { const home = homedir(); - const homeConfig = readFileConfig(join(home, '.config', 'therr-agent', 'config.json')); + const homeConfig = readFileConfig(join(home, '.config', 'tiny-code', 'config.json')); const projectConfig = overrides.configPath ? readFileConfig(overrides.configPath) - : readFileConfig(join(cwd, 'therr-agent.config.json')); + : readFileConfig(join(cwd, 'tiny-code.config.json')); const file: FileConfig = { ...homeConfig, ...projectConfig }; const env = process.env; @@ -85,22 +85,22 @@ export function loadConfig(overrides: CliOverrides = {}, cwd: string = process.c const provider: Provider = overrides.provider ?? - (env.THERR_AGENT_PROVIDER as Provider | undefined) ?? + (env.TINY_CODE_PROVIDER as Provider | undefined) ?? file.provider ?? (anthropicApiKey ? 'anthropic' : geminiApiKey ? 'gemini' : 'anthropic'); const model = - overrides.model ?? env.THERR_AGENT_MODEL ?? file.model ?? DEFAULT_MODELS[provider]; + overrides.model ?? env.TINY_CODE_MODEL ?? file.model ?? DEFAULT_MODELS[provider]; - const maxTokens = env.THERR_AGENT_MAX_TOKENS - ? Number(env.THERR_AGENT_MAX_TOKENS) + const maxTokens = env.TINY_CODE_MAX_TOKENS + ? Number(env.TINY_CODE_MAX_TOKENS) : (file.maxTokens ?? 16_000); - const effort = (env.THERR_AGENT_EFFORT as Effort | undefined) ?? file.effort ?? 'high'; + const effort = (env.TINY_CODE_EFFORT as Effort | undefined) ?? file.effort ?? 'high'; const defaultCommandDirs = [ join(cwd, '.agent', 'commands'), - join(home, '.config', 'therr-agent', 'commands'), + join(home, '.config', 'tiny-code', 'commands'), ]; return { diff --git a/src/repl.ts b/src/repl.ts index 47b4a41..c5ce62f 100644 --- a/src/repl.ts +++ b/src/repl.ts @@ -61,7 +61,7 @@ export async function startRepl(overrides: CliOverrides): Promise { }); console.log( - pc.bold('therr-agent') + pc.dim(` · ${provider.name}:${provider.model} · ${cwd}`), + pc.bold('tiny-code') + pc.dim(` · ${provider.name}:${provider.model} · ${cwd}`), ); if (projectContext.trim().length > 0) { console.log(pc.dim('Loaded project context.')); diff --git a/tests/commands/loader.test.ts b/tests/commands/loader.test.ts index d5bde18..6872e84 100644 --- a/tests/commands/loader.test.ts +++ b/tests/commands/loader.test.ts @@ -7,7 +7,7 @@ import { loadCommands, renderCommand } from '../../src/commands/loader.js'; let root: string; beforeEach(async () => { - root = await mkdtemp(join(tmpdir(), 'therr-cmd-')); + root = await mkdtemp(join(tmpdir(), 'tiny-code-cmd-')); }); afterEach(async () => { diff --git a/tests/config/context.test.ts b/tests/config/context.test.ts index 6d1f6b9..0ca74c3 100644 --- a/tests/config/context.test.ts +++ b/tests/config/context.test.ts @@ -7,7 +7,7 @@ import { loadProjectContext } from '../../src/config/context.js'; let root: string; beforeEach(async () => { - root = await mkdtemp(join(tmpdir(), 'therr-ctx-')); + root = await mkdtemp(join(tmpdir(), 'tiny-code-ctx-')); }); afterEach(async () => { diff --git a/tests/config/load.test.ts b/tests/config/load.test.ts index ed62b2b..f1a5829 100644 --- a/tests/config/load.test.ts +++ b/tests/config/load.test.ts @@ -7,10 +7,10 @@ import { loadConfig } from '../../src/config/load.js'; const ENV_KEYS = [ 'ANTHROPIC_API_KEY', 'GEMINI_API_KEY', - 'THERR_AGENT_PROVIDER', - 'THERR_AGENT_MODEL', - 'THERR_AGENT_MAX_TOKENS', - 'THERR_AGENT_EFFORT', + 'TINY_CODE_PROVIDER', + 'TINY_CODE_MODEL', + 'TINY_CODE_MAX_TOKENS', + 'TINY_CODE_EFFORT', 'HOME', ]; @@ -18,13 +18,13 @@ let cwd: string; let saved: Record; beforeEach(async () => { - cwd = await mkdtemp(join(tmpdir(), 'therr-cfg-')); + cwd = await mkdtemp(join(tmpdir(), 'tiny-code-cfg-')); saved = {}; for (const k of ENV_KEYS) { saved[k] = process.env[k]; delete process.env[k]; } - // Isolate from any real ~/.config/therr-agent/config.json + // Isolate from any real ~/.config/tiny-code/config.json process.env.HOME = cwd; }); @@ -61,7 +61,7 @@ describe('loadConfig', () => { it('reads a project config file', async () => { await writeFile( - join(cwd, 'therr-agent.config.json'), + join(cwd, 'tiny-code.config.json'), JSON.stringify({ provider: 'anthropic', maxTokens: 8000, @@ -78,10 +78,10 @@ describe('loadConfig', () => { it('lets env override the config file model', async () => { await writeFile( - join(cwd, 'therr-agent.config.json'), + join(cwd, 'tiny-code.config.json'), JSON.stringify({ provider: 'anthropic', model: 'from-file' }), ); - process.env.THERR_AGENT_MODEL = 'from-env'; + process.env.TINY_CODE_MODEL = 'from-env'; const cfg = loadConfig({}, cwd); expect(cfg.model).toBe('from-env'); }); diff --git a/tests/tools/fileTools.test.ts b/tests/tools/fileTools.test.ts index 8ad68a0..4de6c5d 100644 --- a/tests/tools/fileTools.test.ts +++ b/tests/tools/fileTools.test.ts @@ -12,7 +12,7 @@ import { grepTool } from '../../src/tools/grep.js'; let cwd: string; beforeEach(async () => { - cwd = await mkdtemp(join(tmpdir(), 'therr-agent-')); + cwd = await mkdtemp(join(tmpdir(), 'tiny-code-')); }); afterEach(async () => { From 9e8dd8b721c54a8e76d116f80356e53d0e78995b Mon Sep 17 00:00:00 2001 From: Zack Anselm Date: Mon, 8 Jun 2026 00:54:32 +0000 Subject: [PATCH 2/2] Scope package name as @therr/tiny-code Use the scoped package name @therr/tiny-code (package.json + package-lock.json) while keeping the binary as tiny-code. Update the README install command and name note accordingly. Build, lint, typecheck, and all 59 tests pass. --- README.md | 6 +++--- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e146cb1..0f8c0ab 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ A small, extensible CLI coding agent. Interactive terminal REPL, interchangeable read/write/edit files, run shell commands, search code, and a custom commands/skills system. No business logic baked in. -> Status: early (v0.x). The package/binary name (`tiny-code`) may change before -> the first npm publish. +> Status: early (v0.x). Published as `@therr/tiny-code`; the binary is +> `tiny-code`. Names may change before the first npm publish. ## Install ```bash -npm install -g tiny-code +npm install -g @therr/tiny-code ``` Or run from source: diff --git a/package-lock.json b/package-lock.json index fc7364a..5979ddd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "tiny-code", + "name": "@therr/tiny-code", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "tiny-code", + "name": "@therr/tiny-code", "version": "0.1.0", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index ca3d71a..934b45f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "tiny-code", + "name": "@therr/tiny-code", "version": "0.1.0", "description": "A small, extensible CLI coding agent with interchangeable Anthropic and Gemini models.", "type": "module",