@usefillo/cli 0.5.1 → 0.8.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/README.md CHANGED
@@ -5,11 +5,101 @@
5
5
  ### 📚 Full documentation → **[fillo.so/docs](https://fillo.so/docs)**
6
6
 
7
7
  ```sh
8
- npx @usefillo/cli init # provision a workspace — no signup
9
- npx @usefillo/cli push form.json --handle hello # create/update a form from a JSON schema
8
+ npx @usefillo/cli init --email you@company.com # start a workspace and email its link
9
+ npx @usefillo/cli login # connect an existing account in the browser
10
+ npx @usefillo/cli push form.json --handle hello --stage # stage for dashboard review
11
+ npx @usefillo/cli@latest skill install # install the project Agent Skill
10
12
  ```
11
13
 
12
- Commands: `init`, `login`, `logout`, `whoami`, `push <file>`, `list`. Run `npx @usefillo/cli --help` for flags. Targets `https://fillo.so` by default (set `FILLO_API` to override).
14
+ Commands: `init`, `login`, `logout`, `whoami`, `push <file|->`, `list`, `agent`, and
15
+ `skill install`. Run `npx @usefillo/cli --help` for flags. The canonical skill is
16
+ one portable `SKILL.md` bundle: Codex, Cursor, GitHub Copilot agent surfaces, and
17
+ Gemini CLI share `.agents/skills`, while Claude Code uses `.claude/skills`. See
18
+ [fillo.so/agents](https://fillo.so/agents) for provider-specific setup. The API
19
+ commands target
20
+ `https://fillo.so` by default (set `FILLO_API` to override).
21
+
22
+ ## Safe schema staging
23
+
24
+ After `fillo login`, use `--stage` to create or replace a code draft without
25
+ taking the published form offline:
26
+
27
+ ```sh
28
+ npx @usefillo/cli push form.json --handle customer-onboarding --stage
29
+ ```
30
+
31
+ With a stable handle, `--draft` remains a compatibility alias for `--stage`.
32
+ The legacy `fillo push form.json --draft` form without a handle still creates a
33
+ new one-off draft, so it cannot take an existing live form offline. A plain
34
+ authenticated `push` still publishes directly, so use it only when immediate
35
+ publication is intentional.
36
+
37
+ The CLI also reads one JSON schema from stdin. This is useful for agents and CI
38
+ that already hold the canonical schema and should not leave another file behind:
39
+
40
+ ```sh
41
+ generate-form-schema | npx @usefillo/cli push - --handle customer-onboarding --stage
42
+ ```
43
+
44
+ For non-interactive server or CI staging, create a least-privilege token in
45
+ Fillo's **Settings > Developers** page and store it in the environment. The
46
+ token can stage schemas, but cannot publish forms or read responses.
47
+
48
+ ```sh
49
+ FILLO_SYNC_TOKEN="$YOUR_CI_SECRET" \
50
+ npx @usefillo/cli push form.json --handle customer-onboarding --stage
51
+ ```
52
+
53
+ A server can also call the stage-only endpoint directly:
54
+
55
+ ```http
56
+ POST /api/v1/forms/sync
57
+ Authorization: Bearer fsync_…
58
+ Content-Type: application/json
59
+
60
+ {"id":"customer-onboarding","schema":{"version":1,"title":"Onboarding","pages":[{"id":"main","blocks":[{"id":"email","kind":"email","label":"Email","required":true}]}],"settings":{}}}
61
+ ```
62
+
63
+ Send the bearer alone and omit `key` from the body. Combining both credential
64
+ types is rejected as `ambiguous_sync_credentials`.
65
+
66
+ Store `FILLO_SYNC_TOKEN` in the platform's secret manager. Do not commit it,
67
+ pass it as a command-line flag, or print it in logs. Tokens have no scheduled
68
+ expiry by default, but stop working if their creator loses manager access or
69
+ account/workspace deletion begins. Revoke and rotate them from the Developers
70
+ page.
71
+
72
+ ## Agent progress
73
+
74
+ The browser handoff supplies a run ID and short-lived progress token. Coding
75
+ agents use `fillo agent event` to keep that onboarding session in sync. Report
76
+ `--form-id` as soon as a form exists so Fillo can resume on the correct form,
77
+ watch for its first response, and open the right dashboard page.
78
+
79
+ ```sh
80
+ npx @usefillo/cli agent event \
81
+ --run "RUN_ID_FROM_HANDOFF" --token "PROGRESS_TOKEN_FROM_HANDOFF" \
82
+ --status needs_action --message "Publish the synced form" \
83
+ --action publish_required \
84
+ --form-id "FORM_ID_FROM_SYNC" --form-status draft
85
+ ```
86
+
87
+ `--action` accepts `claim_required`, `storage_required`, or
88
+ `publish_required`. `--form-status` accepts `draft` or `published`. `--app-url`
89
+ is optional and accepts only an HTTP(S) localhost or loopback URL; Fillo stores
90
+ only its origin. Saving a preview workspace to an account stays in Fillo and is
91
+ not reported through agent progress events. Never print, save, or commit the
92
+ progress token.
93
+
94
+ An existing-account handoff asks the agent to run the handoff-specific
95
+ `fillo login --api … --run … --token …` command from the copied prompt,
96
+ followed by `fillo agent connect --account`. The user explicitly chooses and
97
+ approves the workspace in Fillo. A general or older CLI login cannot attach
98
+ that handoff. The CLI keeps its account identity and token private and returns
99
+ only the workspace name and public `pk_` key to the agent. Existing-account
100
+ handoffs stage schema changes through the authenticated CLI; the `pk_` key
101
+ remains for registered code-form resolution in browser code. Published form
102
+ reads and responses work by form id independently.
13
103
 
14
104
  ## Links
15
105