@usefillo/cli 0.8.0 → 0.10.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
@@ -1,9 +1,23 @@
1
- # @usefillo/cli
1
+ <p align="center">
2
+ <a href="https://fillo.so">
3
+ <img src="https://fillo.so/brand/readme-banner.png" alt="Fillo — forms inside your product, with your UI." />
4
+ </a>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://fillo.so/docs">Docs</a> ·
9
+ <a href="https://fillo.so/guides">Guides</a> ·
10
+ <a href="https://fillo.so/agents">Agents</a> ·
11
+ <a href="https://fillo.so/changelog">Changelog</a>
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="https://www.npmjs.com/package/@usefillo/cli"><img src="https://img.shields.io/npm/v/@usefillo/cli" alt="npm version" /></a>
16
+ <img src="https://img.shields.io/npm/l/@usefillo/cli" alt="MIT license" />
17
+ </p>
2
18
 
3
19
  `fillo` — create and publish [Fillo](https://fillo.so) forms from your terminal. Auth once, then your coding agent does the rest.
4
20
 
5
- ### 📚 Full documentation → **[fillo.so/docs](https://fillo.so/docs)**
6
-
7
21
  ```sh
8
22
  npx @usefillo/cli init --email you@company.com # start a workspace and email its link
9
23
  npx @usefillo/cli login # connect an existing account in the browser
@@ -11,95 +25,35 @@ npx @usefillo/cli push form.json --handle hello --stage # stage for dashboard re
11
25
  npx @usefillo/cli@latest skill install # install the project Agent Skill
12
26
  ```
13
27
 
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
28
+ Commands: `init`, `login`, `logout`, `whoami`, `push <file|->`, `list`,
29
+ `agent bootstrap`, `agent connect`, `agent event`, and `skill install`. Run
30
+ `npx @usefillo/cli --help` for flags. The canonical skill is
31
+ one portable Agent Skills bundle. The default command installs it in the shared
32
+ `.agents/skills` path and Claude Code's `.claude/skills` path. Hosts with another
33
+ location can use `skill install --dir <agent-skill-directory>`, so the same
34
+ bundle works without provider-specific forks. See
35
+ [fillo.so/agents](https://fillo.so/agents) for setup. The API
19
36
  commands target
20
37
  `https://fillo.so` by default (set `FILLO_API` to override).
21
38
 
22
- ## Safe schema staging
39
+ ## Stage instead of publish
23
40
 
24
- After `fillo login`, use `--stage` to create or replace a code draft without
25
- taking the published form offline:
41
+ `--stage` creates or replaces a reviewable draft without taking the published
42
+ form offline; a plain authenticated `push` publishes directly.
26
43
 
27
44
  ```sh
28
45
  npx @usefillo/cli push form.json --handle customer-onboarding --stage
29
46
  ```
30
47
 
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.
48
+ CI staging with least-privilege sync tokens, pushing a schema from stdin, and
49
+ the raw sync endpoint are covered in the CLI guide:
50
+ [fillo.so/docs/cli](https://fillo.so/docs/cli). The agent handoff and progress
51
+ protocol (`fillo agent event`) live at
52
+ [fillo.so/agents](https://fillo.so/agents).
93
53
 
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.
54
+ A Fillo browser handoff supplies an `agent bootstrap` command. It installs the
55
+ skill and connects the live setup in one run. With `--account`, it also opens
56
+ Fillo so the user can approve the exact workspace before the agent continues.
103
57
 
104
58
  ## Links
105
59