@floomhq/skills 0.2.19 → 1.0.1
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 +168 -0
- package/dist/index.js +5886 -2664
- package/dist/version.js +1 -1
- package/package.json +7 -6
package/README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# @floomhq/floom
|
|
2
|
+
|
|
3
|
+
The Floom CLI: one shared skill library, synced across every AI agent.
|
|
4
|
+
|
|
5
|
+
Docs: <https://floom.dev/docs>
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i -g @floomhq/floom
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Pinned no-install form for automation:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx -y @floomhq/floom@3.0.2 --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Login
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
floom login
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The login command starts a browser device flow. Sign in at floom.dev with
|
|
26
|
+
Google or email, approve the device code, and the CLI stores the session at
|
|
27
|
+
`~/.floom/auth.json`.
|
|
28
|
+
|
|
29
|
+
Check the active account:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
floom account
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## First Skill
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
floom push ~/.claude/skills/my-skill
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The folder must contain `SKILL.md`. Each push creates a Library version.
|
|
42
|
+
|
|
43
|
+
Create a starter skill when the folder does not exist yet:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
floom new my-skill --agent claude
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Bulk Sync
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
floom sync
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Zero-arg `floom sync` detects installed agents and supported scopes, reviews
|
|
56
|
+
local-to-Library and Library-to-local differences, and applies the selected
|
|
57
|
+
plan. Use `--dry-run` to preview the plan without changing files or Library
|
|
58
|
+
records.
|
|
59
|
+
|
|
60
|
+
Library-to-local only:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
floom pull
|
|
64
|
+
floom pull --agent claude,codex
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Local-to-Library only:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
floom push
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Use the installed `floom` command for interactive terminal work. Use the pinned
|
|
74
|
+
`npx -y @floomhq/floom@3.0.2 <command>` form for automation and agent-run
|
|
75
|
+
commands that need reproducible CLI behavior.
|
|
76
|
+
|
|
77
|
+
## Releasing
|
|
78
|
+
|
|
79
|
+
Releases publish to npm and bump the Homebrew tap formula automatically via
|
|
80
|
+
`.github/workflows/publish-cli.yml`, triggered by a `cli-v*` tag.
|
|
81
|
+
|
|
82
|
+
### Hard pre-publish smoke gate
|
|
83
|
+
|
|
84
|
+
Every `npm publish` is gated by `packages/cli/scripts/pre-publish-smoke.sh`,
|
|
85
|
+
which packs the tarball, installs it into an isolated `$HOME`, and drives
|
|
86
|
+
every subcommand the way a real user would. If anything fails, the workflow
|
|
87
|
+
fails BEFORE `npm publish` runs — no broken CLI can reach npm `latest`.
|
|
88
|
+
|
|
89
|
+
Background: in 2026-05 we shipped `3.0.0` → `3.0.1` → `3.0.2` within hours
|
|
90
|
+
because `3.0.0` hit npm `latest` with three P0s that code review missed:
|
|
91
|
+
`--help` ran the destructive body, `--help | head` threw an unhandled EPIPE,
|
|
92
|
+
and unknown commands silently rendered the dashboard. Only an out-of-band
|
|
93
|
+
real-terminal smoke caught them. This script is that smoke, baked into the
|
|
94
|
+
publish pipeline.
|
|
95
|
+
|
|
96
|
+
### Before pushing a `cli-v*` tag
|
|
97
|
+
|
|
98
|
+
Run the local pre-tag check from the repo root:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
./scripts/pre-tag-check.sh
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
It:
|
|
105
|
+
|
|
106
|
+
1. Confirms the working tree is clean.
|
|
107
|
+
2. Rebuilds the CLI from a clean `dist/`.
|
|
108
|
+
3. Runs the CLI unit test suite (`pnpm --filter @floomhq/floom test`).
|
|
109
|
+
4. Runs the full pre-publish smoke (same script the workflow runs).
|
|
110
|
+
|
|
111
|
+
If everything passes, the script prints the exact `git tag` + `git push origin`
|
|
112
|
+
commands. You then push the tag and the workflow takes over.
|
|
113
|
+
|
|
114
|
+
If anything fails, fix the issue first. Do not push the tag.
|
|
115
|
+
|
|
116
|
+
### Smoke-only workflow run
|
|
117
|
+
|
|
118
|
+
To validate the smoke script itself without publishing (e.g. after editing
|
|
119
|
+
`scripts/pre-publish-smoke.sh`):
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
GitHub → Actions → Publish @floomhq/floom → Run workflow
|
|
123
|
+
smoke_only: true
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The workflow will build, run the smoke, and stop. No `npm publish`, no
|
|
127
|
+
Homebrew dispatch.
|
|
128
|
+
|
|
129
|
+
### Manual publish (rare)
|
|
130
|
+
|
|
131
|
+
To publish without a tag (e.g. retag an existing version under a different
|
|
132
|
+
dist-tag), use `workflow_dispatch` with `smoke_only: false` and the desired
|
|
133
|
+
`tag` input. The smoke gate still runs first.
|
|
134
|
+
|
|
135
|
+
## What the pre-publish smoke checks
|
|
136
|
+
|
|
137
|
+
See `scripts/pre-publish-smoke.sh` for the full assertion list. Summary:
|
|
138
|
+
|
|
139
|
+
| Stage | Asserts |
|
|
140
|
+
|------|---------|
|
|
141
|
+
| 1 | Tarball builds, packs, installs cleanly into isolated `$HOME`; installed `floom --version` matches `package.json` |
|
|
142
|
+
| 2 | **Every** subcommand `--help` exits 0, starts with `Usage: floom`, writes no `~/.floom/auth.json`, prints no "Signed (in|out)" / "Waiting for browser" (P0 #1 from 3.0.0) |
|
|
143
|
+
| 3 | `floom --help \| head -3` and `floom push --help \| head -1` print no EPIPE / "Unhandled error event" (P0 #2 from 3.0.0) |
|
|
144
|
+
| 4 | `floom <unknown>` exits non-zero with "unknown command" + "did you mean" hint (P0 #3 from 3.0.0) |
|
|
145
|
+
| 5 | Bare `floom --help` exits 0 with grouped help |
|
|
146
|
+
| 6 | Unauth `whoami` / `account` / `logout` exit 0 idempotent; unauth `status` / `sync --json` / `push --json` exit non-zero with no stack trace |
|
|
147
|
+
| 7 | `floom logout extra-positional` is rejected with non-zero exit AND `~/.floom/auth.json` is preserved (no destructive body) |
|
|
148
|
+
| 8 | **Agent detection** picks up fake `.claude/`, `.codex/`, `.cursor/` marker dirs in the isolated `$HOME` (verified by parsing `floom doctor --json`); bare `floom sync` / `floom pull` with planted agents do not crash unauth (clean `signedIn:false` envelope). Note: fan-out *behaviour itself* requires real auth, so it is exercised at the **unit-test layer** by `src/commands/sync.fanout.test.ts`, which the publish workflow runs as a separate hard gate before the smoke. |
|
|
149
|
+
|
|
150
|
+
If any assertion fails, the publish job fails. The smoke script exits non-zero
|
|
151
|
+
on the first failure and prints a summary of every failed check.
|
|
152
|
+
|
|
153
|
+
## Files
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
packages/cli/
|
|
157
|
+
├── src/ # TypeScript source
|
|
158
|
+
│ ├── index.ts # CLI entry point (commander)
|
|
159
|
+
│ ├── commands/ # one file per subcommand
|
|
160
|
+
│ ├── lib/ # shared helpers
|
|
161
|
+
│ └── cli-smoke.test.ts # unit-level smoke (P0 lock-ins)
|
|
162
|
+
├── scripts/
|
|
163
|
+
│ ├── build-bundle.mjs # esbuild → dist/index.js
|
|
164
|
+
│ ├── verify-package.mjs # pre-pack file allowlist check
|
|
165
|
+
│ └── pre-publish-smoke.sh # E2E smoke driven against tarball
|
|
166
|
+
├── package.json
|
|
167
|
+
└── CHANGELOG.md
|
|
168
|
+
```
|