Config File

claw.config.ts is the single source of truth for your agent. It defines which model to use, which tools are available, and how the agent should behave.

Full example

claw.config.ts
import { defineConfig } from "testy-claw";

export default defineConfig({
  // Model
  model: "gpt-4o",           // or "claude-3-5-sonnet", "mistral-large", etc.
  provider: "openai",        // "openai" | "anthropic" | "mistral" | "custom"

  // Tools
  tools: ["fs", "shell", "http", "git"],

  // Limits
  maxSteps: 20,              // max tool calls per run
  timeout: 30_000,           // ms per tool call

  // Context
  contextFiles: [            // always include these files in context
    "README.md",
    "package.json",
  ],

  // Output
  logDir: ".claw/runs",      // where run logs are saved
  verbose: false,            // print every step to stdout
});

All options

OptionTypeDefaultDescription
modelstring"gpt-4o"Language model identifier
providerstring"openai"API provider
toolsarray["fs"]Enabled tools
maxStepsnumber20Max tool calls per run
timeoutnumber30000Per-step timeout in ms
contextFilesstring[][]Files always added to context
logDirstring".claw/runs"Run log output directory
verbosebooleanfalsePrint each step to stdout
systemPromptstringundefinedOverride the default system prompt

Environment variable overrides

Any config option can be overridden at runtime with an environment variable prefixed with CLAW_.

terminal
CLAW_MODEL=claude-3-5-sonnet CLAW_MAX_STEPS=5 testy-claw run "your task"
NoteThe config file is optional. If no claw.config.ts is found, Testy Claw uses all defaults and enables only the fs tool.