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