forge

module
v0.1.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: Apache-2.0

README

Forge

Forge gives you, on day one, the system most teams don't finish building until year two — a dev environment that comes up with one command and real data in it, tracing and metrics on every boundary, multiple deploy environments, secrets that never land in git, errors that can't leak your database password to a stranger, and linters that catch the bugs review doesn't.

It generates Go and Next.js wired over Connect RPC, and it deploys anything — including code it never compiled.

That second half matters more than it sounds, so it's worth saying plainly up front: Forge has opinions, and none of them are walls. It ships an ORM you can drop out of, a middleware chain in a file you own, and one deploy model that binds each workload to wherever it should run: a host process, a cluster you operate, or hosted infrastructure we operate for you. Our own control plane builds three services out of a separate repository that Forge never compiles.

It is not only for apps with a backend. A landing page, a marketing site or a docs site is a forge project with one static frontend and no services. It gets the same environments, build-once releases and promotion, and ships to hosted static hosting that owns the bucket and the CDN (forge skill load deploy/static-site). When the site grows a waitlist or a checkout, the API goes in the same project.

Why teams pick it up

Every project eventually pays for the same plumbing: observability, a staging environment, deploy promotion, secret management, a dev setup a new hire can actually run. Teams almost never build that at the start — there's a product to ship — so they build it in year two, under deadline, on top of a codebase that wasn't shaped for it. That's a rewrite nobody enjoys and everybody schedules twice.

Forge's pitch is that you skip that quarter. The first commit already has the things that rewrite would have added, wired into files you own and can change.

The second reason is newer. When an agent writes most of the code, the bottleneck stops being how fast you can write it and becomes knowing whether it's right. So Forge optimizes for something narrower than productivity: it makes a project legible to whoever works on it next, human or model. Every boundary is instrumented, every convention is enforced by a linter, every generated file knows whether you edited it, and the binary can describe its own surface on demand.

And several of the defaults exist because the unsafe version caused a real incident — not because a style guide recommended them:

  • An error message once shipped a database password to an unauthenticated caller. connect.Error.Message() is literally err.Error(), so any error text you didn't write is text you publish. Now svcerr.Wrap replaces unrecognized errors with internal server error and keeps the original server-side.
  • Images built on an arm64 laptop once got pushed to amd64 nodes. Now cloud targets require an explicit platform, and it fails at author time.
  • Replicas once half-migrated a schema. Now migrations apply from an initContainer under a Postgres advisory lock, and a failed one stalls the rollout with the old pods still serving.

The first sixty seconds

forge project new my-app && cd my-app
forge scaffold service billing
forge generate
forge env up dev

That last command brings up Postgres, runs your migrations, and starts your services and frontends. You get back a table of URLs and a log file for each process. With a frontend (forge project new my-app --frontend web) it also brings up a local identity provider, so the app's own sign-in page works on the first run.

