The steps of a run
- Pre-flight. corralctl checks that
gitis onPATHand stops with a clear error if not. - Authenticate. It resolves credentials: an explicit token, the environment, or the
ghCLI. - List repositories. It fetches the first page from the forge API, and if there are more, fetches the rest concurrently, up to five pages at once.
- Filter and select. Visibility, language, fork and archive filters apply; with
-i, you pick in the terminal dashboard. - Render paths. The layout template turns each repository into its
Collection/Bucket/Namepath. - Dispatch to workers. A pool of
--concurrencyworkers takes each repository and decides: clone it, skip it, or sync it. - Smart sync. For an existing clone, the worker compares the forge's
pushed_atwith the value stored in.corral-state.json, and runsgit pull --rebase --autostashonly if it advanced. - Record and clean up. Each worker stamps the sidecar file; at the end, empty folders left from an older flat layout are removed, and with
--orphans, clones that no longer exist upstream are reported.
Why it is a single static binary
corralctl is written in Go with no C dependencies (CGO_ENABLED=0), so a release binary carries no libc coupling and runs as one file. The same binary is the CLI, the terminal dashboard and the MCP server.
Where to read more
The design decisions are recorded as architecture decision records in the repository, and docs/ARCHITECTURE.md covers the packages.