The xenokit command line

The commands you’ll use most, how --json and --dry-run work, and what the exit codes mean.

6-minute read Applies to XenoKit 1.12.0 Updated

The XenoKit app runs nothing itself: it drives the xenokit command-line tool inside it. Everything the app does, you can do from Terminal, a CI job or an AI coding agent, and a project behaves the same way from all of them. Install the tool from App Settings›Command Line.

Everyday commands

Run these inside a project folder:

Terminal
$ xenokit status .  # files with errors or warnings now
$ xenokit run --file <path>  # compile one file now (a Sass partial: the files that import it)
$ xenokit log --failed --full  # a failed run's command, tool versions and full output
$ xenokit file <path>  # how one file compiles, and where each setting comes from
$ xenokit validate  # check .xenokit.yml, with line numbers
$ xenokit watch  # watch this project until Ctrl-C

When the app, or another xenokit watch, is already watching the project, xenokit run hands the run to that watcher instead of starting a second one.

Projects

These are the lifecycle commands shared by every XenoTool:

Terminal
$ xenokit add [<folder>]  # set up a new project: write .xenokit.yml and add it
$ xenokit import [<folder>]  # set up a project CodeKit has
$ xenokit list  # the projects in XenoKit, and whether each is watched
$ xenokit enable|disable <name>  # watch a project while the app is open, or stop
$ xenokit remove <name>  # take a project out of XenoKit; its folder is untouched
$ xenokit export <name> --to <file>
$ xenokit restore [<folder>] [--from <file>]

xenokit add --dry-run lists the folders and suggestions without writing anything.

Tools

Terminal
$ xenokit tools  # installed versions, this Mac's selection, updates
$ xenokit tools install sass  # the latest Dart Sass (or name a version)
$ xenokit tools pin sass 1.104.1 --project .
$ xenokit tools try sass 2.0.0 --project .  # compile with a new version beside the current one and compare
$ xenokit doctor  # tools, PATH, .gitignore and stale watcher files

--json and --dry-run

  • Every command takes --json. Each output line has a type, keys are snake_case, dates are ISO 8601 and paths are absolute. A failure ends with an error line carrying code, what, why and next.
  • Every command that changes something takes --dry-run: it checks what the real run would refuse and says what it would do, without changing anything.

Exit codes

0
Success
2
.xenokit.yml or XenoKit’s project list is invalid or can’t be read
3
A required tool is missing
4
The tool registry or a watcher didn’t answer
5
validate or doctor found problems
6
A watcher already owns the project
7
Refused, with nothing changed
9
Failed, and nothing was left changed
10
Failed and left a change that couldn’t be taken back
64
A mistake in the command line
124
Timed out
130
Interrupted

xenokit run otherwise exits with the command’s own status. Without --json, errors are printed as What / Why / Next, with the exit code on the first line.

Help for every key

xenokit schema lists every key .xenokit.yml accepts and what each one takes. xenokit validate rejects unknown keys and suggests the closest valid one.

CodeKit is a trademark of its respective owner. XenoKit is independent and is not affiliated with or endorsed by its owner.

Questions about XenoKit?

Check the help pages first, or send us a message and we’ll get back to you within 24 hours.

Need help with an app or a license? Open a support ticket →

We reply within 24 hours on business days.