Anarchy Tools compatible

The Anarchy Tools Build Tool.

atbuild is a small, configurable, mature, and boring Swift buildsystem.

  1. It just builds your code. That’s it. No bells, whistles, file downloads, or feature creep.
  2. It is extensible and can be easily customized to work how you want.
  3. It has no magic. It doesn’t guess. It does what you tell it to do.
  4. It has no opinions. It does not look down on you for writing code “wrong”.
  5. It is used to build many large production projects.

It follows the Anarchy Tools philosophy of simple, unopinionated, hackable tools.

Key atbuild features:

atbuild pairs well with:


With atbuild you define a set of tasks, representing high-level operations like building, running, and cleaning. Then you can use these tasks from the command line.

$ atbuild build
$ atbuild build-tests
$ atbuild run-tests
$ atbuild #runs a task named "default"

Tasks are defined in a clojure-like format. Here’s a simple example:

;; This is a comment

  :name "foo"

  ;;These "tasks" are just entrypoints on the CLI.
  ;;For example, `atbuild build` runs the `build` task.
  :tasks {
    :run {
      :tool "shell"               ;;Tools are functions built into atbuild.
      :script "echo Hello world!" ;;The shell tool requires a script

Name that build.atpkg. Now we can call

$ atbuild run
Building package foo...
Running task run...
Hello world!
Completed task run.
Built package foo.

Building Swift code

How do we build a Swift project? There’s a built-in tool called atllbuild, which is our low-level build system.

  :name "foo"

  ;;These "tasks" are just entrypoints on the CLI.
  ;;For example, `atbuild build` runs the `build` task.
  :tasks {
    :build {
      :tool "atllbuild"
      :sources ["src/**.swift"] ;;walk the src directory, looking for Swift files
      :output-type "executable"
      :name "example"

That’s all you need to get started! atbuild supports many more usecases than can fit in a README. For more information, browse our documentation.


atbuild supports several command-line options:


We publish binary releases, which are the easiest way to get started.

atbuild is self-hosting, so building it with an existing copy is usually your best bet.

That said, if you’re doing something fancy, or are bootstrapping onto a new platform, use ./bootstrap/

Then you can check the program was built successfully:

$ ./atbuild --help
atbuild - Anarchy Tools Build Tool 0.1.0-dev
© 2016 Anarchy Tools Contributors.

atbuild [task]
    task: ["default", "helloworld", "bootstrap"]

Maintainer note: if you edit this file, edit the one in this repo as well.

© 2016 Anarchy Tools and contributors.