Skip to content

CLI Reference

All inz subcommands with flags and examples.

inz [command] [flags]

Scaffold a new instancez project in the current directory.

Writes instancez.yaml, a .development.env.example, and optional boilerplate. Never touches a database. The example code function is scaffolded only when Node.js 22+ is on your PATH; otherwise init warns and omits the functions: block.

inz init [name] [flags]
FlagDefaultDescription
--dir.Output directory.
--forcefalseOverwrite existing scaffolding files.
Terminal window
inz init my-app --dir ./my-app

Start a local development server with hot-reload.

Reads config, connects to Postgres, runs migrations, and watches for file changes. Requires INSTANCEZ_DATABASE_URL (a superuser DSN) to provision roles on every startup, or set INSTANCEZ_OWNER_DATABASE_URL and INSTANCEZ_AUTH_DATABASE_URL directly.

inz dev [flags]
FlagDefaultDescription
--configinstancez.yamlConfig source: file path or s3://bucket/key. Env: INSTANCEZ_CONFIG.
--dashboardreadwriteDashboard mode: disabled, readonly, or readwrite.
--dashboard-write-dotenvtrueAllow the dashboard to write secrets to .development.env.
--dotenv-path.development.envPath to the .env file for dashboard secret writing.
--embedded-pgfalseStart an embedded Postgres 16 (data at ./pgdata/); no external DB needed.
--no-watchfalseDisable hot-reload.
--port(from config or 8080)Override server port.
--reset-pgfalseWipe ./pgdata/ before starting (requires --embedded-pg).
--verbosefalseEnable debug logging.
--watchtrueWatch the config source for changes.
--watch-interval1mS3-watch poll interval (minimum 10s).
Terminal window
INSTANCEZ_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres inz dev

Start the production server.

Unlike dev, does not hot-reload and defaults to dashboard disabled.

inz serve [flags]
FlagDefaultDescription
--allow-destructivefalsePermit DROP TABLE and DROP COLUMN during migration. Without it, inz serve refuses to apply a plan that drops a table or column and reports what would have been lost. inz dev always permits drops and logs each one. Env: INSTANCEZ_ALLOW_DESTRUCTIVE.
--bundleBundle pointer: file path or s3://bucket/key[#version]. When set, reads config and functions from the bundle archive instead of --config. Env: INSTANCEZ_BUNDLE.
--configinstancez.yamlConfig source: file path or s3://bucket/key. Ignored when --bundle is set. Env: INSTANCEZ_CONFIG.
--dashboarddisabledDashboard mode. Env: INSTANCEZ_DASHBOARD.
--dashboard-write-dotenvfalseAllow dashboard to write secrets to a .env file. Env: INSTANCEZ_DASHBOARD_WRITE_DOTENV.
--dotenv-pathPath to .env file when --dashboard-write-dotenv is set. Env: INSTANCEZ_DOTENV_PATH.
--migratefalseRun pending migrations on startup.
--port(from config or 8080)Override server port.
--watchfalseWatch the config source for changes. In bundle mode, polls the bundle ETag (S3) or mtime (local) instead of the config file. Env: INSTANCEZ_WATCH.
--watch-interval1mS3-watch poll interval. Env: INSTANCEZ_WATCH_INTERVAL.
Terminal window
inz serve --migrate --config instancez.yaml
# Bundle mode: config + functions come from a single archive (no race condition)
inz serve --bundle s3://my-bucket/bundles/app.tar.gz --migrate --watch
inz serve --bundle /path/to/bundle.tar.gz --migrate

Validate instancez.yaml structure and references without starting the server.

Checks YAML structure, identifiers, cross-references, and verifies that each declared code function’s file: exists on disk.

With --use-dsn, also connects to the database and prints the migration plan (DDL diff) without applying it.

inz validate [flags]
FlagDefaultDescription
--configinstancez.yamlConfig source. Env: INSTANCEZ_CONFIG.
--jsonfalseOutput errors as JSON (for CI).
--projectPreview against a cloud project. Bare --project uses instancez.yaml’s linked project; --project <id> or --project=<id> targets a different one. Never creates a project; link one first with inz cloud deploy --new.
--use-dsnAfter syntax check, plan a migration against this owner-class DSN (plan only — never applied).
Terminal window
inz validate
inz validate --use-dsn postgres://owner:pass@localhost/mydb
inz validate --project # preview against instancez.yaml's linked project
inz validate --project abc123 # preview against a specific project id

Build a self-contained tar.gz bundle from instancez.yaml and functions/.

The bundle is the deployment artifact for projects that use code functions. It contains instancez.yaml, functions/ (with vendored node_modules/), and a manifest.json. Upload it to S3 then set functions_bundle: in instancez.yaml to the returned pointer.

Runs stateless validation (same as inz validate) including checking that each declared function’s file: exists on disk.

inz bundle [flags]
FlagDefaultDescription
--configinstancez.yamlPath to instancez.yaml.
--outputDestination: local file path or s3://bucket/key. If omitted, writes to a temp file and prints the path.
Terminal window
inz bundle # write temp file, print path
inz bundle --output bundle.tar.gz # write to local file
inz bundle --output s3://my-bucket/bundle.tar.gz # upload to S3, print pointer

Write the current instancez.yaml to an instancez Cloud project.

Shows a diff of what would change and prompts for confirmation before writing. If no project is linked, pass --new to create one (after local validation passes) or --project <id> to target an existing one without editing the yaml.

inz cloud deploy [flags]
FlagDefaultDescription
--configinstancez.yamlPath to instancez.yaml.
--newfalseCreate a new instancez Cloud project when none is linked yet (only after local validation passes).
--projectTarget this cloud project id for this run, instead of instancez.yaml’s project.cloud.project_id. Does not modify the file.
--yes, -yfalseSkip the deploy confirmation prompt.
Terminal window
inz cloud deploy --new # first deploy: create + link + push
inz cloud deploy --project abc123 # target a specific project without editing the yaml
inz cloud deploy --yes # skip the confirmation prompt (e.g. in CI)

Run preflight checks for inz dev: config validity, the superuser database DSN, and Postgres role layout.

Exits non-zero if any check fails.

inz doctor [flags]
FlagDefaultDescription
--configinstancez.yamlPath to instancez.yaml.
Terminal window
inz doctor

Show the linked cloud project’s current state: name, ID, URL, and deploy status.

Requires a linked project (inz cloud deploy --new links one).

inz cloud status [flags]
FlagDefaultDescription
--configinstancez.yamlPath to instancez.yaml.
Terminal window
inz cloud status

Authenticate against instancez Cloud via device-code flow.

Opens a browser to confirm a one-time code, then stores a Personal Access Token at ~/.instancez/credentials.

inz cloud login [flags]
FlagDefaultDescription
--forcefalseRe-authenticate even if already logged in.
Terminal window
inz cloud login

Remove the PAT stored at ~/.instancez/credentials. The token remains valid server-side until revoked from the dashboard.

inz cloud logout

Print the currently logged-in instancez Cloud user.

inz cloud whoami

Print the binary version.

inz version