Installation
Prerequisites
Section titled “Prerequisites”- Zig 0.16.0 or later — Install Zig
- Git — for fetching dependencies via
build.zig.zon
Install the CLI
Section titled “Install the CLI”The zzz CLI provides project scaffolding, code generation, a dev server, and database migrations.
curl -fsSL https://zzz.seemsindie.com/install.sh | shInstall a specific version:
ZZZ_VERSION=v0.1.0 curl -fsSL https://zzz.seemsindie.com/install.sh | shgit clone https://github.com/seemsindie/zzz_cli.gitcd zzz_clizig build# Binary at zig-out/bin/zzzPre-built binaries for macOS (arm64, x86_64) and Linux (x86_64, aarch64) are available on the Releases page.
Verify the installation:
zzz versionCreate a new project
Section titled “Create a new project”-
Scaffold the project
Terminal window zzz new my_appThis creates a full project structure:
my_app/build.zigbuild.zig.zon.gitignoresrc/main.zigcontrollers/templates/public/css/style.cssjs/app.js -
Build and run
Terminal window cd my_appzig build runYour server is now running at
http://127.0.0.1:4000. -
Start the dev server (with auto-reload)
Terminal window zzz server
Add to an existing project
Section titled “Add to an existing project”If you already have a Zig project and want to add zzz as a dependency:
- Add the dependency to your
build.zig.zon:
.dependencies = .{ .zzz = .{ .url = "https://github.com/seemsindie/zzz.zig/archive/refs/tags/v0.1.0.tar.gz", .hash = "...", // zig build will tell you the expected hash },},- Wire it up in
build.zig:
const zzz_dep = b.dependency("zzz", .{ .target = target, .optimize = optimize,});
exe.root_module.addImport("zzz", zzz_dep.module("zzz"));- Import and use:
const zzz = @import("zzz");Optional dependencies
Section titled “Optional dependencies”| Package | What it adds | How to enable |
|---|---|---|
| zzz_db | Database (SQLite & PostgreSQL) | Add zzz_db dependency |
| zzz_jobs | Background job processing | Add zzz_jobs dependency |
| zzz_mailer | Email sending | Add zzz_mailer dependency |
| zzz_template | Template engine | Add zzz_template dependency |
Next steps
Section titled “Next steps”- Follow the Quick Start tutorial
- Learn about Project Structure
- Explore Routing and Middleware