@processfocus/cli 0.1.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +28 -0
- package/README.md +736 -0
- package/dist/bundled-db-import.mjs +475 -0
- package/dist/bundled-graphql-schema.mjs +55 -0
- package/dist/main.mjs +1444 -0
- package/dist/prepare-deployment-artifact.mjs +4 -0
- package/dist/resources/cedar/policies.cedar +315 -0
- package/dist/resources/cedar/schema.cedarschema +276 -0
- package/dist/resources/system-migrations/20251230050207_wild_ikaris/migration.sql +1 -0
- package/dist/resources/system-migrations/20251230050207_wild_ikaris/snapshot.json +10 -0
- package/dist/resources/system-migrations/20260215222342_legacy_deploy_placeholder/migration.sql +1 -0
- package/dist/resources/system-migrations/20260217210625_legacy_deploy_placeholder/migration.sql +1 -0
- package/dist/resources/system-migrations/20260225225114_legacy_deploy_placeholder/migration.sql +1 -0
- package/dist/resources/system-migrations/20260304233747_legacy_deploy_placeholder/migration.sql +1 -0
- package/dist/resources/system-migrations/20260313015405_legacy_deploy_placeholder/migration.sql +1 -0
- package/dist/resources/system-migrations/20260317191043_legacy_deploy_placeholder/migration.sql +1 -0
- package/dist/resources/system-migrations/20260401023429_legacy_deploy_placeholder/migration.sql +1 -0
- package/dist/resources/system-migrations/20260401074807_legacy_deploy_placeholder/migration.sql +1 -0
- package/dist/resources/system-migrations/20260407221320_legacy_deploy_placeholder/migration.sql +1 -0
- package/dist/resources/system-migrations/20260409221005_lyrical_slapstick/migration.sql +588 -0
- package/dist/resources/system-migrations/20260409221005_lyrical_slapstick/snapshot.json +5580 -0
- package/dist/resources/system-migrations/20260410054541_updated-at-triggers/migration.sql +259 -0
- package/dist/resources/system-migrations/20260410054541_updated-at-triggers/snapshot.json +5580 -0
- package/dist/resources/system-migrations/20260506185000_external-participants/migration.sql +27 -0
- package/dist/resources/system-migrations/20260525081848_confused_mac_gargan/migration.sql +16 -0
- package/dist/resources/system-migrations/20260525081848_confused_mac_gargan/snapshot.json +5929 -0
- package/dist/resources/system-migrations/20260525211724_ordinary_archangel/migration.sql +1 -0
- package/dist/resources/system-migrations/20260525211724_ordinary_archangel/snapshot.json +5954 -0
- package/dist/resources/system-migrations/20260526022120_cultured_daredevil/migration.sql +1 -0
- package/dist/resources/system-migrations/20260526022120_cultured_daredevil/snapshot.json +5979 -0
- package/dist/resources/system-migrations/20260607222956_blue_maelstrom/migration.sql +26 -0
- package/dist/resources/system-migrations/20260607222956_blue_maelstrom/snapshot.json +6139 -0
- package/dist/resources/system-migrations/20260608074412_productive_guardian/migration.sql +4 -0
- package/dist/resources/system-migrations/20260608074412_productive_guardian/snapshot.json +6179 -0
- package/dist/resources/system-migrations/20260609042621_huge_hellcat/migration.sql +3 -0
- package/dist/resources/system-migrations/20260609042621_huge_hellcat/snapshot.json +6209 -0
- package/dist/resources/system-migrations/20260626224225_glorious_tenebrous/migration.sql +107 -0
- package/dist/resources/system-migrations/20260626224225_glorious_tenebrous/snapshot.json +6221 -0
- package/dist/resources/system-migrations/20260722090215_mighty_colonel_america/migration.sql +26 -0
- package/dist/resources/system-migrations/20260722090215_mighty_colonel_america/snapshot.json +6490 -0
- package/dist/resources/system-migrations/20260722234847_brainy_quasimodo/migration.sql +1 -0
- package/dist/resources/system-migrations/20260722234847_brainy_quasimodo/snapshot.json +6500 -0
- package/dist/resources/system-migrations/20260727044204_nostalgic_lightspeed/migration.sql +51 -0
- package/dist/resources/system-migrations/20260727044204_nostalgic_lightspeed/snapshot.json +6670 -0
- package/dist/resources/system-migrations/20260727044743_green_thaddeus_ross/migration.sql +30 -0
- package/dist/resources/system-migrations/20260727044743_green_thaddeus_ross/snapshot.json +6670 -0
- package/dist/resources/system-migrations/20260727085203_safe_flatman/migration.sql +80 -0
- package/dist/resources/system-migrations/20260727085203_safe_flatman/snapshot.json +6803 -0
- package/dist/resources/system-migrations/20260727192244_natural_franklin_richards/migration.sql +14 -0
- package/dist/resources/system-migrations/20260727192244_natural_franklin_richards/snapshot.json +6947 -0
- package/dist/resources/system-migrations/20260727230751_updated-at-triggers/migration.sql +1 -0
- package/dist/resources/system-migrations/20260727230751_updated-at-triggers/snapshot.json +6947 -0
- package/dist/resources/system-migrations/20260727230758_pale_mother_askani/migration.sql +25 -0
- package/dist/resources/system-migrations/20260727230758_pale_mother_askani/snapshot.json +7121 -0
- package/dist/resources/system-migrations/20260831084613_nostalgic_hannibal_king/migration.sql +4 -0
- package/dist/resources/system-migrations/20260831084613_nostalgic_hannibal_king/snapshot.json +6852 -0
- package/dist/resources/system-migrations/20260906234923_stiff_maria_hill/migration.sql +77 -0
- package/dist/resources/system-migrations/20260906234923_stiff_maria_hill/snapshot.json +7396 -0
- package/dist/resources/system-migrations/20260907104651_delegation-rename-snapshots/migration.sql +2 -0
- package/dist/resources/system-migrations/20260907104651_delegation-rename-snapshots/snapshot.json +7416 -0
- package/dist/resources/system-migrations/20260907113440_abandoned_vertigo/migration.sql +2 -0
- package/dist/resources/system-migrations/20260907113440_abandoned_vertigo/snapshot.json +7466 -0
- package/dist/resources/system-migrations/20260908002610_mute_sharon_ventura/migration.sql +87 -0
- package/dist/resources/system-migrations/20260908002610_mute_sharon_ventura/snapshot.json +7491 -0
- package/dist/resources/system-migrations/20260914100808_slippery_ultragirl/migration.sql +1 -0
- package/dist/resources/system-migrations/20260914100808_slippery_ultragirl/snapshot.json +7501 -0
- package/dist/resources/system-migrations/20260919083020_passkey-name/migration.sql +1 -0
- package/dist/resources/system-migrations/20260919083020_passkey-name/snapshot.json +7511 -0
- package/dist/resources/system-migrations/20260919094049_passkey-last-used/migration.sql +1 -0
- package/dist/resources/system-migrations/20260919094049_passkey-last-used/snapshot.json +7521 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
# pfcli
|
|
2
|
+
|
|
3
|
+
Process Focus CLI Tool — scaffold, build, and manage business process organisations.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
`pfcli` is the command-line interface for the Process Focus business process modeling system. It helps you:
|
|
8
|
+
|
|
9
|
+
- Scaffold new organisation directories with working templates
|
|
10
|
+
- Build and bundle organisation code for deployment
|
|
11
|
+
- Destroy hosted project environments through the existing Backend process
|
|
12
|
+
- Import organisation configurations to the database
|
|
13
|
+
- Run system and custom database migrations
|
|
14
|
+
- Inspect custom-domain certificate status and required DNS records
|
|
15
|
+
- Run browser-based CLI authentication
|
|
16
|
+
- Open a short-lived Database Shell for hosted environment investigation
|
|
17
|
+
- Download hosted environment databases as local SQLite databases
|
|
18
|
+
- Serve agent-oriented runtime skill guidance for the installed CLI version
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
### `init`
|
|
23
|
+
|
|
24
|
+
Initialise a new organisation directory with template files, generate a
|
|
25
|
+
`package.json` using the released `processfocus` SDK, install dependencies, then
|
|
26
|
+
import it so `db/pf.db` and the frontend JWT exist immediately.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pfcli init <org-path> --email <admin-email> --identity-provider <name> [--identity-provider <name> ...]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Arguments:**
|
|
33
|
+
- `org-path` — Path to the organisation directory to initialise (supports `PF_ORG` env var)
|
|
34
|
+
|
|
35
|
+
**Options:**
|
|
36
|
+
- `--email` — Admin email used for the scaffolded invitation and Cedar policy (required)
|
|
37
|
+
- `--identity-provider` — Identity provider to scaffold; repeat for multiple providers (required, at least one)
|
|
38
|
+
|
|
39
|
+
**Example:**
|
|
40
|
+
```bash
|
|
41
|
+
pfcli init ./my-org --email admin@example.com --identity-provider google --identity-provider github
|
|
42
|
+
PF_ORG=./my-org pfcli init --email admin@example.com --identity-provider google
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Creates the following structure:
|
|
46
|
+
```
|
|
47
|
+
my-org/
|
|
48
|
+
├── package.json # Generated org package metadata and npm dependencies
|
|
49
|
+
├── node_modules/ # Normal package-manager installation
|
|
50
|
+
├── db/
|
|
51
|
+
│ └── pf.db # Created and seeded by init via import
|
|
52
|
+
├── src/
|
|
53
|
+
│ ├── index.ts # Entry point re-export
|
|
54
|
+
│ ├── org.ts # Org definition (processes, roles, auth, invitations)
|
|
55
|
+
│ └── todo.ts # Sample Todo process
|
|
56
|
+
└── cedar/
|
|
57
|
+
└── custom.cedar # Cedar authorization policies
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### `build`
|
|
61
|
+
|
|
62
|
+
Build organisation artifacts (bundled JS, GraphQL schema, Cedar policies).
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pfcli build <org-path> [options]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Arguments:**
|
|
69
|
+
- `org-path` — Path to the organisation directory
|
|
70
|
+
|
|
71
|
+
**Options:**
|
|
72
|
+
- `--output, -o` — Output directory for build artifacts (default: `dist`)
|
|
73
|
+
|
|
74
|
+
**Example:**
|
|
75
|
+
```bash
|
|
76
|
+
pfcli build ./my-org
|
|
77
|
+
pfcli build ./my-org --output ./build
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Outputs:
|
|
81
|
+
- `dist/org.js` — Bundled organisation code from `src/index.ts`, including `dbImport`
|
|
82
|
+
- `dist/graphql/org.graphql` — Generated GraphQL schema
|
|
83
|
+
- `dist/cedar/` — Copied Cedar policy files
|
|
84
|
+
|
|
85
|
+
`dist/org.js` is the single import/runtime artifact. `pfcli import` uses the
|
|
86
|
+
built bundle's `dbImport` entrypoint rather than loading `src/index.ts` directly.
|
|
87
|
+
|
|
88
|
+
### `deploy`
|
|
89
|
+
|
|
90
|
+
Build the org, upload the resulting `dist` artifact, and start the deploy process.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pfcli deploy <org-path> --project <project-number> --env <environment-name>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Arguments:**
|
|
97
|
+
- `org-path` — Path to the organisation directory
|
|
98
|
+
|
|
99
|
+
**Options:**
|
|
100
|
+
- `--project` — Project number to deploy (internal project ID also accepted)
|
|
101
|
+
- `--env` — Environment name to deploy to (internal environment ID also accepted). Environment names are unique within a project, not just within a stage.
|
|
102
|
+
- `--no-wait` — Return after starting the deployment instead of waiting for completion
|
|
103
|
+
|
|
104
|
+
**Behavior:**
|
|
105
|
+
- Requires valid CLI credentials in `~/.config/pf/credentials.json`
|
|
106
|
+
- If missing or expired, command exits with: `Run "pfcli auth login"`
|
|
107
|
+
- Runs `pfcli build <org-path>` first
|
|
108
|
+
- Zips `<org-path>/dist`
|
|
109
|
+
- Requests upload URL via GraphQL `requestUploadUrl`
|
|
110
|
+
- Uploads zip to returned `uploadUrl`
|
|
111
|
+
- Starts deploy via `startOperationsDeploy`
|
|
112
|
+
- Waits for execution completion by default and prints concise execution updates
|
|
113
|
+
|
|
114
|
+
### `destroy`
|
|
115
|
+
|
|
116
|
+
Destroy a hosted project environment by starting the existing Backend process.
|
|
117
|
+
There is no organisation path or artifact upload.
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
pfcli destroy --project <project-number> --env <environment-name> --yes
|
|
121
|
+
pfcli destroy --project <project-number> --env <environment-name> --yes --no-wait
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Options:**
|
|
125
|
+
- `--project` — Project number to destroy from (internal project ID also accepted)
|
|
126
|
+
- `--env` — Environment name to destroy (internal environment ID also accepted)
|
|
127
|
+
- `--yes` — Mandatory non-interactive confirmation
|
|
128
|
+
- `--no-wait` — Return after starting destruction instead of waiting for completion
|
|
129
|
+
|
|
130
|
+
**Behavior:**
|
|
131
|
+
- Requires valid credentials from `pfcli auth login`
|
|
132
|
+
- Refuses to start unless `--yes` is present and identifies the target project and environment in the error
|
|
133
|
+
- Checks the environment name against the project's known environments before starting
|
|
134
|
+
- Starts the existing `/operations/destroy-environment` Backend process via `startOperationsDestroyEnvironment`; the CLI does not delete stacks itself
|
|
135
|
+
- The Backend process deletes the environment's AWS stacks and environment record
|
|
136
|
+
- Waits up to 45 minutes for execution completion by default and surfaces Backend failure details
|
|
137
|
+
- Prints only the execution ID when starting; it does not print credentials, signed URLs, or AWS account IDs
|
|
138
|
+
|
|
139
|
+
### `invitation registration-link`
|
|
140
|
+
|
|
141
|
+
Mint or rotate a Registration Link locally or in a remote customer environment. Pending Invitations use first-admin passkey bootstrap; `--rotate` can also issue a fresh Passkey Recovery Link for an existing account associated with an accepted or legacy-closed Invitation.
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Local database
|
|
145
|
+
pfcli invitation registration-link [org-path] --email <invited-email>
|
|
146
|
+
pfcli invitation registration-link [org-path] --email <invited-email> --rotate
|
|
147
|
+
|
|
148
|
+
# Remote customer environment
|
|
149
|
+
pfcli invitation registration-link --project <project-number> --env <environment-name> --email <invited-email>
|
|
150
|
+
pfcli invitation registration-link --project <project-number> --env <environment-name> --email <invited-email> --rotate
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Arguments:**
|
|
154
|
+
- `org-path` — Optional path to the organisation directory (local mode only; may come from `PF_ORG`)
|
|
155
|
+
|
|
156
|
+
**Options:**
|
|
157
|
+
- `--project` — Project number (internal project ID also accepted; remote mode)
|
|
158
|
+
- `--env` — Environment name (internal environment ID also accepted; remote mode)
|
|
159
|
+
- `--email` — Email of the pending Invitation
|
|
160
|
+
- `--rotate` — Replace an active or expired pending Registration Link, or issue a fresh single-use Passkey Recovery Link for an existing active account
|
|
161
|
+
|
|
162
|
+
**Behavior:**
|
|
163
|
+
- Local mode resolves its database from `SQLITE_DATABASE_PATH`, `org-path`, or `PF_ORG`
|
|
164
|
+
- Local URLs use `FRONTEND_BASE_URL`, `BASE_URL`, or `NEXT_PUBLIC_FRONTEND_URL`, falling back to `http://localhost:3000`
|
|
165
|
+
- Remote mode requires `--project` and `--env` together and valid CLI credentials from `pfcli auth login`
|
|
166
|
+
- Remote mode does not accept `org-path`
|
|
167
|
+
- Identifies the Invitation by Normalized Email (trim + lowercase)
|
|
168
|
+
- Prints the Registration Link URL once to stdout on success
|
|
169
|
+
- Does not print the URL on failure
|
|
170
|
+
- A second generate without `--rotate` fails while a live link exists
|
|
171
|
+
- Recovery preserves current roles, existing passkeys, and Invitation history. It refuses deleted Invitations, inactive accounts, accounts without current roles, and disabled passkey providers.
|
|
172
|
+
- Revoked pending links cannot be rotated. Restoring their access requires an explicit administrative action.
|
|
173
|
+
- Remote recovery additionally requires `recoverProviderUser` permission (initially Cloud Backend Administrators only), alongside user administration and project/environment access.
|
|
174
|
+
- Recovery links expire after 24 hours; browser sessions last at most ten minutes. Rotation invalidates all earlier recovery links and sessions for the account.
|
|
175
|
+
- Does not log the URL
|
|
176
|
+
|
|
177
|
+
CLI tests cover issuing and exchanging a local Registration Link through the
|
|
178
|
+
authentication database. Completing passkey registration and signing in remain
|
|
179
|
+
a browser acceptance step with a virtual authenticator.
|
|
180
|
+
|
|
181
|
+
### `db upload`
|
|
182
|
+
|
|
183
|
+
Upload a local SQLite database artifact through a signed document-store URL and wait for the backend apply flow to finish.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
pfcli db upload --project <project-number> --env <environment-name> [--mode data-copy|exact-restore] <sqlite-file>
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Arguments:**
|
|
190
|
+
- `sqlite-file` — Local SQLite database file to upload
|
|
191
|
+
|
|
192
|
+
**Options:**
|
|
193
|
+
- `--project` — Project number to upload to (internal project ID also accepted)
|
|
194
|
+
- `--env` — Environment name to upload to (internal environment ID also accepted)
|
|
195
|
+
- `--mode` — Upload semantics. Defaults to `data-copy`; use `exact-restore` only when the uploaded authentication state must replace the target environment's state
|
|
196
|
+
|
|
197
|
+
**Behavior:**
|
|
198
|
+
- Validates the local file exists, is a regular non-empty SQLite database file, and is readable before requesting an upload URL
|
|
199
|
+
- Uploads database bytes only through the signed document-store URL, not through GraphQL
|
|
200
|
+
- Starts the backend database apply flow and waits for completion; there is no `--no-wait` option
|
|
201
|
+
- `data-copy` preserves the target environment's signing keys, encryption keys, legacy signing keys, and stored frontend JWT while discarding all imported OAuth sessions and other OpenAuth storage
|
|
202
|
+
- `exact-restore` applies all uploaded database state, including OpenAuth keys and sessions
|
|
203
|
+
- Both modes create and validate a recovery snapshot before changing the uploaded candidate or the Active Environment Database
|
|
204
|
+
- For SQLite-engine (`libsql`) targets, requires `journal_mode=WAL` and keeps the existing Turso file-seed cutover
|
|
205
|
+
- For TursoDB (`tursodb`) targets, accepts the `journal_mode=delete` artifact produced by `db download`, replays a logical SQL dump into an empty TursoDB candidate through the Console's Turso Cloud layer, filters Turso-owned `__turso_internal_*` objects, and preserves AUTOINCREMENT continuity
|
|
206
|
+
- Prints concise JSON status lines with the local input path, byte size, document store path, operation ID, file ID, execution ID, and final `APPLIED` result
|
|
207
|
+
- Backend failures after a recovery snapshot is created include the recovery snapshot file ID for manual recovery
|
|
208
|
+
- Does not print signed URLs, Turso tokens, SSM parameter values, direct database credentials, AWS credentials, or raw secrets
|
|
209
|
+
|
|
210
|
+
### `db download`
|
|
211
|
+
|
|
212
|
+
Download a hosted environment database to a local SQLite database. The CLI asks the console GraphQL API for a short-lived direct download session and authoritative engine metadata, then selects the engine-specific transfer mechanism.
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
pfcli db download --project <project-number> --env <environment-name> [--output ./backup.sqlite]
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Options:**
|
|
219
|
+
- `--project` — Project number to download from (internal project ID also accepted)
|
|
220
|
+
- `--env` — Environment name to download from (internal environment ID also accepted)
|
|
221
|
+
- `--output` — Output path for the downloaded database. If omitted, `pfcli` writes a timestamped `pfcli-db-<project>-<env>-<timestamp>.sqlite` path in the current directory
|
|
222
|
+
|
|
223
|
+
**Behavior and boundaries:**
|
|
224
|
+
- Calls the console GraphQL download-session API using the Process Focus CLI login; GraphQL returns session metadata and short-lived Turso credentials, not database bytes
|
|
225
|
+
- Uses Turso Sync unchanged for SQLite-engine (`libsql`) databases; their output is reusable Turso Sync local state and sidecar files may appear beside it
|
|
226
|
+
- For TursoDB (`tursodb`), streams the authenticated HTTPS logical dump, removes Turso-owned `__turso_internal_*` objects, replays it into an ordinary SQLite file, and runs `PRAGMA integrity_check` plus `PRAGMA foreign_key_check`
|
|
227
|
+
- For TursoDB, builds in owner-private temporary files and atomically replaces `--output` only after validation. An existing output is replaced by a complete logical snapshot, not incrementally updated
|
|
228
|
+
- Waits for the engine-specific transfer to complete; there is no `--no-wait` option
|
|
229
|
+
- Prints concise JSON status lines with the project, environment, database, output path, session expiry, and final `SYNCED` result
|
|
230
|
+
- A failed or timed-out TursoDB download removes temporary dump/database files and leaves an existing output untouched
|
|
231
|
+
- Is pull-only in the first version and does not push local changes back to the hosted environment
|
|
232
|
+
- SQLite-engine correctness continues to rely on Turso Sync; TursoDB snapshots are validated locally before publication
|
|
233
|
+
- Does not use the Database Shell session API, signed document-store URLs, backend snapshot artifacts, or long-running process executions
|
|
234
|
+
- Keeps restore through Turso Sync push out of scope; restore support must be designed as a separate workflow
|
|
235
|
+
- Does not print Turso tokens, SSM parameter values, direct database credentials, AWS credentials, or raw secrets
|
|
236
|
+
|
|
237
|
+
### `db shell`
|
|
238
|
+
|
|
239
|
+
Open an interactive Turso shell against the Active Environment Database for a hosted project environment.
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
pfcli db shell --project <project> --env <env>
|
|
243
|
+
pfcli db shell --project <project> --env <env> --ttl 30m
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Prerequisites:**
|
|
247
|
+
- Authenticate to Process Focus with `pfcli auth login`; Turso organisation membership is not required
|
|
248
|
+
- Install the external Turso CLI from https://docs.turso.tech/cli/installation and make `turso` available on `PATH`
|
|
249
|
+
|
|
250
|
+
**Options:**
|
|
251
|
+
- `--project` — Project number to open a shell for (internal project ID also accepted)
|
|
252
|
+
- `--env` — Environment name to open a shell for (internal environment ID also accepted)
|
|
253
|
+
- `--ttl` — Session lifetime; bare numbers are seconds, and duration units such as `900s`, `15m`, or `1h` are accepted. The default is 15 minutes. Values over 1 hour are rejected locally with `Database Shell TTL must be 1 hour or less.`
|
|
254
|
+
|
|
255
|
+
**Behavior and boundaries:**
|
|
256
|
+
- Calls the console GraphQL `createDatabaseShellSession` mutation using the Process Focus CLI login
|
|
257
|
+
- Requires the caller to have the Cedar `databaseShell` permission; otherwise the console returns permission denied
|
|
258
|
+
- Checks that `turso` is installed before requesting a Database Shell session, so unused database credentials are not minted when the external dependency is missing
|
|
259
|
+
- Launches `turso db shell` with inherited terminal input/output and returns the Turso process exit code
|
|
260
|
+
- Opens a live read-write shell for the Active Environment Database; changes affect the hosted environment immediately
|
|
261
|
+
- Targets only the Active Environment Database, not runtime colors, rollback candidate databases, retained backup databases, downloaded snapshots, or local SQLite files
|
|
262
|
+
- Is for live investigation and emergency repair, not database transfer, snapshot download, local SQLite, rollback, restore, or backup workflows; use the dedicated upload, download, rollback, restore, and backup workflows for those cases
|
|
263
|
+
- Receives a short-lived Turso database token scoped to one database; the token is not a group token and does not include database attach permissions
|
|
264
|
+
- Does not refresh expired sessions automatically; rerun `pfcli db shell` to create a new short-lived session
|
|
265
|
+
- Does not persist the Turso token in `pfcli` credentials, Turso config, temp files, or env files
|
|
266
|
+
- Prints target metadata and a read-write warning, but does not print the credential-bearing Turso URL
|
|
267
|
+
- Audits first-version Database Shell session creation only; individual SQL statements are not audited by Process Focus
|
|
268
|
+
|
|
269
|
+
### Runtime Logs
|
|
270
|
+
|
|
271
|
+
Inspect the currently deployed runtime logs through the console GraphQL API.
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
pfcli logs --project <id> --env <name>
|
|
275
|
+
pfcli canary-logs --project <id> --env <name>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**Commands:**
|
|
279
|
+
- `logs` — Show recent primary runtime logs
|
|
280
|
+
- `canary-logs` — Show recent canary runtime logs
|
|
281
|
+
|
|
282
|
+
**Options:**
|
|
283
|
+
- `--project` — Project number whose runtime logs to read (internal ID also accepted)
|
|
284
|
+
- `--env` — Environment name whose runtime logs to read
|
|
285
|
+
|
|
286
|
+
**V1 output contract:**
|
|
287
|
+
- Starts with a concise primary/canary status line
|
|
288
|
+
- The status line is `Showing recent primary logs.` or `Showing recent canary logs.`
|
|
289
|
+
- Prints each returned log event as timestamp plus raw log message only
|
|
290
|
+
- Prints a concise empty-state line when no events are returned
|
|
291
|
+
- Does not print deployment color, CloudWatch log group, AWS account ID, AWS region, or stream names
|
|
292
|
+
- Leaves raw JSON log messages unchanged; it does not parse, simplify, pretty-print, or redact them
|
|
293
|
+
- Shows recent runtime logs returned by the cloud API
|
|
294
|
+
- The command descriptions distinguish v1 from follow/streaming modes without promising a time window
|
|
295
|
+
- Because redaction is out of scope for v1, raw messages are printed exactly as returned
|
|
296
|
+
|
|
297
|
+
**Out of scope for v1:**
|
|
298
|
+
- Docker-step build-phase logs, Fargate logs, and CodeBuild logs
|
|
299
|
+
- `--follow`, `--since`, `--json`, filtering, redaction, and user-configurable output caps
|
|
300
|
+
|
|
301
|
+
### `stage`
|
|
302
|
+
|
|
303
|
+
Manage project stages through the console GraphQL API.
|
|
304
|
+
|
|
305
|
+
Requires valid CLI credentials in `~/.config/pf/credentials.json`.
|
|
306
|
+
|
|
307
|
+
#### `stage list`
|
|
308
|
+
|
|
309
|
+
List the stages for a project.
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
pfcli stage list --project <project-number>
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Options:**
|
|
316
|
+
- `--project` - Project number to query (internal project ID also accepted)
|
|
317
|
+
|
|
318
|
+
**Behavior:**
|
|
319
|
+
- Calls the console GraphQL `listProjectStages` query
|
|
320
|
+
- Prints one stage name per line
|
|
321
|
+
- Prints a clear empty-state message when the project has no stages
|
|
322
|
+
|
|
323
|
+
**Example:**
|
|
324
|
+
```bash
|
|
325
|
+
pfcli stage list --project 1234-5678-9012
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
#### `stage add`
|
|
329
|
+
|
|
330
|
+
Create a new stage in a project by starting the existing `/operations/add-stage` process.
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
pfcli stage add --project <project-number> <stage-name>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Options:**
|
|
337
|
+
- `--project` - Project number to update (internal project ID also accepted)
|
|
338
|
+
|
|
339
|
+
**Arguments:**
|
|
340
|
+
- `stage-name` - Stage name to create
|
|
341
|
+
|
|
342
|
+
**Behavior:**
|
|
343
|
+
- Calls the generated `startOperationsAddStage` mutation
|
|
344
|
+
- Waits for execution completion and prints concise execution updates
|
|
345
|
+
- Prints `Stage created: <stage-name>` on success
|
|
346
|
+
- Prints a clean duplicate-stage error instead of raw database text
|
|
347
|
+
|
|
348
|
+
**Example:**
|
|
349
|
+
```bash
|
|
350
|
+
pfcli stage add --project 1234-5678-9012 Production
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### `env`
|
|
354
|
+
|
|
355
|
+
Manage project environments through the console GraphQL API.
|
|
356
|
+
|
|
357
|
+
Requires valid CLI credentials in `~/.config/pf/credentials.json`.
|
|
358
|
+
|
|
359
|
+
#### `env list`
|
|
360
|
+
|
|
361
|
+
List the environments for a project, optionally narrowed to a single stage.
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
pfcli env list --project <project-number> [--stage <stage-name>]
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
**Options:**
|
|
368
|
+
- `--project` - Project number to query (internal project ID also accepted)
|
|
369
|
+
- `--stage` - Optional stage to filter by (internal stage ID also accepted)
|
|
370
|
+
|
|
371
|
+
**Behavior:**
|
|
372
|
+
- Calls the console GraphQL `listProjectEnvironments` query
|
|
373
|
+
- Prints `environment (stage)` when `--stage` is not supplied
|
|
374
|
+
- Prints one environment name per line when `--stage` is supplied
|
|
375
|
+
- Prints a clear empty-state message when the selected scope has no environments
|
|
376
|
+
|
|
377
|
+
**Example:**
|
|
378
|
+
```bash
|
|
379
|
+
pfcli env list --project 1234-5678-9012
|
|
380
|
+
pfcli env list --project 1234-5678-9012 --stage Production
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
#### `env add`
|
|
384
|
+
|
|
385
|
+
Create a new environment in a project stage by starting the existing `/operations/add-environment` process.
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
pfcli env add --project <project-number> --stage <stage-name> <env-name>
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
**Options:**
|
|
392
|
+
- `--project` - Project number to update (internal project ID also accepted)
|
|
393
|
+
- `--stage` - Stage name to target (internal stage ID also accepted)
|
|
394
|
+
|
|
395
|
+
**Arguments:**
|
|
396
|
+
- `env-name` - Environment name to create
|
|
397
|
+
|
|
398
|
+
**Behavior:**
|
|
399
|
+
- Calls the generated `startOperationsAddEnvironment` mutation
|
|
400
|
+
- Waits for execution completion and prints concise execution updates
|
|
401
|
+
- Prints `Environment created: <env-name>` on success
|
|
402
|
+
- Relies on the backend process for environment-name validation and stage/project resolution
|
|
403
|
+
|
|
404
|
+
**Example:**
|
|
405
|
+
```bash
|
|
406
|
+
pfcli env add --project 1234-5678-9012 --stage Production prd
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### `custom-domain`
|
|
410
|
+
|
|
411
|
+
Show custom-domain certificate status and required DNS records through the console GraphQL API.
|
|
412
|
+
|
|
413
|
+
Requires valid CLI credentials in `~/.config/pf/credentials.json`.
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
pfcli custom-domain --project <project-number> --env <environment-name>
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
**Options:**
|
|
420
|
+
- `--project` — Project number to query (internal project ID also accepted)
|
|
421
|
+
- `--env` — Environment name to query (internal environment ID also accepted)
|
|
422
|
+
|
|
423
|
+
**Behavior:**
|
|
424
|
+
- Calls the console GraphQL `getDnsRecords` query
|
|
425
|
+
- The console backend resolves the customer AWS region and does the AWS lookups server-side
|
|
426
|
+
- Prints ACM validation CNAME records when present
|
|
427
|
+
- Prints the CloudFront site-access CNAME when available
|
|
428
|
+
- Prints the default domain when no custom domain is configured
|
|
429
|
+
|
|
430
|
+
**Example:**
|
|
431
|
+
```bash
|
|
432
|
+
pfcli custom-domain --project 0000-0000-0002 --env prod
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### `config`
|
|
436
|
+
|
|
437
|
+
Manage stage-scoped project config values through the console GraphQL API.
|
|
438
|
+
|
|
439
|
+
Requires valid CLI credentials in `~/.config/pf/credentials.json`.
|
|
440
|
+
|
|
441
|
+
#### `config list`
|
|
442
|
+
|
|
443
|
+
List config parameters for a project stage.
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
pfcli config list --project <project-number> --stage <stage-name>
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
**Options:**
|
|
450
|
+
- `--project` — Project number to query (internal project ID also accepted)
|
|
451
|
+
- `--stage` — Stage name to query (internal stage ID also accepted)
|
|
452
|
+
|
|
453
|
+
**Example:**
|
|
454
|
+
```bash
|
|
455
|
+
pfcli config list --project 0000-0000-0002 --stage Development
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
#### `config get`
|
|
459
|
+
|
|
460
|
+
Get a single config parameter for a project stage.
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
pfcli config get --project <project-number> --stage <stage-name> --key <key>
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
**Options:**
|
|
467
|
+
- `--project` — Project number to query (internal project ID also accepted)
|
|
468
|
+
- `--stage` — Stage name to query (internal stage ID also accepted)
|
|
469
|
+
- `--key` — Config key to fetch
|
|
470
|
+
|
|
471
|
+
**Example:**
|
|
472
|
+
```bash
|
|
473
|
+
pfcli config get --project 0000-0000-0002 --stage Development --key API_URL
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
#### `config set`
|
|
477
|
+
|
|
478
|
+
Create or update a config parameter for a project stage.
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
pfcli config set --project <project-number> --stage <stage-name> <key>
|
|
482
|
+
pfcli config set --project <project-number> --stage <stage-name> <key>=<value>
|
|
483
|
+
pfcli config set --project <project-number> --stage <stage-name> <key> <value>
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
**Options:**
|
|
487
|
+
- `--project` — Project number to update (internal project ID also accepted)
|
|
488
|
+
- `--stage` — Stage name to update (internal stage ID also accepted)
|
|
489
|
+
- `--secret` — Store as a secret value
|
|
490
|
+
|
|
491
|
+
**Arguments:**
|
|
492
|
+
- One of `<key>` (copy the value from the exported environment variable), `<key>=<value>`, or `<key> <value>`
|
|
493
|
+
- The bare `<key>` form fails if the environment variable is unset; an environment variable set to an empty string remains valid
|
|
494
|
+
|
|
495
|
+
**Examples:**
|
|
496
|
+
```bash
|
|
497
|
+
export API_URL=https://example.com
|
|
498
|
+
pfcli config set --project 0000-0000-0002 --stage Development API_URL
|
|
499
|
+
pfcli config set --project 0000-0000-0002 --stage Development API_URL=https://example.com
|
|
500
|
+
pfcli config set --project 0000-0000-0002 --stage Development API_URL https://example.com
|
|
501
|
+
export API_TOKEN='...'
|
|
502
|
+
pfcli config set --project 0000-0000-0002 --stage Development API_TOKEN --secret
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
#### `config delete`
|
|
506
|
+
|
|
507
|
+
Delete a config parameter for a project stage.
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
pfcli config delete --project <project-number> --stage <stage-name> --key <key>
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**Options:**
|
|
514
|
+
- `--project` — Project number to update (internal project ID also accepted)
|
|
515
|
+
- `--stage` — Stage name to update (internal stage ID also accepted)
|
|
516
|
+
- `--key` — Config key to delete
|
|
517
|
+
|
|
518
|
+
**Example:**
|
|
519
|
+
```bash
|
|
520
|
+
pfcli config delete --project 0000-0000-0002 --stage Development --key API_URL
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
#### `config copy-new`
|
|
524
|
+
|
|
525
|
+
Copy config parameters from another stage without overwriting keys that
|
|
526
|
+
already exist on the target stage. If `--from-stage` resolves to the same
|
|
527
|
+
stage as `--stage`, the command warns and does nothing.
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
pfcli config copy-new --project <project-number> --stage <target-stage-name> --from-stage <source-stage-name>
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
**Options:**
|
|
534
|
+
- `--project` — Project number to update (internal project ID also accepted)
|
|
535
|
+
- `--stage` — Target stage name to update (internal stage ID also accepted)
|
|
536
|
+
- `--from-stage` — Source stage name to copy from (internal stage ID also accepted)
|
|
537
|
+
|
|
538
|
+
**Example:**
|
|
539
|
+
```bash
|
|
540
|
+
pfcli config copy-new --project 0000-0000-0002 --stage Production --from-stage Development
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### `import`
|
|
544
|
+
|
|
545
|
+
Import organisation to the configured database. Automatically runs system and custom
|
|
546
|
+
migrations before importing, so it works on a fresh database.
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
pfcli import <org-path>
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
**Arguments:**
|
|
553
|
+
- `org-path` — Path to the organisation directory
|
|
554
|
+
|
|
555
|
+
**Database path resolution:**
|
|
556
|
+
- Uses `SQLITE_DATABASE_PATH` when set
|
|
557
|
+
- Otherwise falls back to `<org-path>/db/pf.db`
|
|
558
|
+
|
|
559
|
+
**Example:**
|
|
560
|
+
```bash
|
|
561
|
+
SQLITE_DATABASE_PATH=./data.db pfcli import ./my-org
|
|
562
|
+
# or rely on default path ./my-org/db/pf.db
|
|
563
|
+
pfcli import ./my-org
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
### `migrate`
|
|
567
|
+
|
|
568
|
+
Run both system (`__drizzle_migrations_pf`) and org custom
|
|
569
|
+
(`__drizzle_migrations_org`) schema migrations. Useful as a standalone
|
|
570
|
+
command when you want to migrate without re-importing.
|
|
571
|
+
|
|
572
|
+
```bash
|
|
573
|
+
pfcli migrate <org-path>
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
**Arguments:**
|
|
577
|
+
- `org-path` — Path to the organisation directory
|
|
578
|
+
|
|
579
|
+
**Database path resolution:**
|
|
580
|
+
- Uses `SQLITE_DATABASE_PATH` when set
|
|
581
|
+
- Otherwise falls back to `<org-path>/db/pf.db`
|
|
582
|
+
|
|
583
|
+
**Example:**
|
|
584
|
+
```bash
|
|
585
|
+
SQLITE_DATABASE_PATH=./data.db pfcli migrate ./my-org
|
|
586
|
+
pfcli migrate ./my-org
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
### `migrate-custom`
|
|
590
|
+
|
|
591
|
+
Run custom schema migrations for organisation.
|
|
592
|
+
|
|
593
|
+
```bash
|
|
594
|
+
pfcli migrate-custom <org-path>
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
**Arguments:**
|
|
598
|
+
- `org-path` — Path to the organisation directory
|
|
599
|
+
|
|
600
|
+
**Database path resolution:**
|
|
601
|
+
- Uses `SQLITE_DATABASE_PATH` when set
|
|
602
|
+
- Otherwise falls back to `<org-path>/db/pf.db`
|
|
603
|
+
|
|
604
|
+
**Example:**
|
|
605
|
+
```bash
|
|
606
|
+
SQLITE_DATABASE_PATH=./data.db pfcli migrate-custom ./my-org
|
|
607
|
+
pfcli migrate-custom ./my-org
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
### `get-frontend-jwt`
|
|
611
|
+
|
|
612
|
+
Read the stored frontend JWT token from the database.
|
|
613
|
+
|
|
614
|
+
`import`, `refresh-frontend-jwt`, and `get-frontend-jwt` select the frontend
|
|
615
|
+
identity using the shared auth helpers: `FRONTEND_JWT_TOKEN`'s
|
|
616
|
+
`properties.clientId` takes precedence over `OAUTH_CLIENT_ID`, then `frontend`.
|
|
617
|
+
Minting and local development client registration likewise use the JWT's `aud`
|
|
618
|
+
before `OAUTH_AUDIENCE`, then `graphql-api`. The default still reads and preserves
|
|
619
|
+
the existing `frontend-jwt/frontend` database entry; other identities use their
|
|
620
|
+
own entries. Import preserves a matching stored token; refresh regenerates it.
|
|
621
|
+
|
|
622
|
+
Use the same identity/audience configuration for bootstrap import, the auth
|
|
623
|
+
server, and the frontend launcher. `OPENAUTH_CLIENTS` is a registry, not a
|
|
624
|
+
frontend selector: for a nondefault frontend, also set `OAUTH_CLIENT_ID` (and
|
|
625
|
+
`OAUTH_AUDIENCE` where needed), or provide `FRONTEND_JWT_TOKEN` to all these
|
|
626
|
+
processes. Its selected registry entry must use `client_jwt` authentication and
|
|
627
|
+
the matching audience. No client is inferred from an ambiguous array.
|
|
628
|
+
Development auto-registration runs only without `OPENAUTH_CLIENTS` and with
|
|
629
|
+
`NODE_ENV=development`. The packaged local runtime uses `NODE_ENV=production`
|
|
630
|
+
and requires explicit `OPENAUTH_CLIENTS` before starting its auth server; it
|
|
631
|
+
then refreshes/reads the selected stored JWT for the remaining services.
|
|
632
|
+
|
|
633
|
+
```bash
|
|
634
|
+
pfcli get-frontend-jwt <org-path>
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
**Arguments:**
|
|
638
|
+
- `org-path` — Path to the organisation directory (supports `PF_ORG` env var)
|
|
639
|
+
|
|
640
|
+
**Database path resolution:**
|
|
641
|
+
- Uses `SQLITE_DATABASE_PATH` when set
|
|
642
|
+
- Otherwise falls back to `<org-path>/db/pf.db`
|
|
643
|
+
|
|
644
|
+
**Example:**
|
|
645
|
+
```bash
|
|
646
|
+
pfcli get-frontend-jwt ./my-org
|
|
647
|
+
PF_ORG=./my-org pfcli get-frontend-jwt
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
### `auth login`
|
|
651
|
+
|
|
652
|
+
Login through the browser and store CLI credentials locally.
|
|
653
|
+
|
|
654
|
+
```bash
|
|
655
|
+
BASE_URL=http://localhost:3000 pfcli auth login
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
**Environment:**
|
|
659
|
+
- `BASE_URL` — Required. Frontend base URL used to start CLI auth flow
|
|
660
|
+
|
|
661
|
+
Credentials are saved to `~/.config/pf/credentials.json`.
|
|
662
|
+
The Dashboard hands credentials back through a state-protected localhost callback.
|
|
663
|
+
Delegated sessions require clicking **Allow CLI access** in the Dashboard before
|
|
664
|
+
export. Confirm only when you initiated CLI login and trust the local program.
|
|
665
|
+
A failed or expired handoff exits with status 1 without replacing existing credentials.
|
|
666
|
+
Missing, invalid, or nonpositive credential lifetimes are not accepted as success.
|
|
667
|
+
The stored deadline is capped by the JWT's absolute expiry and is not extended
|
|
668
|
+
while waiting for the browser launcher. Credentials that expire before callback
|
|
669
|
+
receipt or storage are rejected. JWT decoding here is only an expiry hint; the
|
|
670
|
+
API still verifies the credential and its current validity.
|
|
671
|
+
|
|
672
|
+
### `skills`
|
|
673
|
+
|
|
674
|
+
Print agent-oriented guidance served by the installed `pfcli` version.
|
|
675
|
+
|
|
676
|
+
```bash
|
|
677
|
+
pfcli skills list
|
|
678
|
+
pfcli skills get core
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
**Behavior:**
|
|
682
|
+
- `skills list` prints available skill names and descriptions
|
|
683
|
+
- `skills get <name>` prints the matching operational guide as Markdown
|
|
684
|
+
- Skill content is version-coupled to the executable, so agents should prefer it over stale cached examples
|
|
685
|
+
|
|
686
|
+
## Workflow
|
|
687
|
+
|
|
688
|
+
Typical development workflow:
|
|
689
|
+
|
|
690
|
+
```bash
|
|
691
|
+
# 0. (Optional) login from CLI first (stores ~/.config/pf/credentials.json)
|
|
692
|
+
BASE_URL=http://localhost:3000 pfcli auth login
|
|
693
|
+
|
|
694
|
+
# 1. Scaffold a new organisation
|
|
695
|
+
pfcli init ./my-org --email admin@example.com --identity-provider google
|
|
696
|
+
|
|
697
|
+
# 2. Edit source files (src/todo.ts, src/org.ts, etc.)
|
|
698
|
+
|
|
699
|
+
# 3. (Optional) Re-import after source changes for local development
|
|
700
|
+
pfcli import ./my-org
|
|
701
|
+
|
|
702
|
+
# 4. Build the organisation
|
|
703
|
+
pfcli build ./my-org
|
|
704
|
+
|
|
705
|
+
# 5. (Optional) Deploy built dist artifact
|
|
706
|
+
pfcli deploy ./my-org --project <project-number> --env <environment-name>
|
|
707
|
+
|
|
708
|
+
# 6. (Optional) fetch frontend JWT from DB
|
|
709
|
+
pfcli get-frontend-jwt ./my-org
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
## Environment Variables
|
|
713
|
+
|
|
714
|
+
| Variable | Description | Used By |
|
|
715
|
+
|----------|-------------|---------|
|
|
716
|
+
| `PF_ORG` | Default organisation directory path | `init`, `import`, `get-frontend-jwt` |
|
|
717
|
+
| `SQLITE_DATABASE_PATH` | Database path override (otherwise defaults to `<org-path>/db/pf.db`) | `import`, `migrate`, `migrate-custom`, `get-frontend-jwt` |
|
|
718
|
+
| `BASE_URL` | Frontend base URL for browser auth flow | `auth login` |
|
|
719
|
+
| `PFCLI_CREDENTIALS_PATH` | Override credentials file path (test/dev only) | `auth login`, `deploy`, `db shell` |
|
|
720
|
+
| `GRAPHQL_SERVER_URL` | Override GraphQL server URL for import-completed callback | `import` |
|
|
721
|
+
| `INTERNAL_API_SECRET` | Optional callback secret header for internal import notification | `import` |
|
|
722
|
+
| `OAUTH_ISSUER_URL` | Issuer URL used when creating frontend JWT during import | `import` |
|
|
723
|
+
| `OAUTH_AUDIENCE` | Audience for generated frontend JWT (default `graphql-api`) | `import` |
|
|
724
|
+
| `GOOGLE_CLIENT_ID` | Google OAuth client ID (in org.ts) | org template/runtime |
|
|
725
|
+
| `GOOGLE_CLIENT_SECRET` | Google OAuth client secret (in org.ts) | org template/runtime |
|
|
726
|
+
| `MY_EMAIL` | Admin email for initial invitation (in org.ts) | org template/runtime |
|
|
727
|
+
|
|
728
|
+
## Help
|
|
729
|
+
|
|
730
|
+
Show help for any command:
|
|
731
|
+
|
|
732
|
+
```bash
|
|
733
|
+
pfcli --help
|
|
734
|
+
pfcli init --help
|
|
735
|
+
pfcli build --help
|
|
736
|
+
```
|