.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:- 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.
- Explicit paths — Checks the user config directory (
~/.config/clawker/) for additional config files. - Defaults — Applies built-in defaults as the lowest-priority base layer.
.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 explicitnull/~) 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 discoversclawker.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: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-levelname field in your .clawker.yaml to take over:
.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:
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.
clawker run from services/api/, the engine merges:
services/api/.clawker.yaml(highest priority).clawker.yamlat repo root~/.config/clawker/clawker.yaml(if exists)- Built-in defaults
Writes
When Clawker writes configuration changes (e.g., viaclawker 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 ininternal/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:User Settings Schema
The completesettings.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
Thealiases 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.)