Skip to content

Installation

  • Zig 0.16.0 or later — Install Zig
  • Git — for fetching dependencies via build.zig.zon

The pidgn CLI provides project scaffolding, code generation, a dev server, and database migrations.

Terminal window
curl -fsSL https://pidgn.seemsindie.com/install.sh | sh

Install a specific version:

Terminal window
PIDGN_VERSION=v0.3.0-beta.1 curl -fsSL https://pidgn.seemsindie.com/install.sh | sh

Verify the installation:

Terminal window
pidgn version
  1. Scaffold the project

    Terminal window
    pidgn new my_app

    This creates a full project structure:

    my_app/
    build.zig
    build.zig.zon
    .gitignore
    src/
    main.zig
    controllers/
    templates/
    public/
    css/style.css
    js/app.js
  2. Build and run

    Terminal window
    cd my_app
    zig build run

    Your server is now running at http://127.0.0.1:4000.

  3. Start the dev server (with auto-reload)

    Terminal window
    pidgn server

If you already have a Zig project and want to add pidgn as a dependency:

  1. Add the dependency to your build.zig.zon:
.dependencies = .{
.pidgn = .{
.url = "https://github.com/seemsindie/pidgn/archive/refs/tags/v0.1.0.tar.gz",
.hash = "...", // zig build will tell you the expected hash
},
},
  1. Wire it up in build.zig:
const pidgn_dep = b.dependency("pidgn", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("pidgn", pidgn_dep.module("pidgn"));
  1. Import and use:
const pidgn = @import("pidgn");
PackageWhat it addsHow to enable
pidgn_dbDatabase (SQLite & PostgreSQL)Add pidgn_db dependency
pidgn_jobsBackground job processingAdd pidgn_jobs dependency
pidgn_mailerEmail sendingAdd pidgn_mailer dependency
pidgn_templateTemplate engineAdd pidgn_template dependency