Skip to main content
Every Clawker project has a .clawker.yaml file in the project root. Create one with:

How Configuration Works

Clawker uses a layered configuration system that discovers, loads, and merges YAML files from multiple locations. Understanding this system is key to using Clawker effectively — especially in monorepos, shared environments, or when you want per-directory overrides.

Discovery and Merge

When you run any Clawker command, the configuration engine:
  1. Walk-up discovery — Starting from your current working directory, walks up the directory tree to the registered project root, probing for config files at each level.
  2. Explicit paths — Checks the user config directory (~/.config/clawker/) for additional config files.
  3. Defaults — Applies built-in defaults as the lowest-priority base layer.
Files found closer to CWD have higher priority than files found further up the tree. This means a .clawker.yaml in a subdirectory overrides values from the one at the project root. Merge rules:
  • Scalars (strings, numbers, booleans): closest-to-CWD wins.
  • Maps (objects): recursively merged — keys from higher-priority files override, but unmentioned keys from lower-priority files are preserved.
  • Slices (arrays): replaced entirely by higher-priority files, unless the field is tagged for union merge (e.g., firewall add_domains).
  • Unset vs. empty: a key written with no value (harness:, or an explicit null/~) is unset — the merge skips it and the layer below (or the built-in default) shows through. An explicit empty value (packages: [], env: {}, post_init: "") is a real value and merges by the rules above.

File Placement

At each directory level during walk-up, the engine checks two placement styles: The directory form takes precedence. Both .yaml and .yml extensions are accepted.
Walk-up discovery is bounded — it never walks past the registered project root and never reaches ~/.config/clawker/. Home-level configs are loaded separately via the explicit path mechanism.

Local Overrides

Clawker also discovers clawker.local.yaml (or .clawker.local.yaml / .clawker/clawker.local.yaml) files alongside the main config. These are intended for machine-specific or developer-specific settings that shouldn’t be committed to version control. At each directory level, both clawker.yaml and clawker.local.yaml are discovered. The local file merges at the same priority level but is loaded after the main file, so its values win.

Precedence (Highest to Lowest)

Project Registration

Walk-up discovery requires your project to be registered in the project registry. This is how Clawker knows where to stop walking up:
If CWD is not within a registered project, walk-up is skipped entirely and only the user config directory and defaults are used.

Project name normalization

When you register a project, Clawker derives the slug from your directory name. Mixed case becomes lowercase, spaces become hyphens, and the slug is used downstream for Docker container/volume names and the cert SAN identity. If the directory name produces a slug you don’t like — or your directory name contains characters Docker won’t accept — set the top-level name field in your .clawker.yaml to take over:
The override applies at every command run (it’s read from the project config, not the registry). The hierarchy is: positional/CLI flag > .clawker.yaml::name > directory-derived slug. The registry is registry.yaml under clawker’s data directory — $XDG_DATA_HOME/clawker (with $XDG_DATA_HOME itself defaulting to ~/.local/share per the XDG Base Directory spec), or $CLAWKER_DATA_DIR when set — and maps project names to filesystem paths (managed via clawker project commands):

Monorepo Support

The layered merge system enables monorepo workflows. Place a shared .clawker.yaml at the repo root with common settings, then add per-service overrides in subdirectories:
To create a subdir config, run clawker init from inside the subdirectory. It detects that you’re inside an existing project and skips project registration — going straight to preset selection and config file creation. The resulting file layers on top of the root config.
When you run clawker run from services/api/, the engine merges:
  1. services/api/.clawker.yaml (highest priority)
  2. .clawker.yaml at repo root
  3. ~/.config/clawker/clawker.yaml (if exists)
  4. Built-in defaults
Only the fields you specify in the subdirectory config are overridden. Everything else inherits from the parent.

Writes

When Clawker writes configuration changes (e.g., via clawker project init), each field is routed back to the file it originally came from (provenance tracking). New fields that didn’t come from any file are written to the highest-priority discovered file. All writes are atomic (temp file + fsync + rename) with advisory file locking for cross-process safety.

Project Configuration Schema

The complete .clawker.yaml schema with all fields and nested object structures. Descriptions are shown as comments.

Project Configuration Reference

The following tables are auto-generated from the schema struct tags in internal/config/schema.go. Each section corresponds to a top-level key in .clawker.yaml.

name

build

instructions

inject

agent

claude_code

workspace

security

firewall

git_credentials

harnesses

aliases

bundles

monitor

Interactive Editing

Instead of editing YAML by hand, you can use Clawker’s built-in interactive editor:
The editor opens a TUI with your configuration fields grouped into tabs. You can browse fields, see their current values and defaults, edit them inline, and save. When you save a field, you choose which config layer to write it to — for example, saving to a local override file instead of the committed project config. The editor also shows which file each value comes from, so you can see exactly how the layered merge is working.

User Settings Schema

The complete settings.yaml schema.

User Settings Reference

Global settings live at ~/.config/clawker/settings.yaml. The following tables are auto-generated from the schema struct tags.

logging

otel

monitoring

telemetry

host_proxy

manager

daemon

firewall

control_plane

docker

You can also place a clawker.yaml in ~/.config/clawker/ to set user-level project config defaults. This file is merged as the lowest-priority project config layer (just above built-in defaults), so any project-level .clawker.yaml overrides it.

Command Aliases

The aliases key defines command shortcuts that expand before execution, merged across config layers like any other project key. See the Command Aliases guide for the alias syntax, shipped defaults, team sharing, and management with the clawker alias command group.

Directory Structure

Clawker follows the XDG Base Directory Specification. Files are organized across three directories: These follow the XDG base directories, which themselves default to ~/.config, ~/.local/share, and ~/.local/state when the XDG_*_HOME vars are unset — so on a typical machine the directories land at ~/.config/clawker, ~/.local/share/clawker, and ~/.local/state/clawker. To point clawker somewhere else without touching your XDG vars, set CLAWKER_CONFIG_DIR, CLAWKER_DATA_DIR, or CLAWKER_STATE_DIR — each takes precedence over its XDG_*_HOME counterpart. (On Windows, %AppData% / %LOCALAPPDATA% stand in for the unset XDG defaults.)