Once you add tables (a // forge:entity message and forge scaffold), a fresh database is seeded with foreign-key-coherent rows that satisfy every constraint your schema declares, so the app boots alive instead of booting empty. Text forge cannot derive from the schema reads as sample_<column>_<n> until you name your domain's words in db/seeds/vocab.yaml (orders.currency: [USD, EUR], orders.customer_email: {type: email}); from then on the rows read like your product.

The table includes the HyperDX UI too (ClickStack runs by default; set _observability = False in deploy/kcl/dev/main.k to turn it off), already receiving the app's traces, metrics and logs.

No signup, no external accounts, no cloud project, no cluster.


1. Production best practices from day 0

The first commit already has the things teams usually bolt on in year two. A scaffolded service boots with structured logging, tracing, metrics, panic recovery, request IDs, health and readiness probes, graceful shutdown, and payload caps — all wired in a serve.go you own and can reorder.

The defaults are chosen to fail safe:

  • Errors don't leak. svcerr.Wrap replaces unrecognized errors with internal server error and keeps the original server-side, so error text you didn't write is never text you publish.
  • Auth fails closed. A production server refuses to boot with no auth provider configured, at construction time rather than on first request. JWT with OIDC discovery is the default; Clerk and Firebase are variants, API keys are a first-class credential (X-API-Key, checked against a table you own, on the same pool your handlers use), and a local dev IdP gives you a real browser sign-in with one command.
  • Unsafe migrations are caught before they run, not after they lock a table in production — see bug-class linting.
  • You can't deploy the wrong env to the wrong cluster. The kubectl context is read solely from the environment's KCL. There is no CLI override and no fallback to your current context.
  • Secrets stay out of rendered output. Declare a secret once as a reference and bind it per-environment through a provider. Forge refuses to render plaintext Secrets into anything but a recognized local cluster. sensitive config fields get no slot in git to paste a password into and no CLI flag to leak one into shell history.
What "secure by default" does and doesn't mean here

Two different things ship under that heading, and they're worth separating, because one is load-bearing and one is a starting point.

The runtime posture above is real and tested — it's the core of Forge, it's covered by the same gates as everything else, and it's what stops the incidents in the list above from recurring.

The scanning is generated into your CI, and it's yours to verify. A new project gets a ci.yml that runs govulncheck and npm audit through forge ci vuln-scan — a gate built to refuse a pass it didn't actually verify, so a missing scanner fails the job instead of exiting green over an empty scan. Container images get Trivy scans that block on HIGH/CRITICAL, and pushed images get an SPDX SBOM, a keyless cosign signature, and a build-provenance attestation, all bound to the immutable digest rather than a mutable tag. Dependabot ships too.

What is not there today: secret scanning, SAST, IaC/manifest scanning, and license compliance. And the generated workflows are among the less-exercised surfaces in Forge — treat them as a strong default to review and adapt, not as a compliance story you can point an auditor at. forge lint itself does no security scanning at all; it enforces architecture and migration safety.

Multiple environments on day 0, not month six

Environments are not a thing you graduate to. A new project declares them as KCL under deploy/kcl/<env>/, and the same source renders dev, staging, and prod. Our own control plane runs dev, dev-k8s, e2e, staging, preprod, and prod across k3d, Vultr, and two GKE clusters, from one definition.

  • Build once, promote by digest. forge env build staging --release v1.4.0 captures content-addressed digests; forge env deploy prod v1.4.0 ships the exact bytes that passed staging.
  • Preflight before apply. On remote clusters, Forge verifies every referenced Secret key and every image against the live target and reports all failures up front, rather than discovering them as a mid-rollout ImagePullBackOff.
  • Failures move to author time. KCL schemas validate at load. The guard requiring an explicit platform on cloud targets exists because building from an arm64 laptop once pushed images that wouldn't run on amd64 nodes.
  • Config is typed and declared once. Annotate a proto field; get env-var loading with precedence, a KCL schema, per-environment values, and — for sensitive fields — a secret reference with no slot in git to paste a password into and no CLI flag to leak one into shell history.

2. A dev environment that actually comes up

The most expensive document at most companies is the onboarding doc that is wrong in two places. Forge's answer is that there isn't one: the environment is declared in the same KCL that renders staging and prod, so "how do I run this" has a command instead of a wiki page.

  • One command, whole stack. forge env up starts every host service and frontend with no cluster involved. forge env up dev does the full loop — build, deploy, host, frontend.
  • The database is not empty. On first boot against a dev env, Forge seeds deterministic, foreign-key-coherent data introspected from your applied schema, in one transaction, only when every seedable table is empty. Synthesized values satisfy your CHECK constraints, length caps, and UNIQUE columns by construction. No seed files land in your repo.
  • Full observability locally. forge env up runs ClickStack — ClickHouse, the HyperDX UI and an OTLP collector, in one container — and points every host process at it. Traces, metrics and logs show up in HyperDX with nothing to register or copy, no accounts, no sampling surprises. Turn it off with _observability = False.
  • Ten checkouts don't collide. Each git worktree gets its own stable 100-port block through a lock-guarded registry, so parallel stacks (or parallel agents) coexist. forge env ps lists every Forge stack on the machine, across projects.
  • Nothing hangs. Without a TTY, forge env up starts everything, prints the summary, and returns — so CI and agents don't deadlock waiting on a foreground process.

The pitch in one line: a new engineer, or a new agent, gets the whole system running against seeded data, with end-to-end tracing, before lunch on day one.


3. Feedback loops, so an agent can see what it built

Generation is the easy half. This is the half that decides whether a project survives contact with six months of agent-authored changes.

Predictability: one known place for everything

An LLM's failure mode isn't writing bad code — it's guessing. Guessing which port the API bound, where the logs went, how to reach the database, whether the thing it just changed is even running. Every guess is a plausible-looking answer that might be wrong, and wrong answers compound silently.

Forge's structural advantage is that these questions all have a command, and the command reads the same rendered KCL the running stack was built from — so the answer can't drift from reality:

The question The command
What is running, on what port, and is it healthy? forge env status <env> (--json)
Where are the logs for this service? forge env status — a log path per service
What are the ingress URLs? forge cluster urls (--json)
What does the schema actually look like? forge db introspect --dsn "$DATABASE_URL" (--format json)
How do I call this RPC? forge api curl <service.method>
What is this project, structurally? forge project audit --json, map --json
Is the project well-formed? forge doctor
What can Forge even do? forge project capabilities, annotations, libraries

Two properties make this usable by a model rather than just available to one. Every answer is machine-readable, so an agent parses instead of scraping scrollback. And the surface is enumerated from Forge's own command tree and descriptors, so it cannot drift the way a document can — the agent asks the binary rather than trusting a stale README.

forge env status is the sharpest example. It reports the port a service bound right now, which process holds it, whether that binary is stale versus your repo HEAD, and a loud DUPLICATE flag when two vintages of the same service are serving at once — the classic "hot reload spawned a new worker and didn't reap the old one" failure that otherwise reads as "my fix didn't work."

Observability you get without asking for it

Three boundaries are instrumented, so a request is traceable end to end:

  1. The RPC edge — one span, metric, and log line per RPC.
  2. Every in-process component call — the layer that is usually dark. Forge generates a per-method decorator from your contract.go interface, so adding a method instruments it automatically. There is nothing to maintain by hand and nothing to forget.
  3. Every database query — a child span per query, via the ORM's bun hook.

Logs are structured JSON with stable keys (procedure, request_id, trace_id, duration_ms, status, code), and the trace ID is injected into every log line — so a log entry is one click from the trace that produced it. ClickStack (ClickHouse, the HyperDX UI and an OTLP collector) runs locally in Docker Compose, on by default, with traces, metrics and logs already flowing. No external accounts, no signup, no sampling surprises.

Checks that refuse to lie to you
forge env status dev                  # everything runtime about an env
forge env status dev --signal traces  # or one signal at a time
forge env status dev --json           # machine-readable, for an agent

A check that cannot obtain the facts it needs reports UNDETERMINED, never a pass and never a skip. Three outcomes, not two. This matters more than it sounds: a false green is the single most expensive thing you can hand an agent, because it will confidently build on top of it.

For the same reason, we'll tell you what these checks don't cover. They verify the telemetry pipeline is healthy — containers up, signals ingesting, probes green. They do not certify your app logic is correct. A stack can be fully green while a cross-cluster dial is failing. Proving an app-flow invariant is what tests are for.

Test seams that already exist
  • A mock for every interface, generated from contract.go. An agent never hand-rolls a fake, and a contract change breaks the build at the mock rather than somewhere distant three files away.
  • A real Postgres, not a stub. pkg/pgtest and pkg/testkit give hermetic tests an actual ephemeral database with your migrations applied.
  • Table-driven RPC tests via pkg/tdd, so handler tests have one shape.
  • Scaffolded tests self-destruct. A generated test row asserts Unimplemented, so it fails the moment the handler is implemented — demanding a real assertion. There is no permissive "any outcome" mode.
  • Frontend mock scenarios. forge scaffold scenario writes a typed Connect-RPC handler overlay you reach with ?scenario=<name> in the URL — so an agent can teleport the UI into a specific server-state shape (an empty list, a revoked token, a failing payment) without touching the backend. Anything a scenario doesn't override falls through to the base transport.
Two more that don't fit in a table
  • A real debugger. forge debug drives Delve against a running service: breakpoints, step in/over/out, locals, args, stack, goroutines, and expression evaluation. An agent can inspect a live process rather than reasoning about one.
  • Errors are runbooks. Failures state what was expected, what was found, and the literal command that fixes it — so a failure is an instruction to follow rather than a puzzle to solve. Commands are non-interactive and never hang without a TTY, so an agent can drive them unattended.

4. Guardrails, so the loop stays closed

Feedback is worthless if the code drifts faster than you can observe it.

  • contract.go is the seam. Every internal package declares its interface, its Deps (interface-typed, enforced by lint), and its constructor.
  • Conventions are enforced, not suggested. forge lint ships twenty-odd analyzers that catch what review usually misses: handlers doing business logic, unwrapped domain errors, concrete types in Deps, adapters making RPCs, frontend stores holding server data, unsafe SQL migrations, edited generated files. A convention a linter enforces is one an agent can't quietly drift from. Deterministic-safe fixes apply automatically; --json and --strict are there for CI.
  • Regeneration is safe. Every generated file carries a hash of its own body. Hand-edit one and the next forge generate stops rather than silently reverting your work.
  • Boilerplate is scaffolded, so logic is what's left. forge scaffold takes a noun — service, entity, rpc, package, adapter, worker, binary, operator, crd, webhook, frontend, scenario and more — and lands it in the right place, already wired, already conventional.
  • Markers declare intent in one line. // forge:entity, soft-delete, append-only, secret, immutable, version for optimistic concurrency, and others make the schema, the RPCs, and the generated code agree about a decision you stated once.
Linting for bug classes, not just style

Most linters argue about formatting. The interesting ones catch bugs that compile, pass review, and fail in production — and that's where Forge's are aimed.

The distinction matters because architectural drift is how those bugs get in. A handler that reaches past the service layer straight into the ORM isn't a style violation; it's a transaction boundary in the wrong place, an authorization check that now has somewhere to hide, and a query nobody will find when it gets slow. Shipping today:

  • Layering is enforced. Handlers may not map errors or carry business logic (no-handler-error-mapping, handler-file-size); Deps must be interfaces so a layer can't bind itself to a concrete implementation (deps-are-interfaces); adapters and outbound I/O may not make RPCs (adapter-no-rpc, outbound-io-no-rpc).
  • Migrations are checked before they run. Adding a NOT NULL column to a populated table, a volatile default, a destructive change — each caught at author time, each with an explicit opt-out for when you mean it.
  • Runtime nil-derefs get caught statically. optional-deps-guard flags an unguarded dereference of a dependency that is legitimately nil at runtime.
  • Server state can't leak into client state. frontend-stores-no-server-data catches the Zustand store quietly duplicating what React Query owns — the root of most "why is the UI stale" bugs.

Where this is going: the roadmap is more bug-class analyzers of the same shape — N+1 query detection, handlers calling the ORM directly instead of going through the service layer, foreign keys with no supporting index, and similar patterns that are invisible in review and expensive at scale. These are planned, not shipped; forge project capabilities always prints the analyzers your binary actually has, which is the list to trust over this one.

The reason to build them here rather than bolt on a generic linter is that Forge already knows the shape of your project — which package is a handler, which is a service, which struct is an entity, and what the applied schema looks like. A rule like "this foreign key has no index" or "this handler skipped its service" needs exactly that structural knowledge, and a general-purpose Go linter doesn't have it.


5. Opinions with an exit

Forge's philosophy is primitives, not modes: every default is overridable, every generated file has an owned seam beside it, and no convenience is implemented as a wall. Stated as pairs, because an opinion is only safe if you know how to leave it:

  • We give you an ORM — and you can drop to raw SQL whenever you want.
  • We give you a middleware chain — in a serve.go you own and can reorder.
  • We give you pkg/ — as a library you import, not a framework you're trapped inside.
  • We give you Kubernetes deploys — and every workload binds its own runtime, so the same declaration runs as a host process in dev, on a cluster you operate, or on hosted infrastructure we run. A runtime that hands a workload to your platform's own CLI (Fly.io, Cloud Run, ECS, Vercel) is planned, not shipped.
  • And you don't have to write Go. KCL declares the workloads; ShellBuild builds anything Forge doesn't compile.

That last one is the one people underestimate, so here is the receipt: our own control plane uses ShellBuild to build three services out of a separate Go repository, cross-compiling and pushing images Forge never compiles in-tree — plus one fat image built by shelling out to GCP Cloud Build, because its toolchain steps can't be cross-compiled on a laptop.

The details:

  • Deploy is target-agnostic. Workloads are declared once as a KCL fw.Workload, and each env binds every one to its own runtime — forge.OnHost, OnCompose, OnCluster or OnHosted. Frontends bind the same way, to a dev server or a static runtime (OnHosted, OnBucket, OnFirebase). There is no env-wide mode flag.
  • ShellBuild is the shell escape hatch for a workload forge does not build itself: a sibling repo, a third-party binary, a language runtime. cmd is a plain KCL string and forge runs it byte-for-byte via sh -c, from the declared cwd, with the declared env merged on. Forge substitutes nothing — the tag, arch and environment are read in KCL (forge.image_tag(), forge.target_arch(), forge.env()) where the command is composed.
  • KCL is still KCL. Forge models your workloads — Application, Environment, ConfigMap, Ingress, RBAC. It deliberately does not model third-party in-cluster infra, so when you need NATS, Temporal, or a Postgres operator, you emit raw manifests (or run Helm) and they compose into the same rendered stream. No fork, no fight with the schema. That's how our control plane runs all three today.
  • pkg/ is a library you import, not a framework you're stuck inside. serverkit, svcerr, orm, auth, apikey, oauth2, observe, middleware, crud, tdd, testkit, pgtest, config, money, controller, migratekit, schemadef, seedplan, audit, validate, and more — forge project libraries lists them all with their doc summaries. @reliantlabs/forge-web-runtime is the TypeScript twin.

The two truths

The one model to internalize before anything else:

  • Proto is the wire truth — services, RPCs, messages, config.
  • SQL migrations are the schema truth — db/migrations/*.up.sql.

Neither derives from the other. forge generate applies your migrations to a real ephemeral Postgres and introspects the result, so entity structs, the ORM, CRUD wiring and frontend pages are projected from a schema that provably exists. Arbitrary Postgres DDL — schema-qualified tables, JSONB, arrays, generated columns — works without Forge needing to understand it.

An entity exists where both halves exist: CRUD RPCs in the proto and the matching table. Either half alone generates honest nothing.

Who this isn't for

Forge is opinionated at the floor even though it's open at the edges, and some of those floor decisions won't suit you. Rather than have you discover that in week three:

  • You don't want generated code in your repo. Forge writes real files and regenerates them. If you'd rather everything be hand-authored, the ownership model will feel like overhead instead of a safety net.
  • You need a REST-first public API. Connect RPC is the native surface. Connect handlers speak plain HTTP+JSON and REST URLs are available via Vanguard, but if a hand-shaped OpenAPI contract is your product, you'll be working against the grain.
  • Postgres isn't your database. Schema projection introspects a real ephemeral Postgres. MySQL, SQLite, and non-relational stores aren't supported.
  • Your backend isn't a container. A service deploys as an image, even when the target isn't Kubernetes. (Static sites are the exception: a static frontend ships as files to hosted static hosting, your own bucket or Firebase, with no image to run.)
  • You want a framework you'll outgrow and replace. Forge is designed to hold structure for the life of the project. If you want a one-time scaffold and then never to see the tool again, use a template repo — that's a legitimate choice and Forge is the wrong shape for it.

Install

# Build the binary into ./bin/forge
task build

# Or install onto $PATH (into $GOBIN)
task install
forge version

# Run straight from source without installing
go run ./cmd/forge version

Forge is a single cgo-free binary, so go install github.com/reliant-labs/forge/cmd/forge@<version> works on macOS, Linux and Windows (amd64 and arm64) with no C toolchain.

On first render forge extracts KCL's native library (libkcl.so/.dylib, or kcl.dll on Windows) into your user cache dir — %TEMP%\kcl on Windows — and loads it from there. Set KCL_LIB_HOME to use another directory, which is the fix when antivirus quarantines the DLL or %TEMP% is locked down.

Quick start

# Scaffold a new project (service / CLI / library)
forge project new my-app
cd my-app

# Add a service, then regenerate the stack
forge scaffold service billing
forge generate

# The triple gate before you call a change done:
forge generate && forge lint && go build ./... && go test ./...

# Run the inner loop (host services + frontends, no cluster)
forge env up dev
# Or bring the whole stack up (build + deploy + host + frontend)
forge env up dev

docs/getting-started.md walks this end to end — service, entity, CRUD, running stack — and explains which files are yours. docs/concepts.md covers why Forge is shaped this way.

Run forge --help for the full command surface, or forge <command> --help for any one of them. Four commands print Forge's entire surface:

forge project capabilities   # every verb, every lint analyzer, every marker
forge project annotations    # how proto fields become columns and validators
forge project libraries      # every forge/pkg library and where it lives
forge project audit --json   # what THIS project currently is

Conventions & skills

Forge ships an extensive skill catalog — playbooks covering architecture, proto, db, api, services, testing, frontend, auth, deploy, observability, debugging, migration, and code review. The conventions they describe are enforced by forge lint, so prefer loading a skill before guessing:

forge skill list            # discover what's available
forge skill load <name>     # read one
forge skill search <term>   # find one by keyword

Skills are embedded in the binary, so forge skill load always matches the Forge you are running. Forge never writes skill files into your project. Reliant reads them from the binary automatically; for any other harness (claude, cursor, copilot, codex), write your own skill or instruction telling the agent to run forge skill search <query> and forge skill load <name>.

reliant.md at the repo root captures the critical rules and testing tiers in brief.

Repository layout

forge/
├── cmd/forge/       # CLI entrypoint (package main)
├── internal/        # CLI implementation, generators, templates, linters
├── kcl/             # KCL module: typed schemas + manifest render layer
├── pkg/             # Libraries projects import (serverkit, svcerr, orm, …)
│   └── components/  # UI component library shipped to scaffolded frontends
├── web-runtime/     # @reliantlabs/forge-web-runtime — the web twin of pkg/
├── proto/           # Forge's own proto annotations (forge/v1)
├── docs/            # getting-started, concepts, releasing, pkg + cross-repo sources
├── examples/        # Runnable examples
├── forge.yaml       # Project manifest
└── Taskfile.yml     # Automation entrypoints

Development

task deps           # install Go (and frontend) dependencies
task test:short     # inner-loop tests: whole repo in seconds
task test           # full unit suite with -race
task lint           # golangci-lint + buf
task fmt            # goimports + go mod tidy

See CONTRIBUTING.md for the full dev loop, pre-commit hooks, and PR process, and reliant.md for the testing tiers and project conventions.

License

Copyright 2025-2026 Reliant Labs, Inc. Licensed under the Apache License, Version 2.0; see also NOTICE. That covers all of forge: the CLI, the github.com/reliant-labs/forge/pkg/... libraries your services import, the KCL modules, and the @reliantlabs/forge-web-runtime npm package your frontends bundle.

Earlier versions. Forge versions published before this change were released under the Business Source License 1.1. Reliant Labs, Inc., as their copyright holder, also licenses every one of those versions — every commit of this repository, tagged or not, and every published version of @reliantlabs/forge-web-runtime — under the Apache License, Version 2.0. You may use any of them under either license.

What forge writes into your project is yours. Generated code, scaffolded files, and the components forge copies into your frontends become part of your project. Where any of that output reproduces or derives from forge's own templates or component library, Reliant Labs, Inc. grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license to use, reproduce, modify, sublicense and distribute it under terms of your choice, without any obligation to carry forge's license text, NOTICE or other attribution. This grant covers that output only. Forge itself, including the libraries and packages your project depends on, stays under the Apache License 2.0.

Directories

Path Synopsis
Package cli provides the public entry point for embedding Forge's CLI as a subcommand in other cobra-based CLIs.
Package cli provides the public entry point for embedding Forge's CLI as a subcommand in other cobra-based CLIs.
cmd
contractlint command
forge command
internal
atomicfile
Package atomicfile is the one way forge writes a file it generates or scaffolds.
Package atomicfile is the one way forge writes a file it generates or scaffolds.
buildinfo
Package buildinfo exposes the forge binary's version metadata to packages that cannot depend on internal/cli (to avoid import cycles).
Package buildinfo exposes the forge binary's version metadata to packages that cannot depend on internal/cli (to avoid import cycles).
buildtarget
Package buildtarget owns the per-service build dispatch for services whose source lives outside the project's Go module — sibling repos, third-party binaries, language runtimes forge doesn't natively build.
Package buildtarget owns the per-service build dispatch for services whose source lives outside the project's Go module — sibling repos, third-party binaries, language runtimes forge doesn't natively build.
bundle
Package bundle produces and consumes the artifact that answers "exactly what bytes, from exactly which source" for one environment.
Package bundle produces and consumes the artifact that answers "exactly what bytes, from exactly which source" for one environment.
checksums
Package checksums owns forge's file-ownership machinery: which bytes does forge certify as its own render, which files has the user taken over, and what may a generate run overwrite.
Package checksums owns forge's file-ownership machinery: which bytes does forge certify as its own render, which files has the user taken over, and what may a generate run overwrite.
cigate
Package cigate is the local CI gate: the one definition of what "CI passes" means for a forge project, runnable on a laptop and from a workflow.
Package cigate is the local CI gate: the one definition of what "CI passes" means for a forge project, runnable on a laptop and from a workflow.
ciguard
Package ciguard holds forge's own CI wiring to the invariants that keep a sharded, path-filtered pipeline from silently testing less than it claims.
Package ciguard holds forge's own CI wiring to the invariants that keep a sharded, path-filtered pipeline from silently testing less than it claims.
cli
Package cli — `forge project annotations`: dump forge's authoritative entity-authoring annotation spec as structured data.
Package cli — `forge project annotations`: dump forge's authoritative entity-authoring annotation spec as structured data.
cli/audit
Package audit holds the `forge project audit` command group — a comprehensive snapshot of project state designed to orient an LLM (or human) without forcing them to grep ten different directories.
Package audit holds the `forge project audit` command group — a comprehensive snapshot of project state designed to orient an LLM (or human) without forcing them to grep ten different directories.
cli/audittype
Package audittype holds the small, neutral value types shared by the `forge project audit` command group (internal/cli/audit) and the internal/cli code that contributes audit categories it cannot compute without package-cli internals (the KCL-entity-typed ingress / external-builds categories, and friction.go's auditFriction).
Package audittype holds the small, neutral value types shared by the `forge project audit` command group (internal/cli/audit) and the internal/cli code that contributes audit categories it cannot compute without package-cli internals (the KCL-entity-typed ingress / external-builds categories, and friction.go's auditFriction).
cli/cmdutil
Package cmdutil holds cross-cutting helpers shared by forge's own CLI across MORE THAN ONE command group (internal/cli and its dir-nested subpackages).
Package cmdutil holds cross-cutting helpers shared by forge's own CLI across MORE THAN ONE command group (internal/cli and its dir-nested subpackages).
cli/component
Package component holds the `forge component` command group — list, search, and install UI components from forge's built-in component library.
Package component holds the `forge component` command group — list, search, and install UI components from forge's built-in component library.
cli/debug
Package debug holds the `forge debug` command group — a Delve-backed interactive debugger driver (start / break / continue / eval / ...).
Package debug holds the `forge debug` command group — a Delve-backed interactive debugger driver (start / break / continue / eval / ...).
cli/factory
Package factory carries the shared dependency set ("the factory") threaded through forge's own CLI command tree, plus the command REGISTRY that lets dir-nested command-group subpackages (internal/cli/scaffold, internal/cli/lint, ...) attach to the root without a group↔root import cycle.
Package factory carries the shared dependency set ("the factory") threaded through forge's own CLI command tree, plus the command REGISTRY that lets dir-nested command-group subpackages (internal/cli/scaffold, internal/cli/lint, ...) attach to the root without a group↔root import cycle.
cli/lint
Package lint holds the `forge lint` command group — the project linter pipeline (golangci / buf / frontend / forge-convention / scaffold / migration-safety / wire-coverage …) plus the targeted single-rule flags and the --json aggregator.
Package lint holds the `forge lint` command group — the project linter pipeline (golangci / buf / frontend / forge-convention / scaffold / migration-safety / wire-coverage …) plus the targeted single-rule flags and the --json aggregator.
cli/scaffold
Package scaffold holds the `forge scaffold` command — the one verb that writes new code into a forge project, at two granularities picked by ARITY:
Package scaffold holds the `forge scaffold` command — the one verb that writes new code into a forge project, at two granularities picked by ARITY:
clickstack
Package clickstack names the facts about the local ClickStack compose service that `forge env up`, the doctor checks and the integration gate all have to agree on, so none of them learns a name from another's source.
Package clickstack names the facts about the local ClickStack compose service that `forge env up`, the doctor checks and the integration gate all have to agree on, so none of them learns a name from another's source.
cliutil
Package cliutil holds small helpers shared across forge's CLI surface.
Package cliutil holds small helpers shared across forge's CLI surface.
cloud
Package cloud resolves the two things forge needs to talk to a hosted control plane, and keeps them apart on purpose:
Package cloud resolves the two things forge needs to talk to a hosted control plane, and keeps them apart on purpose:
cluster
Package cluster owns the render-KCL → kubectl-apply → wait-rollouts pipeline that `forge env deploy`, `forge cluster reload`, and the deploy phase of `forge env up` all execute.
Package cluster owns the render-KCL → kubectl-apply → wait-rollouts pipeline that `forge env deploy`, `forge cluster reload`, and the deploy phase of `forge env up` all execute.
codegen
Package codegen — config_native_emit.go wires the KCL config emitters (config_schema_gen.go, config_projection_gen.go, and the per-env config.k scaffolder below) into the generate pipeline.
Package codegen — config_native_emit.go wires the KCL config emitters (config_schema_gen.go, config_projection_gen.go, and the per-env config.k scaffolder below) into the generate pipeline.
commitpolicy
Package commitpolicy checks a forge project's git state against forge's commit policy:
Package commitpolicy checks a forge project's git state against forge's commit policy:
config
internal/config is a pure schema/data/constants package: it declares the canonical forge.yaml types plus package-level lookup tables (e.g.
internal/config is a pure schema/data/constants package: it declares the canonical forge.yaml types plus package-level lookup tables (e.g.
contractcheck
Package contractcheck inspects a project's internal/ tree for contract-shape violations.
Package contractcheck inspects a project's internal/ tree for contract-shape violations.
deadcodeguard
Package deadcodeguard is the repository-wide proof that forge's own code cannot make a claim its own data refutes.
Package deadcodeguard is the repository-wide proof that forge's own code cannot make a claim its own data refutes.
debug
Package debug wraps a Delve debugger so forge can drive a debugging session from the CLI layer.
Package debug wraps a Delve debugger so forge can drive a debugging session from the CLI layer.
deploytarget
Package deploytarget owns the deploy dispatch — the surface that maps a rendered workload's RUNTIME (and each frontend's and database's deploy target) to a concrete pipeline that ships it somewhere.
Package deploytarget owns the deploy dispatch — the surface that maps a rendered workload's RUNTIME (and each frontend's and database's deploy target) to a concrete pipeline that ships it somewhere.
devidentity
Package devidentity is `forge env up`'s half of managed identity: it converges an env whose identity runs on the env's own host-run Zitadel (forge.IdentityOnHost) with the SAME library the control plane runs against hosted instances, pkg/identity.
Package devidentity is `forge env up`'s half of managed identity: it converges an env whose identity runs on the env's own host-run Zitadel (forge.IdentityOnHost) with the SAME library the control plane runs against hosted instances, pkg/identity.
devpg
Package devpg owns ONE fact: the host coordinates of the dev postgres a forge project's docker-compose publishes.
Package devpg owns ONE fact: the host coordinates of the dev postgres a forge project's docker-compose publishes.
devstack
Package devstack owns forge's parallel-dev-stack primitives: the raw git facts that distinguish one working tree from another, and a memoized port-block allocator.
Package devstack owns forge's parallel-dev-stack primitives: the raw git facts that distinguish one working tree from another, and a memoized port-block allocator.
e2eshard command
Command e2eshard plans and maintains the sharding of forge's `-tags e2e` suite (.github/workflows/e2e-suite.yml).
Command e2eshard plans and maintains the sharding of forge's `-tags e2e` suite (.github/workflows/e2e-suite.yml).
envutil
Package envutil holds the small, shared environment-handling helpers the build, deploy, and host-launch paths all need: a minimal .env parser and two env-overlay merges whose precedence is encoded in the name.
Package envutil holds the small, shared environment-handling helpers the build, deploy, and host-launch paths all need: a minimal .env parser and two env-overlay merges whose precedence is encoded in the name.
flux
Package flux holds the identity of the Flux chart forge pins.
Package flux holds the identity of the Flux chart forge pins.
forgecompat
Package forgecompat decides whether the running forge binary may generate into a project, from the forge version that project ACTUALLY resolves.
Package forgecompat decides whether the running forge binary may generate into a project, from the forge version that project ACTUALLY resolves.
frontenddeps
Package frontenddeps ensures a frontend's node_modules is installed and current against its lockfile.
Package frontenddeps ensures a frontend's node_modules is installed and current against its lockfile.
generator
Package generator: checksums shim.
Package generator: checksums shim.
generator/contract
Package contract drives the four *_gen.go files (mock, middleware, tracing, metrics) emitted from a single hand-written contract.go.
Package contract drives the four *_gen.go files (mock, middleware, tracing, metrics) emitted from a single hand-written contract.go.
gitsource
Cache eviction for the machine-local source cache.
Cache eviction for the machine-local source cache.
goexec
Package goexec configures the `go` subprocesses forge runs on its own behalf.
Package goexec configures the `go` subprocesses forge runs on its own behalf.
hostedimage
Package hostedimage holds the ONE vocabulary for "can the control plane pull this hosted image": the push-base resolution rule, the off-base finding, and its wording.
Package hostedimage holds the ONE vocabulary for "can the control plane pull this hosted image": the push-base resolution rule, the off-base finding, and its wording.
hostinfra
Package hostinfra runs a project's declared dev infrastructure as HOST PROCESSES, with no container runtime involved.
Package hostinfra runs a project's declared dev infrastructure as HOST PROCESSES, with no container runtime involved.
hostlaunch
Package hostlaunch composes exec.Cmds for host-mode services and frontends, plus the small env-file helpers both call sites need.
Package hostlaunch composes exec.Cmds for host-mode services and frontends, plus the small env-file helpers both call sites need.
kcleval
Package kcleval evaluates ONE KCL file of a project and selects fields out of the result, so nothing outside forge ever has to run `kcl` itself.
Package kcleval evaluates ONE KCL file of a project and selects fields out of the result, so nothing outside forge ever has to run `kcl` itself.
kclmigrate
Package kclmigrate rewrites a project's deploy/kcl tree across a forge change that moved a declaration from one place to another.
Package kclmigrate rewrites a project's deploy/kcl tree across a forge change that moved a declaration from one place to another.
kcloptions
Package kcloptions discovers the `-D` render options a project's KCL declares, so forge can validate and list them WITHOUT knowing what any of them mean.
Package kcloptions discovers the `-D` render options a project's KCL declares, so forge can validate and list them WITHOUT knowing what any of them mean.
kclplugin
Package kclplugin registers forge's in-process KCL plugin namespace (kcl_plugin.forge.*), letting KCL pull host-runtime values during evaluation instead of forge having to pre-enumerate and inject them.
Package kclplugin registers forge's in-process KCL plugin namespace (kcl_plugin.forge.*), letting KCL pull host-runtime values during evaluation instead of forge having to pre-enumerate and inject them.
kclrender
Package kclrender is the single seam through which forge evaluates KCL.
Package kclrender is the single seam through which forge evaluates KCL.
kcltest
Package kcltest runs the external `kcl` binary for tests that need to assert against a REAL render (as opposed to internal/kclrender, which is the embedded kcl-go seam production uses).
Package kcltest runs the external `kcl` binary for tests that need to assert against a REAL render (as opposed to internal/kclrender, which is the embedded kcl-go seam production uses).
kclvendor
Package kclvendor supplies the forge KCL module to every KCL evaluation forge performs, straight from the binary that is performing it.
Package kclvendor supplies the forge KCL module to every KCL evaluation forge performs, straight from the binary that is performing it.
kubeconfig
Package kubeconfig answers one question: where on THIS machine does the default kubeconfig live.
Package kubeconfig answers one question: where on THIS machine does the default kubeconfig live.
ledgerfile
Package ledgerfile is the MACHINE-SCOPED file ledger: one model, the non-hosted store.
Package ledgerfile is the MACHINE-SCOPED file ledger: one model, the non-hosted store.
linter/finding
Package finding is the single canonical home for the lint-finding vocabulary shared by every internal linter (forgeconv, scaffolds, migrationlint).
Package finding is the single canonical home for the lint-finding vocabulary shared by every internal linter (forgeconv, scaffolds, migrationlint).
linter/forgeconv
File: internal/linter/forgeconv/allocate_port_spacing.go
File: internal/linter/forgeconv/allocate_port_spacing.go
linter/scaffolds
Package scaffolds — `forge lint --check-workarounds` rule.
Package scaffolds — `forge lint --check-workarounds` rule.
linter/staticexport
Package staticexport reports what a Next.js App Router frontend contains that a static export (`output: "export"`) cannot serve.
Package staticexport reports what a Next.js App Router frontend contains that a static export (`output: "export"`) cannot serve.
linter/suppress
Package suppress is the single suppression mechanism shared by every forge-owned linter (forgeconv, scaffolds, migrationlint, and the deadcode/vacuous guards once they are exposed to user projects).
Package suppress is the single suppression mechanism shared by every forge-owned linter (forgeconv, scaffolds, migrationlint, and the deadcode/vacuous guards once they are exposed to user projects).
migrationgit
Package migrationgit answers, from git, the one question both the version lint and `forge db migration rebase` have to agree on: which migrations were already on the default branch when this branch was cut.
Package migrationgit answers, from git, the one question both the version lint and `forge db migration rebase` have to agree on: which migrations were already on the default branch when this branch was cut.
migrationver
Package migrationver allocates migration version prefixes.
Package migrationver allocates migration version prefixes.
mockheaderguard
Package mockheaderguard proves that the generated mock-data header describes a layout forge actually creates.
Package mockheaderguard proves that the generated mock-data header describes a layout forge actually creates.
nodeengine
Package nodeengine refuses to run npm in a frontend on a Node the frontend's package.json says it does not support.
Package nodeengine refuses to run npm in a frontend on a Node the frontend's package.json says it does not support.
obsdash
Package obsdash turns a forge project's own service metadata into observability dashboards.
Package obsdash turns a forge project's own service metadata into observability dashboards.
openfiles
Package openfiles answers the one question every reclaimer that deletes from a shared directory must ask first: is a live process using this path?
Package openfiles answers the one question every reclaimer that deletes from a shared directory must ask first: is a live process using this path?
procguard
Package procguard keeps forge from signalling the processes it is running inside.
Package procguard keeps forge from signalling the processes it is running inside.
projectstore
Package projectstore is the single read surface for a forge project's PROJECT-GLOBAL state.
Package projectstore is the single read surface for a forge project's PROJECT-GLOBAL state.
releasecompose
Package releasecompose adapts the shared public release composition engine.
Package releasecompose adapts the shared public release composition engine.
removalguard
Package removalguard is the repository-wide proof that a removed feature is gone from EVERY surface forge ships — not just the Go tree.
Package removalguard is the repository-wide proof that a removed feature is gone from EVERY surface forge ships — not just the Go tree.
scaffold
Package scaffold holds forge's BIRTH-TIME, SCAFFOLD-ONCE emitters: code that renders user-owned artifacts exactly once, at an explicit `forge scaffold ...` moment, and never touches them again.
Package scaffold holds forge's BIRTH-TIME, SCAFFOLD-ONCE emitters: code that renders user-owned artifacts exactly once, at an explicit `forge scaffold ...` moment, and never touches them again.
secrets
Package secrets resolves declared secret REFERENCES (which live in git: EnvVar.secret_ref / secret_key) to secret VALUES (which never live in git) for one environment.
Package secrets resolves declared secret REFERENCES (which live in git: EnvVar.secret_ref / secret_key) to secret VALUES (which never live in git) for one environment.
shadowdb
Package shadowdb resolves WHICH postgres server hosts the generate-time schema-introspection shadow database, and — inside a generate run — makes every reader of the applied schema share ONE application of the migrations to it (applied.go).
Package shadowdb resolves WHICH postgres server hosts the generate-time schema-introspection shadow database, and — inside a generate run — makes every reader of the applied schema share ONE application of the migrations to it (applied.go).
shellbuildtokens
Package shellbuildtokens finds retired forge substitution tokens left in a ShellBuild `cmd`.
Package shellbuildtokens finds retired forge substitution tokens left in a ShellBuild `cmd`.
shellrun
Package shellrun runs a POSIX shell script in-process (mvdan.cc/sh), so the same script behaves identically on every OS — including Windows, where no `sh` binary is on PATH.
Package shellrun runs a POSIX shell script in-process (mvdan.cc/sh), so the same script behaves identically on every OS — including Windows, where no `sh` binary is on PATH.
sqlident
Package sqlident reads postgres identifiers out of SQL text.
Package sqlident reads postgres identifiers out of SQL text.
statefile
Package statefile is the one place forge's JSON-record-under-.forge/state helpers live.
Package statefile is the one place forge's JSON-record-under-.forge/state helpers live.
storage
Package storage owns host storage budgets and the lifecycle of explicitly registered local development caches.
Package storage owns host storage budgets and the lifecycle of explicitly registered local development caches.
templates
Package templates owns the embedded forge template tree and renders it into scaffolded code.
Package templates owns the embedded forge template tree and renders it into scaffolded code.
testreport
Package testreport turns the record of a `go test -json` run into a verdict about whether that run actually proved anything.
Package testreport turns the record of a `go test -json` run into a verdict about whether that run actually proved anything.
tierguard
Package tierguard proves that every Tier-1 (regenerated-every-run) file forge writes is actually DERIVED from something the user wrote.
Package tierguard proves that every Tier-1 (regenerated-every-run) file forge writes is actually DERIVED from something the user wrote.
vacuousguard
Package vacuousguard is the repository-wide proof that a green test actually ran something.
Package vacuousguard is the repository-wide proof that a green test actually ran something.
webruntimepeers
Package webruntimepeers is the SINGLE source of truth for which packages must resolve to exactly one copy when a project links @reliantlabs/forge-web-runtime.
Package webruntimepeers is the SINGLE source of truth for which packages must resolve to exactly one copy when a project links @reliantlabs/forge-web-runtime.
writeguard
Package writeguard fails the build when forge's own code writes a file with os.WriteFile.
Package writeguard fails the build when forge's own code writes a file with os.WriteFile.
Package kcl embeds the forge KCL module — the typed schemas + manifest render layer that generated projects' deploy/kcl env files import (`import forge`, `import forge.workloads`).
Package kcl embeds the forge KCL module — the typed schemas + manifest render layer that generated projects' deploy/kcl env files import (`import forge`, `import forge.workloads`).
pkg module
accesstoken
Package accesstoken is the security primitive behind Reliant Labs' ONE machine credential, `rlat_`: its wire format, generation, hashing, constant-time comparison, the closed scope vocabulary, the rule that a token may never grant authority it does not hold, and the Principal a presented token resolves to.
Package accesstoken is the security primitive behind Reliant Labs' ONE machine credential, `rlat_`: its wire format, generation, hashing, constant-time comparison, the closed scope vocabulary, the rule that a token may never grant authority it does not hold, and the Principal a presented token resolves to.
alerting
Package alerting is a SQL alert-rule evaluator in the Prometheus shape.
Package alerting is a SQL alert-rule evaluator in the Prometheus shape.
alerting/chquery
Package chquery is a single-owner alerting.Querier over one ClickHouse connection: the owner key is ignored and every rule runs against the connection's database.
Package chquery is a single-owner alerting.Querier over one ClickHouse connection: the owner key is ignored and every rule runs against the connection's database.
alerting/pgstore
Package pgstore is the Postgres alerting.StateStore.
Package pgstore is the Postgres alerting.StateStore.
apikey
Package apikey provides the security-sensitive primitives for issuing and verifying API keys: cryptographically-random key generation, hashing, and constant-time verification.
Package apikey provides the security-sensitive primitives for issuing and verifying API keys: cryptographically-random key generation, hashing, and constant-time verification.
appkit
Package appkit holds the worker/operator supervised-component contracts that the generated internal/app composition layer re-uses.
Package appkit holds the worker/operator supervised-component contracts that the generated internal/app composition layer re-uses.
appkit/operatorkit
Package operatorkit owns the controller-manager runtime behind the generated App.RunOperators method in forge projects.
Package operatorkit owns the controller-manager runtime behind the generated App.RunOperators method in forge projects.
audit
Package audit provides the durable write-side of forge's audit trail: an Entry record, a Store persistence interface, and a Postgres-backed DBAuditStore that writes and queries the audit_log table.
Package audit provides the durable write-side of forge's audit trail: an Entry record, a Store persistence interface, and a Postgres-backed DBAuditStore that writes and queries the audit_log table.
auth
Package auth provides JWT and API-key authentication for forge-generated Connect RPC services.
Package auth provides JWT and API-key authentication for forge-generated Connect RPC services.
authn
Package authn provides the authentication interceptor mechanism that forge-generated services wire from their thin, user-owned pkg/middleware file.
Package authn provides the authentication interceptor mechanism that forge-generated services wire from their thin, user-owned pkg/middleware file.
cloudcred
Package cloudcred is the PUBLIC seam between forge and a HOST APPLICATION that already holds the user's session — the credential-helper protocol.
Package cloudcred is the PUBLIC seam between forge and a HOST APPLICATION that already holds the user's session — the credential-helper protocol.
cmdkit
Package cmdkit is the paved path for forge's non-server binary shapes: CLI subcommands, one-shot admin tools, and standalone long-running binaries that ship in the same image as the Connect server but are not themselves Connect services.
Package cmdkit is the paved path for forge's non-server binary shapes: CLI subcommands, one-shot admin tools, and standalone long-running binaries that ship in the same image as the Connect server but are not themselves Connect services.
config
Package config resolves a project's typed configuration from proto field annotations at runtime, with no per-field generated loader.
Package config resolves a project's typed configuration from proto field annotations at runtime, with no per-field generated loader.
contractkit
Package contractkit provides runtime helpers used by the per-package mock_gen.go file forge generates from contract.go.
Package contractkit provides runtime helpers used by the per-package mock_gen.go file forge generates from contract.go.
controller
Package controller provides opinionated runtime helpers for controller-runtime reconcilers.
Package controller provides opinionated runtime helpers for controller-runtime reconcilers.
controller/controllertest
Package controllertest provides a small envtest harness that generated `<crd>_controller_test.go` files use in their TestMain setup.
Package controllertest provides a small envtest harness that generated `<crd>_controller_test.go` files use in their TestMain setup.
credentials
Package credentials is the ONE on-disk store of control-plane access tokens, shared by every CLI that talks to a Reliant Labs control plane — `forge login` and `reliant auth login` both write it, and every command of both reads it.
Package credentials is the ONE on-disk store of control-plane access tokens, shared by every CLI that talks to a Reliant Labs control plane — `forge login` and `reliant auth login` both write it, and every command of both reads it.
crud
Package crud provides runtime helpers used by the per-service handlers_crud_gen.go file forge generates from a service's CRUD RPCs.
Package crud provides runtime helpers used by the per-service handlers_crud_gen.go file forge generates from a service's CRUD RPCs.
crypto
Package crypto provides at-rest AES-256-GCM encryption under a VERSIONED KEYRING, so a key can be rotated without making every already-sealed value permanently unreadable.
Package crypto provides at-rest AES-256-GCM encryption under a VERSIONED KEYRING, so a key can be rotated without making every already-sealed value permanently unreadable.
dashspec
Package dashspec is forge's renderer-neutral dashboard vocabulary (forge.dashboards/v1) and its validator: the types a dashboard file is written in, and ParseDashboard, which judges one with every problem located by line, column and path.
Package dashspec is forge's renderer-neutral dashboard vocabulary (forge.dashboards/v1) and its validator: the types a dashboard file is written in, and ParseDashboard, which judges one with every problem located by line, column and path.
deploy
Package deploy is forge's deploy-tier library: the pure functions that operate on the tier specs in pkg/deploy/v1alpha1.
Package deploy is forge's deploy-tier library: the pure functions that operate on the tier specs in pkg/deploy/v1alpha1.
deploy/v1alpha1
Package v1alpha1 is the ONE declaration of forge's deploy kinds — Workload, StaticSite and ManagedDatabase — in API group forge.dev.
Package v1alpha1 is the ONE declaration of forge's deploy kinds — Workload, StaticSite and ManagedDatabase — in API group forge.dev.
deploystate
Package deploystate is the pluggable backend for forge's reconcile state: what forge last shipped to a target, what it last OBSERVED running there, and the per-environment policy that says whether forge is allowed to do anything about the difference.
Package deploystate is the pluggable backend for forge's reconcile state: what forge last shipped to a target, what it last OBSERVED running there, and the per-environment policy that says whether forge is allowed to do anything about the difference.
devidp
Package devidp is the sign-in broker's client for a Zitadel instance: it drives the OIDC authorization-code flow with PKCE on the server's behalf (BeginFlow, SignIn, SignUp, RedeemCode), creates and finalizes sessions with the login broker's token, and resets passwords.
Package devidp is the sign-in broker's client for a Zitadel instance: it drives the OIDC authorization-code flow with PKCE on the server's behalf (BeginFlow, SignIn, SignUp, RedeemCode), creates and finalizes sessions with the login broker's token, and resets passwords.
diagnostics
Package diagnostics surfaces unwired forge scaffolds at runtime.
Package diagnostics surfaces unwired forge scaffolds at runtime.
graphkit
Package graphkit is the runtime under a project's generated composition graph (internal/app/graph_gen.go): memoized construction of each node, the root's Build — force the closure, then seal — and the lifecycle nodes of what was built, in the order it was built, for lifecyclekit.Supervise.
Package graphkit is the runtime under a project's generated composition graph (internal/app/graph_gen.go): memoized construction of each node, the root's Build — force the closure, then seal — and the lifecycle nodes of what was built, in the order it was built, for lifecyclekit.Supervise.
hostslot
Package hostslot is a host-wide counting semaphore for heavy work: at most N heavy jobs — builds, test lanes, codegen, linters — run at once on one machine, however many agents, worktrees and terminals start them.
Package hostslot is a host-wide counting semaphore for heavy work: at most N heavy jobs — builds, test lanes, codegen, linters — run at once on one machine, however many agents, worktrees and terminals start them.
identity
Package identity converges the CONTENT of one Zitadel instance to a declared Spec: the project, its roles, the OIDC applications (web, SPA, native and the native-sign-in broker app), machine users and their keys, the login / password-complexity / lockout policies, SMTP, declared role members and (dev and preview only) seed users.
Package identity converges the CONTENT of one Zitadel instance to a declared Spec: the project, its roles, the OIDC applications (web, SPA, native and the native-sign-in broker app), machine users and their keys, the login / password-complexity / lockout policies, SMTP, declared role members and (dev and preview only) seed users.
kcleval
Package kcleval reads values out of a forge project's KCL from Go, so a test can assert against what the project DECLARES instead of restating it.
Package kcleval reads values out of a forge project's KCL from Go, so a test can assert against what the project DECLARES instead of restating it.
lease
Package lease is a named, process-level singleton lock over Postgres advisory locks: at most one replica at a time runs a given job, every other replica waits as a hot standby and takes over when the holder exits, crashes or loses its database connection.
Package lease is a named, process-level singleton lock over Postgres advisory locks: at most one replica at a time runs a given job, every other replica waits as a hot standby and takes over when the holder exits, crashes or loses its database connection.
lifecyclekit
Package lifecyclekit owns process lifecycle: the four single-method component interfaces (Runner, Drainer, Closer, Readier) and Supervise, which starts a list of components in order and stops them in reverse (supervise.go) — plus the uniform worker/operator supervised-component machinery that the generated internal/app/lifecycle_gen.go delegates to.
Package lifecyclekit owns process lifecycle: the four single-method component interfaces (Runner, Drainer, Closer, Readier) and Supervise, which starts a list of components in order and stops them in reverse (supervise.go) — plus the uniform worker/operator supervised-component machinery that the generated internal/app/lifecycle_gen.go delegates to.
middleware
Package middleware provides the commodity HTTP middlewares and Connect interceptors that every forge-generated service ships with.
Package middleware provides the commodity HTTP middlewares and Connect interceptors that every forge-generated service ships with.
migratekit
Package migratekit is the invariant half of a forge project's `db migrate` command tree: opening a migrator over an embedded migration set, closing it, and reporting what the schema is doing.
Package migratekit is the invariant half of a forge project's `db migrate` command tree: opening a migrator over an embedded migration set, closing it, and reporting what the schema is doing.
migratekit/compat
Package compat reads the contracts a migration declares about itself: that it is BACKWARD-COMPATIBLE, or deliberately BREAKS ROLLBACK (this file), and which foreign migration history a baseline ADOPTS (adopt.go).
Package compat reads the contracts a migration declares about itself: that it is BACKWARD-COMPATIBLE, or deliberately BREAKS ROLLBACK (this file), and which foreign migration history a baseline ADOPTS (adopt.go).
money
Package money provides a small, allocation-free value type for representing monetary amounts as an integer number of minor units ("cents") plus a currency, together with overflow-checked arithmetic and locale-neutral formatting.
Package money provides a small, allocation-free value type for representing monetary amounts as an integer number of minor units ("cents") plus a currency, together with overflow-checked arithmetic and locale-neutral formatting.
mountkit
Package mountkit mounts a forge Connect service onto an http.ServeMux.
Package mountkit mounts a forge Connect service onto an http.ServeMux.
mountkit/inventory
Package inventory owns the DATA-ONLY service descriptor type and reader helpers behind the generated internal/app/inventory_gen.go's `var Inventory = []inventory.ComponentInfo{...}`.
Package inventory owns the DATA-ONLY service descriptor type and reader helpers behind the generated internal/app/inventory_gen.go's `var Inventory = []inventory.ComponentInfo{...}`.
oauth2
Package oauth2 implements the client half of the OAuth 2.0 authorization-code flow with PKCE (RFC 7636) using only the standard library.
Package oauth2 implements the client half of the OAuth 2.0 authorization-code flow with PKCE (RFC 7636) using only the standard library.
observe
File: client.go — the OUTBOUND Connect client stack.
File: client.go — the OUTBOUND Connect client stack.
observe/metrics
Package metrics is forge's declared metrics registry: a typed layer over the OpenTelemetry metrics API in which every instrument is DECLARED before it is created.
Package metrics is forge's declared metrics registry: a typed layer over the OpenTelemetry metrics API in which every instrument is DECLARED before it is created.
orm
Package orm is forge's typed data-access layer: a postgres-pinned query builder over uptrace/bun, plus the schema-truth machinery that projects entity types out of the applied migrations.
Package orm is forge's typed data-access layer: a postgres-pinned query builder over uptrace/bun, plus the schema-truth machinery that projects entity types out of the applied migrations.
pgtest
Package pgtest provides a REAL ephemeral postgres for generate-time schema introspection and for hermetic tests that need a database.
Package pgtest provides a REAL ephemeral postgres for generate-time schema introspection and for hermetic tests that need a database.
profilequery
Package profilequery reads continuous profiles back out of ClickHouse and writes them in formats other tools open.
Package profilequery reads continuous profiles back out of ClickHouse and writes them in formats other tools open.
release
Package release is forge's release ledger vocabulary: what a RELEASE is (an immutable, content-addressed set of artifacts under a version label), what a PROMOTION is (one append-only event binding an environment to a release), and the invariants both must hold no matter where they are stored.
Package release is forge's release ledger vocabulary: what a RELEASE is (an immutable, content-addressed set of artifacts under a version label), what a PROMOTION is (one append-only event binding an environment to a release), and the invariants both must hold no matter where they are stored.
schemadef
Package schemadef projects a project's APPLIED database schema — db/migrations/*.up.sql executed in order against a REAL ephemeral postgres — into a typed model that code generation consumes.
Package schemadef projects a project's APPLIED database schema — db/migrations/*.up.sql executed in order against a REAL ephemeral postgres — into a typed model that code generation consumes.
seedplan
Package seeddata materializes deterministic, FK-coherent demo data directly into a development database — at RUNTIME, never as a persisted seed file in the user's project.
Package seeddata materializes deterministic, FK-coherent demo data directly into a development database — at RUNTIME, never as a persisted seed file in the user's project.
serverkit
Package serverkit runs an already-composed forge server: HTTP/Connect listener (HTTP/1.1, HTTP/2, h2c), healthz/readyz probes, the HTTP edge (CORS / security-headers / request-id), worker supervisor, operator manager, and graceful shutdown sequence.
Package serverkit runs an already-composed forge server: HTTP/Connect listener (HTTP/1.1, HTTP/2, h2c), healthz/readyz probes, the HTTP edge (CORS / security-headers / request-id), worker supervisor, operator manager, and graceful shutdown sequence.
serverkit/drainbudget
Package drainbudget is the one reading of a process's two drain knobs, PRE_STOP_DELAY and SHUTDOWN_TIMEOUT: how a value is written, what zero and a negative value mean, and the defaults.
Package drainbudget is the one reading of a process's two drain knobs, PRE_STOP_DELAY and SHUTDOWN_TIMEOUT: how a value is written, what zero and a negative value mean, and the defaults.
stsresize
Package stsresize converges a StatefulSet whose declared volume size grew.
Package stsresize converges a StatefulSet whose declared volume size grew.
svcerr
Package svcerr provides the canonical service-error → Connect-error mapping used by every forge handler package.
Package svcerr provides the canonical service-error → Connect-error mapping used by every forge handler package.
tdd
Package tdd is a generics-based table-driven test library for Forge projects.
Package tdd is a generics-based table-driven test library for Forge projects.
testkit
Package testkit provides a small set of test helpers that every forge-generated bootstrap_testing.go reinvents: a discard logger, a real-postgres ORM context (bare, or with the project's embedded migrations applied), an httptest harness that wraps a Connect-mounted service, and a claims-bearing AuthedContext for handlers that read the current user.
Package testkit provides a small set of test helpers that every forge-generated bootstrap_testing.go reinvents: a discard logger, a real-postgres ORM context (bare, or with the project's embedded migrations applied), an httptest harness that wraps a Connect-mounted service, and a claims-bearing AuthedContext for handlers that read the current user.
validate
Package validate provides a Connect interceptor that enforces protovalidate (buf.validate) field rules at the RPC boundary.
Package validate provides a Connect interceptor that enforces protovalidate (buf.validate) field rules at the RPC boundary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL