daukle
A build tool that is only a plugin API. Core knows nothing about any language, compiler or build system: it reads a manifest, acquires plugins, and runs what they declare. Every ability in this site arrives through one of the plugins in the sidebar.
A project
A daukle.toml and your sources are the whole of it: no build file, no wrapper properties and nothing generated at the root. 01-first-project builds one from scratch and is where the manifest that used to be copied out here now lives.
Getting daukle
A project never needs an installed daukle. Three committed files are what make it own none: daukle, daukle.ps1 and .daukle/wrapper.toml. The first run fetches the exact binary the pin names and verifies it against a sha256 before running it:
./daukle sync
Starting from nothing
With a daukle at hand, daukle init writes all three, with no network, pinning that daukle. Each release publishes one archive per host, daukle-<host>.tar.gz or daukle-windows-x86_64.zip, holding the binary and the release's wrapper.toml; unpack it anywhere and run its daukle init in the project directory. init refuses a pin naming another version, and a daukle with no pin beside it (a bare binary, or one built from source) writes daukle.toml and exits 3.
With nothing installed, the three files are release assets, so you download three text files, read them, and commit them.
base=https://github.com/daukle/daukle/releases/latest/download
mkdir -p .daukle
curl -fsSL -o daukle "$base/daukle"
curl -fsSL -o daukle.ps1 "$base/daukle.ps1"
curl -fsSL -o .daukle/wrapper.toml "$base/wrapper.toml"
chmod +x daukle
./daukle init
$base = 'https://github.com/daukle/daukle/releases/latest/download'
New-Item -ItemType Directory -Force .daukle > $null
Invoke-WebRequest "$base/daukle" -OutFile daukle
Invoke-WebRequest "$base/daukle.ps1" -OutFile daukle.ps1
Invoke-WebRequest "$base/wrapper.toml" -OutFile .daukle/wrapper.toml
.\daukle.ps1 init
This is deliberately not curl | sh. The pin is a version and a digest per host a reviewer reads before anything executes, and piping a script into a shell would throw that away at the one moment it is worth most. Commit all three files; ./daukle wrapper update [version] replaces them later, and it is explicit rather than automatic so that daukle's own bootstrap never becomes the one thing in the system that updates itself.
It is also the one unpinned step a project ever takes. Whatever downloads the wrapper has no digest to check it against yet, because the digests are what it is downloading. Everything after it is pinned: the wrapper refuses a binary whose sha256 does not match the pin, and inside daukle there is exactly one unpinned fetch, it belongs to the resolver, and it is refused outside an explicit --resolve run.
Which route works on which host
A release carries the two wrapper scripts, the pin, three platform binaries covering four hosts, because one of them serves both Macs, and an archive of each binary with the pin. The wrapper composes a host string from the operating system and the architecture and looks it up in the pin, so a host with no entry is refused by name rather than failing on a download later:
| host | binary | wrapper | build from source |
|---|---|---|---|
| linux/x86_64 | daukle-linux-x86_64, statically linked | yes | yes |
| macos/aarch64 | daukle-macos-universal | yes | yes |
| macos/x86_64 | daukle-macos-universal, the same file | yes | yes |
| windows/x86_64 | daukle-windows-x86_64.exe | yes | yes |
| linux/aarch64 | none published | refused by name | yes |
| windows/aarch64 | none published | refused by name | yes |
Both Macs are served by one universal binary rather than two downloads, which is why the two rows name the same file. A host with no row at all is refused by name before anything is downloaded, and building from source needs a C compiler, CMake and libcurl's development headers.
A POSIX shell on Windows (Git Bash, MSYS2, Cygwin) runs the Windows binary through ./daukle, rather than being sent to daukle.ps1.
There is no Homebrew, winget, AUR or npm package yet; they are planned, for creating a project with a daukle init that works offline. A project itself never needs an installed daukle: the wrapper it commits fetches the pinned one. Until the packages exist, one downloaded archive serves.
Commands
| command | what it does |
|---|---|
sync | bring the project into line with its manifest |
check | report whether it is in sync, changing nothing |
tasks | list the tasks the plugins declare |
<task> | run one by the name tasks lists |
clean | remove what sync generated |
init | write a starter daukle.toml |
plugin update | refetch plugins, ignoring the cache |
migrate | turn a project built by another tool into a daukle project |
migrate --done | delete the old tool's files a finished migration kept |
compare <old> <new> | list every difference between two build outputs |
--resolve allows a task to fetch an unpinned url and report its digest. --no-cache refetches.
Migrating a project built by another tool
daukle migrate runs in a directory that holds no daukle.toml or daukle.lua, and refuses one that does. It knows no build tool. It reads catalogs, lists of plugins each with the files that make a project theirs, detects which of those plugins the directory needs, and asks each one for the project's model. Where a plugin answers with something daukle cannot express, it writes nothing and prints every such blocker, grouped by who reported it.
When nothing blocks, it writes daukle.toml, builds the project with the old tool and with daukle, compares the artifacts each migrator named, and only then moves the old tool's files to build/daukle/migrate/old. Run daukle migrate --done to delete them once you are satisfied.
| exit | meaning |
|---|---|
| 0 | migrated; the old files are in build/daukle/migrate/old |
| 3 | blocked; nothing was written |
| 4 | the proof failed; daukle.toml and the migrator's files are kept for inspection and nothing was moved |
| 1 | an error in migrate itself, such as a fetch, a plugin error or a malformed catalog |
--catalog <location>adds a catalog, an https url or a path, and can be repeated. A catalog
pins the plugin code migrate runs, so a plain http:// url is refused unless its host is 127.0.0.1, localhost or [::1]. The same holds for DAUKLE_CATALOGS.
--with <id>uses the catalog plugin with that id at the project root even if no rule matched,
and can be repeated. An id no catalog lists is an error.
DAUKLE_CATALOGSholds whitespace-separated locations. Each--catalogis added after them.
With no location at all, migrate stops and says so.
- The wrapper sets
DAUKLE_CATALOGSfrom thecatalogslist in.daukle/wrapper.tomlwhen the
variable is unset or empty. A DAUKLE_CATALOGS you set yourself replaces that default, and a pin with no catalogs line leaves the variable alone.
--report <file>writes the run as JSON, whatever the outcome; see below.migrate --donetakes no--catalogor--with, and fails when there is nothing to finish.daukle cleanrefuses whilebuild/daukle/migrate/oldexists, because that directory holds
the only copy of what the migration replaced.
A catalog is read at run time and never cached. It is a JSON document with a plugins list; each entry has an id, an asset of { url, sha256 } that migrate pins into the [plugins] table of the manifest it writes, detect rules of files, optional contains patterns and a scope of root or tree, and a replaces map of tool, then kind, then foreign plugin ids. An optional skip is a list of directory names the detection walk never enters, at any depth; it is the union across every plugin of every catalog loaded, so one entry can keep installed dependencies out of all the rules. A malformed entry is dropped with a warning, and an id listed twice keeps the earlier catalog's entry. A plugin with no asset that migrate would need is a blocker, since there is nothing to pin.
The report
--report <file> writes one JSON object, the path relative to the working directory:
| key | holds |
|---|---|
report | 1, the version of this shape |
outcome | migrated, blocked, unproved, undetected (no catalog plugin recognised the project, exit 1) or error (any other exit 1) |
error | the message, for undetected and error only |
detected | each detection as { plugin, dir }, dir empty at the root |
blockers | each as { source, construct, where, why, surface }, surface null where no surface row names it |
proof | { failure?, compared }: failure when a proof task failed, and each comparison as { instance, old, new, as, same, differences, truncated }, or with error when a side could not be read |
A difference is { member, kind } for an archive and { kind, oldSha256, newSha256 } for two files, with kind one of only-old, only-new, bytes, symlink-old and symlink-new. A list stops at 10000 differences and sets truncated. The report's path is written first, so one that cannot be written stops migrate with exit 1 before anything else happens.
Comparing two build outputs
daukle compare <old> <new> [--as bytes|archive] [--json] compares the way a migration's proof does, needs no project, and lists every difference rather than the first. --as bytes, the default, compares the two files; --as archive compares a zip, jar or tarball by its file members' names and bytes, ignoring their order, directory members and timestamps. Both sides must be files; a directory is refused. It prints one line per difference, or with --json one object of same, as, differences and truncated, the differences shaped as in the report above.
| exit | meaning |
|---|---|
| 0 | the two are the same |
| 3 | they differ |
| 2 | a usage error, such as an --as other than bytes or archive |
| 1 | either side cannot be read |
The plugin side is on 02-plugins.
Where things are written
Described in full on 04-dependencies-and-compiling, which is where the table that used to sit here went. The rule it states is that a file you are not supposed to edit never sits at the project root.
The logic layer
Described in full on 03-logic-layer, which is where the two sentences that used to sit here went. Two descriptions of one subject written days apart is how both of them go stale.
What core deliberately does not know
Any language, any compiler, any build system, and what build means. The last one is a plugin too: lifecycle owns the standard task vocabulary so that core reserving those names never becomes the one hardcoded language concept.