@jelou/cli 1.5.3 → 1.5.5

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.
Files changed (2) hide show
  1. package/README.md +51 -321
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,358 +1,88 @@
1
1
  # @jelou/cli
2
2
 
3
- Command-line tool for the [Jelou](https://jelou.ai) platform manage serverless
4
- functions, brains (AI projects), channels, WhatsApp bots and campaigns,
5
- marketplace apps, organization secrets, and Datum databases from one CLI.
6
-
7
- Built for humans and AI coding agents alike: every command supports `--json`
8
- output, `--describe` introspection, and `--no-input` for CI. Agent skills
9
- auto-install into Claude Code, Cursor, Codex, and Windsurf on login so AI
10
- editors can drive the CLI from natural language.
11
-
12
- Products covered:
13
-
14
- - **Functions** — serverless TypeScript on Deno Subhosting (`define()` / `app()`
15
- SDK)
16
- - **Brains** — AI projects with knowledge files
17
- - **Channels** — connect brains to Web, WhatsApp, or other surfaces
18
- - **WhatsApp** — bots, HSM templates, bulk campaigns
19
- - **Datum** — managed PocketBase databases
20
- - **Marketplace** — browse and install platform apps
21
- - **Secrets** — organization-level secrets
3
+ Build AI agents on the [Jelou](https://jelou.ai) platform from your terminal —
4
+ or just ask your AI editor. Agent skills auto-install into Claude Code, Cursor,
5
+ Codex, and Windsurf on `jelou login`.
22
6
 
23
7
  ## Install
24
8
 
25
- > v1.0.0 has not been published yet. The `@jelou/cli@0.2.13` currently on npm is
26
- > the older Functions-only CLI and does not match the commands documented below.
27
- > Until v1.0.0 ships, install from source:
28
-
29
9
  ```bash
30
- git clone https://github.com/JelouLatam/jelou-cli.git
31
- cd jelou-cli
32
- deno install -A -f -n jelou --global ./mod.ts
10
+ npm install -g @jelou/cli
33
11
  ```
34
12
 
35
- Verify the installation:
36
-
37
- ```bash
38
- jelou --version
39
- ```
13
+ Verify with `jelou --version`.
40
14
 
41
- npm, JSR, and platform binaries (Linux x64/arm64, macOS x64/arm64, Windows x64)
42
- land with the v1.0.0 release.
15
+ ## Sign up
43
16
 
44
- ### Local development build (`jelou-dev`)
17
+ Don't have a Jelou account yet?
18
+ [Create one free](https://apps.jelou.ai/signup?plan=brain-free&source=cli_readme&lang=en&step=provider)
19
+ — takes a minute.
45
20
 
46
- When hacking on the CLI, you usually want a binary on PATH that's separate from
47
- the released `jelou` so the two don't fight over the same skills dir or muscle
48
- memory:
21
+ ## Quickstart
49
22
 
50
23
  ```bash
51
- deno task bundle # compile the current platform binary → dist/jelou-dev
52
- deno task link # symlink ~/.local/bin/jelou-dev → dist/jelou-dev
53
- deno task unlink # remove the symlink (only if it points at this repo)
24
+ jelou login # authenticate; agent skills auto-install
25
+ mkdir my-fn && cd my-fn
26
+ jelou functions init # scaffold a function
27
+ jelou functions dev # local dev server with hot reload
28
+ jelou functions deploy # ship to production
54
29
  ```
55
30
 
56
- After `deno task link`, run the dev binary as `jelou-dev` (which is what your
57
- shell history and any agent scripts will see, so a slip-up calling the released
58
- `jelou` is obvious).
59
-
60
- The dev binary skips skill auto-install on `jelou-dev login` so it doesn't
61
- silently overwrite the released CLI's skills. To install dev skills for testing,
62
- run `jelou-dev agent install --global` explicitly — the rendered `SKILL.md`
63
- files get a banner and rewrite every bare `jelou` to `jelou-dev` in the body so
64
- AI agents drive the dev binary you're testing.
65
-
66
- Pick a different link target with `JELOU_DEV_LINK_DIR=/some/path`, or pass
67
- `--force` to overwrite an existing symlink that points elsewhere.
68
-
69
- ## Quick Start
70
-
71
- ```bash
72
- # Authenticate
73
- jelou login
74
-
75
- # Create a new function
76
- mkdir my-function && cd my-function
77
- jelou functions init
78
-
79
- # Start local dev server with hot reload
80
- jelou functions dev
81
- # → http://localhost:3000
31
+ ## What you can do
82
32
 
83
- # Deploy to production
84
- jelou functions deploy
85
- # https://my-function.fn.jelou.ai
86
- ```
87
-
88
- ## Agent Setup
33
+ - **Build workflows** — create and ship Brain skills end-to-end
34
+ - **Build functions** — serverless functions integrated into the Jelou ecosystem
35
+ - **Connect channels** — wire brains to Web Widget, WhatsApp, Facebook,
36
+ Instagram
37
+ - **Manage WhatsApp** — bots, HSM templates, and bulk campaigns
38
+ - **Manage databases** — provision and operate Jelou-managed databases
39
+ - **Browse the marketplace** — connect 3,000+ integrations including payments
40
+ and KYC
41
+ - **Manage secrets** — organization-level environment variables
89
42
 
90
- `jelou` ships with agent skills for Claude Code, Cursor, Codex, and other AI
91
- editors. After logging in, they auto-install into any detected editor so a fresh
92
- session knows how to drive the CLI from natural language:
43
+ Run `jelou --help` for the full command tree.
93
44
 
94
- ```bash
95
- deno install -A -f -n jelou --global jsr:@jelou/cli
96
- jelou login # skills auto-install for detected editors
97
- ```
45
+ ## Use it from your AI editor
98
46
 
99
- Open a new session in your editor and ask something like _"create a brain in
100
- jelou"_, _"list my databases"_, _"send a WhatsApp campaign"_, or _"list my
101
- channels"_ — the right `jelou` command gets invoked for you.
47
+ `jelou` ships agent skills that auto-install on `jelou login`. Open a fresh
48
+ session in Claude Code, Cursor, Codex, or Windsurf and just ask:
102
49
 
103
- The CLI ships with these skills:
50
+ > "Build a customer support workflow"
51
+ >
52
+ > "Deploy a function that handles Stripe webhooks"
53
+ >
54
+ > "Send a WhatsApp campaign to my Black Friday list"
55
+ >
56
+ > "Provision a database for analytics"
57
+ >
58
+ > "Install the Stripe integration"
104
59
 
105
- | Skill | Covers |
106
- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
107
- | `jelou` | Install, login, profiles, JSON mode, `--describe`, troubleshooting |
108
- | `jelou-functions` | `functions init / dev / deploy / logs / rollback / list / info / create / delete / secrets / tokens / cron / deployments` |
109
- | `jelou-datum` | `datum databases / collections / api-keys / triggers / plans` |
110
- | `jelou-brain` | `brain list / show / create / update / delete / knowledge`, plus `channel list / create / connect / disconnect` (channels are brain wiring) |
111
- | `jelou-whatsapp` | `bot list`, `template list / show / create / update / delete / upload-media`, `campaign list / show / create / cancel / reschedule` |
112
- | `jelou-marketplace` | `marketplace list / install / installed` |
113
- | `jelou-secret` | `secret list / set / delete` (organization secrets) |
114
- | `jelou-build-workflow` | BrainOps build flow: discover, pull, edit, mint ids, validate, and push one draft workflow |
115
- | `jelou-qa-workflow` | BrainOps QA flow: run tester-chat turns, inspect traces, produce verdicts, reports, and fix hints |
60
+ The matching `jelou` command runs for you — agents pick the right flags from
61
+ context.
116
62
 
117
- Manage skills manually any time:
63
+ Manage skills any time:
118
64
 
119
65
  ```bash
120
- jelou agent install # interactive wizard for humans
121
- jelou agent install --global # all skills, detected agents only
122
- jelou agent install --global --all-targets # all skills, every supported agent (including those not yet installed locally)
123
- jelou agent install --global --targets codex # install for one or more agents
124
- jelou agent install --global --only datum # just one product
125
- jelou agent install --global --only brain,whatsapp # multiple
126
- jelou agent install --global --only build-workflow,qa-workflow # BrainOps only
127
- jelou agent install --global --api # Functions API variant
128
- jelou agent install --global --targets codex --yes --no-input # CI-friendly
66
+ jelou agent install # interactive wizard
129
67
  ```
130
68
 
131
- In a human terminal, `agent install` opens a short wizard for target agents,
132
- scope, install method, and final confirmation. In CI, JSON mode, agent mode, or
133
- piped stdout it never prompts; pass `--targets`, `--all-targets`, `--global`,
134
- `--method copy`, and `--yes` to make the intended install explicit.
135
-
136
- `--all-targets` is useful when an agent is installed _after_ `jelou login` — or
137
- when you're about to install one and want the skills already in place. Cursor
138
- specifically gets a copy (not a symlink) because its skill loader doesn't accept
139
- YAML frontmatter; the SKILL.md is rewritten to an H1 + `**Description:**` shape
140
- that Cursor reads.
141
-
142
- Opt out of auto-install during login with `jelou login --skip-skills`.
143
-
144
- ## Commands
145
-
146
- | Group | Command | Description |
147
- | ----------------- | -------------------------------------------- | ---------------------------------------------- |
148
- | **Auth** | `jelou login` | Authenticate with your access token |
149
- | | `jelou logout` | Remove stored credentials |
150
- | | `jelou whoami` | Show current identity and scopes |
151
- | | `jelou auth list` | List saved profiles |
152
- | | `jelou auth switch` | Switch active profile |
153
- | | `jelou auth remove` | Remove a saved profile |
154
- | **Workflow** | `jelou functions init` | Scaffold a new function project |
155
- | | `jelou functions dev` | Local dev server with hot reload |
156
- | | `jelou functions deploy` | Deploy to production |
157
- | | `jelou functions rollback` | Roll back to a previous deployment |
158
- | | `jelou functions logs` | Stream or fetch function logs |
159
- | **Manage** | `jelou functions deployments` | List, inspect, download deployments |
160
- | | `jelou functions` | List, create, delete functions |
161
- | | `jelou functions secrets` | Manage environment secrets |
162
- | | `jelou functions tokens` | Manage access tokens |
163
- | | `jelou functions cron` | View cron schedules |
164
- | **Brain** | `jelou brain list` | List all brains |
165
- | | `jelou brain show` | View brain details |
166
- | | `jelou brain create` | Create brain (full setup) |
167
- | | `jelou brain update` | Update brain name/description |
168
- | | `jelou brain delete` | Delete a brain |
169
- | | `jelou brain knowledge list` | List knowledge files |
170
- | | `jelou brain knowledge upload` | Upload a file (max 2MB) |
171
- | | `jelou brain knowledge delete` | Remove a knowledge file |
172
- | **WhatsApp** | `jelou bot list` | List WhatsApp bots for the company |
173
- | | `jelou template list` | List HSM templates for a bot |
174
- | | `jelou template get <id>` | Show an HSM template by id |
175
- | | `jelou template create` | Create a new HSM template |
176
- | | `jelou template update <id>` | Update a template (APPROVED/REJECTED only) |
177
- | | `jelou template delete <id>` | Delete a template |
178
- | | `jelou template upload-media <f>` | Upload media and get a CDN URL |
179
- | **Datum** | `jelou datum databases list` | List all databases |
180
- | | `jelou datum databases create` | Create a new database |
181
- | | `jelou datum databases show <id>` | Show database details |
182
- | | `jelou datum databases update <id>` | Update a database |
183
- | | `jelou datum databases delete <id>` | Delete a database |
184
- | | `jelou datum api-keys list <db>` | List API keys for a database |
185
- | | `jelou datum api-keys create <db>` | Create an API key |
186
- | | `jelou datum api-keys delete` | Delete an API key |
187
- | | `jelou datum api-keys regenerate` | Regenerate an API key |
188
- | | `jelou datum triggers list <db>` | List triggers for a database |
189
- | | `jelou datum triggers create <db>` | Create a trigger |
190
- | | `jelou datum triggers show` | Show trigger details |
191
- | | `jelou datum triggers update` | Update a trigger |
192
- | | `jelou datum triggers delete` | Delete a trigger |
193
- | | `jelou datum triggers pause` | Pause a trigger |
194
- | | `jelou datum triggers resume` | Resume a trigger |
195
- | | `jelou datum plans list` | List available plans |
196
- | **Marketplace** | `jelou marketplace list` | Browse available apps |
197
- | | `jelou marketplace install <slug>` | Install an app (OAuth flow) |
198
- | | `jelou marketplace installed` | List installed apps |
199
- | **Secrets** | `jelou secret list` | List organization secrets |
200
- | | `jelou secret set <NAME>` | Set or update a secret |
201
- | | `jelou secret delete <NAME>` | Delete a secret |
202
- | **Channels** | `jelou channel list --brain <id>` | List channels for a brain |
203
- | | `jelou channel create --brain <id>` | Create a channel |
204
- | | `jelou channel connect <id> --brain <id>` | Connect to bot/agent |
205
- | | `jelou channel disconnect <id> --brain <id>` | Disconnect channel |
206
- | **Setup** | `jelou agent install` | Install Jelou skills into AI coding agents |
207
- | **Campaigns** | `jelou campaign list` | List bulk WhatsApp campaigns |
208
- | | `jelou campaign get <id>` | Show a campaign by id |
209
- | | `jelou campaign create` | Create a bulk campaign from config + CSV |
210
- | | `jelou campaign cancel <id>` | Cancel a scheduled or in-progress campaign |
211
- | | `jelou campaign reschedule <id>` | Reschedule a campaign to a new time |
212
- | **Workflow sync** | `jelou link` | Bind a directory to a brain |
213
- | | `jelou pull` | Fetch all workflows for the linked brain |
214
- | | `jelou status` | Local-vs-lockfile diff (with incoming overlay) |
215
- | | `jelou push` | Send dirty workflows back to the brain |
216
- | | `jelou incoming list` | List unresolved incoming artifacts |
217
- | | `jelou incoming diff` | Show local-vs-server diff for an artifact |
218
- | | `jelou incoming accept-server` | Adopt fresh server (re-fetched), drop local |
219
- | | `jelou incoming accept-local` | Push local with force-with-lease CAS check |
220
- | | `jelou incoming mark-resolved` | Clear an artifact without applying either |
221
-
222
- Run `jelou <command> --help` for flags and usage details.
223
-
224
- ### Reconciliation
225
-
226
- When `jelou pull` detects that your local workflow file diverged from the
227
- lockfile AND the remote moved, it preserves the server snapshot under
228
- `.jelou/incoming/<organization>/<brain>/<workflowId>.<channel>.incoming.json`
229
- (plus a sidecar `.meta.json`) — your local file is untouched. Pull exits 7,
230
- `jelou status` flags the row as `incoming_pending` and exits 9, and `jelou
231
- push`
232
- refuses to write to that workflow with `UNRESOLVED_INCOMING` until the artifact
233
- is gone.
234
-
235
- Three resolution paths via `jelou incoming`:
236
-
237
- | Subcommand | Semantics |
238
- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
239
- | `accept-server` | Re-fetch fresh server, overwrite local, refresh lockfile, delete artifact. Always uses latest server (does NOT blindly apply the stored snapshot). Local edits lost. |
240
- | `accept-local` | `git push --force-with-lease`: re-fetch server, refuse with `NEW_REMOTE_DRIFT` if it moved past the recorded snapshot; on match, push local + delete artifact. On push failure, exit `PUSH_FAILED`, keep artifact. |
241
- | `mark-resolved` | Just delete the artifact + meta. For when you've manually merged or want to re-pull from scratch. |
242
-
243
- If more than one workflow has an unresolved artifact, the action subcommands
244
- require `--workflow <id>` (and optionally `--channel <CHANNEL>`) — they refuse
245
- with `AMBIGUOUS_TARGET` rather than guessing.
246
-
247
69
  ## Profiles
248
70
 
249
- Multiple accounts (or environments) can coexist as named profiles. No more
250
- logging in and out when switching between staging and production.
251
-
252
- ```bash
253
- # First login creates a profile (you pick the name)
254
- jelou login
255
- # → Profile name: production
256
-
257
- # Add a second account
258
- jelou login --token <staging-token> --profile staging
259
-
260
- # List profiles
261
- jelou auth list
262
- # Profile Identity Type Active
263
- # production token "prod" PAT ✓
264
- # staging jelou:42 API Key
265
-
266
- # Switch active profile
267
- jelou auth switch staging
268
-
269
- # One-shot override (does not change active profile)
270
- jelou functions deploy --profile production
271
-
272
- # Remove a profile
273
- jelou auth remove staging
274
- ```
275
-
276
- ### Credential Resolution
277
-
278
- When resolving which credentials to use, the CLI checks (highest priority
279
- first):
280
-
281
- 1. `JELOU_TOKEN` environment variable
282
- 2. `--profile <name>` flag (one-shot, does not persist)
283
- 3. `JELOU_PROFILE` environment variable
284
- 4. `activeProfile` in `~/.jelou/credentials.json`
285
-
286
- ### Migration from Single-Account
287
-
288
- Existing `~/.jelou/credentials.json` files are automatically migrated to the
289
- multi-profile format on first access. A `.bak` backup is created. No action
290
- required.
291
-
292
- ## CI / Non-Interactive Mode
293
-
294
- Every command works headlessly in CI pipelines.
71
+ Switch between accounts and environments without re-logging in.
295
72
 
296
73
  ```bash
297
- export JELOU_TOKEN=sk_your_token_here
298
-
299
- jelou functions deploy --no-confirm --json | jq '.data.url'
74
+ jelou login # interactive — creates a profile
75
+ jelou login --profile staging # add another profile
76
+ jelou auth list # show profiles
77
+ jelou auth switch staging # change active profile
78
+ jelou functions deploy --profile production # one-shot override
300
79
  ```
301
80
 
302
- - `--no-input` disables all prompts (auto-detected when `CI=true` or stdin is
303
- not a TTY)
304
- - `--json` outputs `{ "ok": true, "data": ... }` to stdout
305
-
306
- ### Composite mode (`--agent`)
307
-
308
- For AI coding agents and automation that want one switch instead of three, the
309
- `--agent` flag flips a coherent set of "machine consumer" defaults. It implies
310
- `--json --no-input --compact` and sets `NO_COLOR=1`, `JELOU_NO_INPUT=1`,
311
- `JELOU_NO_SPINNERS=1` for downstream child processes. Explicit per-component env
312
- vars override the composite — set `NO_COLOR=0` to opt back in to a single
313
- dimension while keeping the rest of the agent profile.
314
-
315
- | Env var | When `--agent` is set | When unset |
316
- | ------------------- | --------------------- | ------------- |
317
- | `JELOU_NO_INPUT` | implies `1` | default unset |
318
- | `NO_COLOR` | implies `1` | default unset |
319
- | `JELOU_NO_SPINNERS` | implies `1` | default unset |
320
-
321
- Composite mode is **output behavior only** — it never bypasses safety nets.
322
- `.jelou/incoming/` preservation, `UNRESOLVED_INCOMING` push refusal, validation,
323
- and dirty-state checks always run regardless of the mode flag. See
324
- `docs/best-practices/mode-flags-vs-safety.md` for the full policy.
325
-
326
- > **Note:** Earlier versions accepted a `JELOU_CLI_MODE=agent` env var as an
327
- > alternate entry point. That surface was removed; use the `--agent` flag (or
328
- > `alias jelou='jelou --agent'` in your shell) for the same effect.
329
-
330
- See the [full CI reference](../../docs/cli.md#ci--non-interactive-mode) for
331
- per-command flags and GitHub Actions examples.
332
-
333
- ## Configuration
334
-
335
- | Source | Purpose |
336
- | --------------- | --------------------------------------------------- |
337
- | `jelou.json` | Project config (function slug, entrypoint) |
338
- | `~/.jelou/` | User credentials (multi-profile) and API URL |
339
- | `JELOU_TOKEN` | Access token (highest priority, overrides profiles) |
340
- | `JELOU_PROFILE` | Select a named profile without `--profile` flag |
341
- | `JELOU_API_URL` | API base URL override |
342
-
343
- See the
344
- [full configuration reference](../../docs/cli.md#configuration-reference) for
345
- details.
346
-
347
81
  ## Documentation
348
82
 
349
- - [CLI Reference](../../docs/cli.md) — full command docs, flags, CI usage,
350
- troubleshooting
351
- - [SDK Guide](../../docs/functions.md) — `define()` API, context, validation,
352
- testing
83
+ - [docs.jelou.ai](https://docs.jelou.ai) — full reference, guides, and tutorials
84
+ - [jelou.ai](https://jelou.ai) — Jelou platform
353
85
 
354
86
  ## License
355
87
 
356
- Copyright 2026 Jelou Inc. All rights reserved.
357
-
358
- See [LICENSE](./LICENSE) for details.
88
+ Copyright 2026 Jelou Inc. All rights reserved. See [LICENSE](./LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jelou/cli",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "Jelou CLI — manage functions, brains, channels, and more",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -17,11 +17,11 @@
17
17
  "LICENSE"
18
18
  ],
19
19
  "optionalDependencies": {
20
- "@jelou/cli-darwin-arm64": "1.5.3",
21
- "@jelou/cli-darwin-x64": "1.5.3",
22
- "@jelou/cli-linux-x64": "1.5.3",
23
- "@jelou/cli-linux-arm64": "1.5.3",
24
- "@jelou/cli-win32-x64": "1.5.3"
20
+ "@jelou/cli-darwin-arm64": "1.5.5",
21
+ "@jelou/cli-darwin-x64": "1.5.5",
22
+ "@jelou/cli-linux-x64": "1.5.5",
23
+ "@jelou/cli-linux-arm64": "1.5.5",
24
+ "@jelou/cli-win32-x64": "1.5.5"
25
25
  },
26
26
  "keywords": [
27
27
  "jelou",