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
$ confiqure push [-y] [--allow-dirty] [--no-watch] [-f] [--file <path>] [--production | --live]Flags
| Flag | Purpose |
|---|---|
| -y, --yes | Skip the confirmation prompt. |
| --allow-dirty | Upload even when files in scanPaths have uncommitted changes. The recorded git version won't match a committed SHA. |
| --no-watch | Don't poll for endpoint readiness after upload. Returns as soon as the server accepts the manifest. Designed for CI. |
| -f, --force | Re-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. |
| --production | Skip the upload entirely; promote the sandbox's active endpoints to production verbatim, with no regeneration. Asks to confirm unless -y. |
| --live | Push to sandbox, then auto-promote to production once every class generates successfully. On any sandbox failure nothing is promoted. |
What push does, in order
- 1Scan — walks
scanPaths, finds your object classes (@Confiqure.Setting,@Confiqure.List, …),@Confiqure.Toolclasses, the@Confiqure.Factsclass, the@Confiqure.DefaultCallbackHookhandler, and every source file reachable from them. - 2Diff — fetches the workspace registry and computes ADDED / CHANGED / DELETED per class (matched by class identity, changed by git SHA).
- 3Sync user guides — hashes every file in your
guidesfolders, uploads only what changed, and retires pages you deleted in git. Independent of the class diff: a docs-only edit still ships. Skipped for--filepushes, and never fails the push. - 4Clean-tree check — refuses to continue if any file in
scanPathsis dirty in git. Skip with--allow-dirty. - 5Confirm — prints the class tree and change summary; you say yes (or pass
-y). - 6Upload — multipart
POST /api/sb-{workspaceKey}/uploadwith a manifest (changes, git SHAs, tool classes) plus the source files. - 7Watch — 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.
⏵ 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
$ 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:
$ 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 --liveExample: CI usage
- 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.