CLI

confiqure push

Upload your annotated classes. Push always targets your sandbox workspace (sb-{workspaceKey}) — test the conversation there, then promote to production with --production or push-and-promote in one step with --live. After upload, the engine regenerates each affected endpoint; the CLI waits and prints readiness per class.


Synopsis

Terminal
$ confiqure push [-y] [--allow-dirty] [--no-watch] [-f] [--file <path>] [--production | --live]

Flags

FlagPurpose
-y, --yesSkip the confirmation prompt.
--allow-dirtyUpload even when files in scanPaths have uncommitted changes. The recorded git version won't match a committed SHA.
--no-watchDon't poll for endpoint readiness after upload. Returns as soon as the server accepts the manifest. Designed for CI.
-f, --forceRe-upload every annotated class regardless of git SHA — bypasses the registry diff and marks everything CHANGED.
--file <path>Selective push of one annotated root (plus the nested types it reaches). Sandbox-only and additive — it never deletes.
--productionSkip the upload entirely; promote the sandbox's active endpoints to production verbatim, with no regeneration. Asks to confirm unless -y.
--livePush to sandbox, then auto-promote to production once every class generates successfully. On any sandbox failure nothing is promoted.

What push does, in order

  1. 1
    Scan — walks scanPaths, finds your object classes (@Confiqure.Setting, @Confiqure.List, …), @Confiqure.Tool classes, the @Confiqure.Facts class, the @Confiqure.DefaultCallbackHook handler, and every source file reachable from them.
  2. 2
    Diff — fetches the workspace registry and computes ADDED / CHANGED / DELETED per class (matched by class identity, changed by git SHA).
  3. 3
    Sync user guides — hashes every file in your guides folders, uploads only what changed, and retires pages you deleted in git. Independent of the class diff: a docs-only edit still ships. Skipped for --file pushes, and never fails the push.
  4. 4
    Clean-tree check — refuses to continue if any file in scanPaths is dirty in git. Skip with --allow-dirty.
  5. 5
    Confirm — prints the class tree and change summary; you say yes (or pass -y).
  6. 6
    Upload — multipart POST /api/sb-{workspaceKey}/upload with a manifest (changes, git SHAs, tool classes) plus the source files.
  7. 7
    Watch — polls /upload/status/{id} every second for up to 30s, printing each class as its endpoint becomes ready.

User guides ride along

Whatever sits in the folders you listed under guides in confiqure.config.json is kept in sync by the same push. The CLI hashes each page, ships only what changed, and sends the full local list so a page you deleted in git is retired server-side — git remains the version control.

Terminal
⏵ Guides (docs/user-guides): 2 to upload, 11 unchanged, 1 to retire.
  Synced: 2 uploaded, 11 unchanged, 1 retired, 0 rejected.
  ✓ docs/user-guides/restocking.md
  ✓ docs/user-guides/images/restock-panel.png
  − docs/user-guides/old-pricing.md

Guides sync runs even when no class changed, is skipped for --file pushes (a selective push must never compute deletions), and never fails the push — guides are content, your classes are the contract. --production and --live mirror the guides corpus to production alongside your endpoints.

Example: clean push

Terminal
$ confiqure push

Annotated classes (2 changes, 1 unchanged):
  ADDED    NotificationPreferences      src/main/java/.../NotificationPreferences.java  a1b2c3d
  CHANGED  ProfileSettings              src/main/java/.../ProfileSettings.java          e4f5a6b

?  Apply these changes? yes

Pushed to sandbox (sb-abcdef): 2/2 accepted, 0 rejected.
✓  NotificationPreferences ready (2.1s)
✓  ProfileSettings ready (1.8s)

Sandbox → production

A plain push never touches production. When the sandbox conversation behaves the way you want, promote it:

Terminal
$ confiqure push --production
Promoted 3/3 endpoints + 2 tools → production.
  User guides were mirrored to production with this promote.

# or push + promote in one step once generation succeeds:
$ confiqure push --live

Example: CI usage

.github/workflows/deploy.yml
- name: Push config schema to sandbox
  run: npx @confiqure/cli push -y --no-watch
  env:
    CONFIQURE_API_KEY: ${{ secrets.CONFIQURE_API_KEY }}
    CONFIQURE_WORKSPACE_KEY: ${{ vars.CONFIQURE_WORKSPACE_KEY }}

With --no-watch the job returns before generation finishes, so pair it with a manual --production promote — --live skips its auto-promote when it can't watch generation succeed.

Clean-tree precondition

push runs git status --porcelain and filters the results to files that match your scanPaths globs. Dirty README.md or infra/ changes don't block — only schema files do.

Why: every pushed revision is associated with a real git SHA so rollbacks and audits map back to a commit. Pushing dirty content breaks that link.

Last updated August 2026