init

Scan compose files and walk through generating a custom docktree.yml configuration.

Usage

docktree init [options]

The init command scans your existing Docker Compose files and helps onboard the repository to Docktree. By default, it writes a proposed configuration to docktree.yml.proposed, which you can review and rename to docktree.yml.

Flags

FlagDescription
--dry-runPrint the proposed config to stdout without writing a file
--forceOverwrite an existing docktree.yml instead of writing to docktree.yml.proposed
--applyRead preset answers as JSON from stdin and write the final docktree.yml configuration
--jsonEmit machine-readable JSON output (e.g. for structured setup scripts)

Examples

Interactively initialize configuration:

docktree init

Preview proposed configuration in the terminal:

docktree init --dry-run

Overwrite existing configuration directly:

docktree init --force

Automate configuration setup using preset values:

echo '{"shared.services.db.tenancy":"per_database"}' | docktree init --apply