.amika/config.toml. When a rig is created from a repository, Amika reads
this file and applies the settings automatically — every collaborator gets the
same environment without passing extra flags.
This page is the reference-tab summary. For the full concept guide — including
multi-repo and repo-less rigs — see
How configuration works. For the field-by-field spec,
see the config.toml reference.
File location
amika rig create, whether the CLI detects the repository from the current
directory or you pass --git <path-or-URL>.
Configuration resolution
Repository configuration acts as a template for rigs. Settings can come from multiple sources, and Amika resolves them in priority order:
The first non-empty value wins. Each configuration dimension (setup script,
start script, env vars, services, rig settings, additional repos, agent
credential defaults, and workflows) is resolved independently.
Sections at a glance
.amika/config.toml has these tables. Each links to its full spec.
[lifecycle] — Setup and start scripts
Lifecycle scripts run at rig initialization. Paths are relative to the
repository root.
setup_scriptruns once during initial creation with the working directory set to$AMIKA_AGENT_CWD. The hosted platform reads the file’s contents, so its executable bit in Git is not required. A nonzero exit marks setup as failed, but the rig remains accessible. Passing--setup-scripttoamika rig createtakes priority.start_scriptruns each time a stopped rig is started again — not on the initial create. It is re-read on each start. Use it for steps that must repeat on resume (starting a dev server, re-opening a tunnel).
See the
[lifecycle] spec for full details.
[filesystem] — Additional repos
Clone extra repositories into the rig alongside the primary repo.
~/workspace/<repo-name>. The primary repo is inferred automatically and need
not be listed.
See the [filesystem] spec for validation and
merge semantics.
Branch selection
When--branch is specified on amika rig create, the .amika/config.toml
file is read from that branch rather than the repository’s default branch. This
allows different branches to carry different rig configurations.
Example
Given this repository layout:config.toml:
amika rig create from anywhere inside my-project will:
- Clone the repository into the rig.
- Mount
.amika/setup.shas the setup script. - Set
NODE_ENV=developmentand resolveAPI_KEYfrom the secrets store. - Publish port 3000 with an HTTP URL.
- Use the
coderpreset with medium resource allocation.
Related docs
- How configuration works — concept guide: precedence, multi-repo, repo-less
- config.toml reference — full field-by-field spec
- Rig configuration — CLI flags, credential mounting, reserved ports
- Services — full
[services.<name>]reference