Repository navigation
01 Getting Started
This page takes you from "no croft" to "first recipe + first hook + open dashboard" in under five minutes. After that, the Quick Tour shows the rest of the surface.
croft is a single Rust binary. Three install paths:
brew install nsrosenqvist/croft/croftgit clone https://github.com/nsrosenqvist/croft
cd croft
cargo install --path .The binary is named croft and lands in ~/.cargo/bin/.
cargo install croft(Not yet on crates.io. Track the project README for the publish announcement.)
croft --versionInside any project directory:
croft initThis drops a croft.toml at the project root and walks a registry of
ecosystem detectors against the directory. Each detector contributes
to the generated file:
| Detector | Trigger files | What it contributes |
|---|---|---|
compose |
docker-compose.{yml,yaml}, compose.{yml,yaml}
|
[runtime] backend = "compose" |
devcontainer |
.devcontainer/devcontainer.json, .devcontainer.json
|
[devcontainer] enabled = true |
dotenv |
.env, .env.local
|
[env_files] entries |
node |
package.json, deno.json[c], plus lockfile selects the tool |
dev / build / test / lint using npm / pnpm / yarn / bun / deno
|
python |
uv.lock, poetry.lock, pdm.lock, Pipfile.lock, requirements.txt, pyproject.toml
|
install / test / (lint) using uv / poetry / pdm / pipenv / pip
|
rust |
Cargo.toml (workspace-aware) |
build / test / fmt / check
|
go |
go.mod |
build / test / run / vet
|
ruby |
Gemfile; Rails via bin/rails or config/application.rb
|
install / test; Rails adds console / migrate
|
php |
composer.json; Laravel via artisan; Symfony via symfony.lock
|
install / test; Laravel adds artisan / migrate, Symfony adds console
|
Open the file — every detected command is commented. Uncomment
the ones you want to keep. When two detectors suggest the same name
(e.g. both node and rust want build), init emits both under a
"Multiple ecosystems suggest …" header so you can pick one.
Pass --template <NAME> to skip auto-detection and start from a
hand-curated stack scaffold instead (laravel, rails, node,
rust).
Edit croft.toml to add a recipe for a command you actually run:
[command.up]
desc = "Start all services"
run = "docker compose up -d"
[command.shell]
desc = "Open a shell in the app container"
in = "app"
run = "/bin/sh"
tty = truein = "app" execs inside the named compose service. Absent → host.
tty = true allocates a pseudo-TTY (required for shells).
Run them:
croft up
croft shellcroft list (or croft ls) shows every recipe and script, with
their descriptions.
Add [hooks] to croft.toml:
[command.check]
desc = "Format + lint"
run = ["check:format", "check:lint"]
[command.check:format]
run = "cargo fmt -- --check"
[command.check:lint]
run = "cargo clippy --all-targets -- -D warnings"
[hooks]
pre-commit = ["check"]Then:
croft hooks installThis writes .git/hooks/pre-commit as a shim that runs croft hooks run pre-commit. Try it: git commit triggers check
automatically. See Hooks for the full model
(including .pre-commit-config.yaml compatibility).
croftBare croft opens the TUI: a sidebar of every recipe,
script, and service; an output pane for whatever's selected; service
lifecycle keymaps; a built-in diff view (G); a
worktree switcher (W).
- The full tour → Quick Tour — a guided 5-minute walk through every major feature.
-
Schema reference →
Configuration Reference for
every
croft.tomlkey. -
Real projects → Examples — runnable
configurations under
examples/. -
Stuck? → Troubleshooting —
croft doctorand common pitfalls.
croft is dual-licensed under MIT or Apache 2.0. Source: github.com/nsrosenqvist/croft. Back to Home.