Repository navigation
18 Examples
Runnable croft projects under
examples/
in the source tree. Clone the repo, cd into one, and croft list will show what's wired up.
The smallest useful croft.toml: a couple of host-only recipes,
no containers, no services. Use as a starting template when you're
adding croft to a project that doesn't need compose.
Showcases:
-
[command.*]recipe basics. -
[env]resolution without container backends. -
[runtime].backend = "none".
A complete Laravel + Docker Compose project, modeled on the
hand-rolled dev scripts croft was built to replace. Covers most
of the surface in one place.
Showcases:
- Compose backend with
default_service = "app". - Recipes that exec inside containers (
croft artisan migrate,croft shell,croft test --filter Login). - Native
[hooks]plus a.pre-commit-config.yamlmix. - Watch mode pinned in the TUI as a pane.
-
[worktrees].dotenv = ".env"so two checkouts run side-by-side with distinct port ranges.
.croft/install/ ordered setup with optional + interactive steps.
Walks through croft install, single-step mode (croft install <step>), --restart, --list, and how install.state.json
drives resume.
Showcases:
- Numeric-prefix ordered steps (
01-copy-env,02-install-deps,03-seed-db,04-finalize). -
# @optional: yesfor steps that may fail in some environments. -
# @interactive: yespluscroft lib askfor first-run secret prompts. - Resume-after-failure prompt and
--restart.
Git hook configuration end to end: native [hooks] recipes plus a
.pre-commit-config.yaml mixing repo: local (language: system)
and an external repo at a pinned tag.
Showcases:
-
croft hooks installwrites.git/hooks/pre-commit. - The shim format and what gets executed.
-
.croft/cache/hooks/<rev>/cache for the external repo. - The
repo: meta/ unsupported-language error messages and how to wrap a non-systemhook with alanguage: scriptshim.
Opt-in devcontainer integration: [devcontainer] enabled = true
plus a minimal image-only .devcontainer/devcontainer.json. Use as
a starting template when you want croft shell and TUI terminals
to land inside an isolated workspace container instead of the host.
Showcases:
-
[devcontainer]config block. - Auto-detect of
.devcontainer/devcontainer.json. -
remoteEnvinjected into everydocker exec. -
croft doctorreporting the resolved container + image plan.
A self-describing upstream layout an org can fork to ship shared
agent instructions and skills via [[agents.sources]].
Showcases:
-
croft-agents.tomlupstream manifest with[[file]],[[dir]], andmode = "once". -
agents/CLAUDE.md,agents/AGENTS.md,skills/,commands/directory layout. - Local sibling overrides (
CLAUDE.local.md). - Downstream override examples (skip / relocate).
- Getting Started — first project from scratch.
- Quick Tour — a guided walk-through that references each example.
croft is dual-licensed under MIT or Apache 2.0. Source: github.com/nsrosenqvist/croft. Back to Home.