@revenexx/cli 0.1.1 → 0.2.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 +38 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/{bundle-win-arm64.mjs → cli.mjs} +31397 -5887
- package/dist/index.cjs +4 -2
- package/dist/index.js +4 -2
- package/dist/lib/command-picker.d.ts +4 -2
- package/dist/lib/command-picker.d.ts.map +1 -1
- package/dist/lib/commands/repl.d.ts.map +1 -1
- package/dist/lib/commands/services/apps.d.ts.map +1 -1
- package/dist/lib/commands/services/avatars.d.ts.map +1 -1
- package/dist/lib/commands/services/carts.d.ts.map +1 -1
- package/dist/lib/commands/services/channels.d.ts.map +1 -1
- package/dist/lib/commands/services/customers.d.ts.map +1 -1
- package/dist/lib/commands/services/forms.d.ts.map +1 -1
- package/dist/lib/commands/services/greetings.d.ts.map +1 -1
- package/dist/lib/commands/services/inventories.d.ts.map +1 -1
- package/dist/lib/commands/services/io.d.ts +3 -0
- package/dist/lib/commands/services/io.d.ts.map +1 -0
- package/dist/lib/commands/services/locale.d.ts.map +1 -1
- package/dist/lib/commands/services/markets.d.ts.map +1 -1
- package/dist/lib/commands/services/messaging.d.ts.map +1 -1
- package/dist/lib/commands/services/orderlists.d.ts.map +1 -1
- package/dist/lib/commands/services/orders.d.ts.map +1 -1
- package/dist/lib/commands/services/pages.d.ts.map +1 -1
- package/dist/lib/commands/services/payments.d.ts.map +1 -1
- package/dist/lib/commands/services/prices.d.ts.map +1 -1
- package/dist/lib/commands/services/products.d.ts.map +1 -1
- package/dist/lib/commands/services/search.d.ts.map +1 -1
- package/dist/lib/commands/services/settings.d.ts.map +1 -1
- package/dist/lib/commands/services/shipping.d.ts.map +1 -1
- package/dist/lib/commands/services/sites.d.ts.map +1 -1
- package/dist/lib/commands/services/storage.d.ts.map +1 -1
- package/dist/lib/commands/services/tokens.d.ts.map +1 -1
- package/dist/lib/commands/status.d.ts.map +1 -1
- package/dist/lib/commands/tui.d.ts +8 -0
- package/dist/lib/commands/tui.d.ts.map +1 -0
- package/dist/lib/commands/update.d.ts +10 -0
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/interactive.d.ts +46 -0
- package/dist/lib/interactive.d.ts.map +1 -1
- package/dist/lib/parser.d.ts +7 -0
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/project-config.d.ts +15 -0
- package/dist/lib/project-config.d.ts.map +1 -1
- package/dist/lib/tui/app.d.ts +17 -0
- package/dist/lib/tui/app.d.ts.map +1 -0
- package/dist/lib/tui/clipboard.d.ts +2 -0
- package/dist/lib/tui/clipboard.d.ts.map +1 -0
- package/dist/lib/tui/command-tree.d.ts +89 -0
- package/dist/lib/tui/command-tree.d.ts.map +1 -0
- package/dist/lib/tui/confirm.d.ts +6 -0
- package/dist/lib/tui/confirm.d.ts.map +1 -0
- package/dist/lib/tui/context.d.ts +16 -0
- package/dist/lib/tui/context.d.ts.map +1 -0
- package/dist/lib/tui/eggs.d.ts +22 -0
- package/dist/lib/tui/eggs.d.ts.map +1 -0
- package/dist/lib/tui/executor.d.ts +33 -0
- package/dist/lib/tui/executor.d.ts.map +1 -0
- package/dist/lib/tui/form.d.ts +43 -0
- package/dist/lib/tui/form.d.ts.map +1 -0
- package/dist/lib/tui/json-editor.d.ts +29 -0
- package/dist/lib/tui/json-editor.d.ts.map +1 -0
- package/dist/lib/tui/panel.d.ts +61 -0
- package/dist/lib/tui/panel.d.ts.map +1 -0
- package/dist/lib/tui/resource-picker.d.ts +15 -0
- package/dist/lib/tui/resource-picker.d.ts.map +1 -0
- package/dist/lib/tui/results.d.ts +90 -0
- package/dist/lib/tui/results.d.ts.map +1 -0
- package/dist/lib/tui/terminal.d.ts +5 -0
- package/dist/lib/tui/terminal.d.ts.map +1 -0
- package/dist/lib/tui/theme.d.ts +120 -0
- package/dist/lib/tui/theme.d.ts.map +1 -0
- package/dist/tests/setup.d.ts +2 -0
- package/dist/tests/setup.d.ts.map +1 -0
- package/dist/tests/theme.test.d.ts +2 -0
- package/dist/tests/theme.test.d.ts.map +1 -0
- package/dist/tests/tui.test.d.ts +2 -0
- package/dist/tests/tui.test.d.ts.map +1 -0
- package/dist/tests/update.test.d.ts +2 -0
- package/dist/tests/update.test.d.ts.map +1 -0
- package/dist/vitest.config.d.ts.map +1 -1
- package/package.json +14 -9
- package/dist/cli.cjs +0 -124680
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Once the installation is complete, you can verify the install using
|
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
30
|
$ revenexx -v
|
|
31
|
-
0.
|
|
31
|
+
0.2.0
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### Install using prebuilt binaries
|
|
@@ -62,7 +62,7 @@ $ scoop install https://raw.githubusercontent.com/revenexx-sdks/cli/master/scoop
|
|
|
62
62
|
Once the installation completes, you can verify your install using
|
|
63
63
|
```
|
|
64
64
|
$ revenexx -v
|
|
65
|
-
0.
|
|
65
|
+
0.2.0
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
## Getting Started
|
|
@@ -123,9 +123,10 @@ $ revenexx status # identity, tenant, endpoint, token expiry & gate
|
|
|
123
123
|
$ revenexx p ls # built-in aliases: same as `products list`
|
|
124
124
|
$ revenexx alias set deploy "apps create-deployment --activate true"
|
|
125
125
|
$ revenexx repl # interactive shell — many commands, one session
|
|
126
|
+
$ revenexx tui # full-screen app — browse commands, forms, results
|
|
126
127
|
```
|
|
127
128
|
|
|
128
|
-
A **production safety banner** is printed before most commands showing which tenant/endpoint you're hitting (prominent and red for production). Silence it with `-q`/`--quiet`. See [Command aliases](../README.md#command-aliases), [Production safety banner](../README.md#production-safety-banner), [`status`](../README.md#status)
|
|
129
|
+
A **production safety banner** is printed before most commands showing which tenant/endpoint you're hitting (prominent and red for production). Silence it with `-q`/`--quiet`. See [Command aliases](../README.md#command-aliases), [Production safety banner](../README.md#production-safety-banner), [`status`](../README.md#status), [Interactive shell (`repl`)](../README.md#interactive-shell-repl) and [Full-screen app (`tui`)](../README.md#full-screen-app-tui) in the README.
|
|
129
130
|
|
|
130
131
|
> ### Note
|
|
131
132
|
> By default, requests to domains with self-signed SSL certificates (or no certificates) are rejected. If you trust the host, you can bypass certificate validation using
|
|
@@ -133,6 +134,20 @@ A **production safety banner** is printed before most commands showing which ten
|
|
|
133
134
|
> $ revenexx client --self-signed true
|
|
134
135
|
> ```
|
|
135
136
|
|
|
137
|
+
## Three ways to use it
|
|
138
|
+
|
|
139
|
+
The CLI has one command tree reachable three ways — every service command, plugin, and alias behaves identically in all of them:
|
|
140
|
+
|
|
141
|
+
| Mode | How to start it | When |
|
|
142
|
+
|---|---|---|
|
|
143
|
+
| **Full-screen app** ([`tui`](#full-screen-app-tui)) | bare `revenexx` on a terminal (**the default**), or `revenexx tui` | Browse and run interactively — the default landing experience. |
|
|
144
|
+
| **Interactive shell** ([`repl`](#interactive-shell-repl)) | `revenexx repl` | Fire several commands in a row without re-typing `revenexx`. |
|
|
145
|
+
| **Direct / one-shot** | `revenexx products list --json …` | Scripting, CI, pipes — flag-driven and non-interactive. |
|
|
146
|
+
|
|
147
|
+
Running `revenexx` with no arguments on an interactive terminal launches the **full-screen app**. A partial or named invocation (`revenexx p`, `revenexx products`) still opens the guided command picker and resolves to a single one-shot command. Anything non-interactive — a pipe, CI, `--json`, or `--help` — prints help and never opens an interactive surface, so scripts stay byte-stable.
|
|
148
|
+
|
|
149
|
+
**Opting out of the TUI default:** set `REVENEXX_NO_TUI=1` (any value other than `0`/`false`) to make a bare `revenexx` fall back to the guided picker. For a per-project default, add a `defaultMode:` key to `.revenexx.yaml` — `tui` (default), `guided` (the picker), or `help` (print usage). Explicit subcommands (`repl`, `tui`, any service command) always win regardless of this setting.
|
|
150
|
+
|
|
136
151
|
## Authentication
|
|
137
152
|
|
|
138
153
|
The CLI supports two ways to authenticate:
|
|
@@ -326,6 +341,26 @@ revenexx> exit
|
|
|
326
341
|
- Missing required options **prompt interactively** just like they do outside the shell (search/select), so `p get` will ask for the product id. Ctrl-C cancels the current line without leaving the shell.
|
|
327
342
|
- The [production safety banner](#production-safety-banner) is shown before **every** command in the session (prominent and red for production) — the safeguard matters most in a rapid-fire shell. Launch with `revenexx --quiet repl` to silence it for the session.
|
|
328
343
|
|
|
344
|
+
## Full-screen app (`tui`)
|
|
345
|
+
|
|
346
|
+
`revenexx tui` — or just a bare `revenexx` on a terminal, since this is the **default landing experience** — opens a full-screen terminal app for the whole CLI: browse the command tree in a sidebar, fill in a command's parameters with a guided form, and read the results in a scrollable table — all on one screen that always shows the tenant and endpoint you're hitting. It's built on the same command tree as the rest of the CLI, so every service command, plugin, and alias is reachable, and each action maps to a plain one-shot command you can copy out and script.
|
|
347
|
+
|
|
348
|
+
```sh
|
|
349
|
+
$ revenexx # bare invocation on a TTY → launches the TUI
|
|
350
|
+
$ revenexx tui # explicit, always works
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
- Needs an interactive terminal (a TTY); in a pipe or CI it exits with a hint to use one-shot commands.
|
|
354
|
+
- Launched by default from a bare `revenexx` on a TTY. Set `REVENEXX_NO_TUI=1` or `defaultMode: guided|help` in `.revenexx.yaml` to opt out (see [Three ways to use it](#three-ways-to-use-it)); `revenexx tui` always launches it explicitly.
|
|
355
|
+
- **Browse:** `↑`/`↓` move, `Enter`/`→` open a group or run a command, `Esc`/`←` go back (`Esc` quits at the top level), `q` back/quit. Type or press `/` to filter.
|
|
356
|
+
- **Themes:** press `^t` for a live theme picker — arrow through the list to preview the whole UI instantly, `Enter` keeps it, `Esc` reverts. The choice is saved to `prefs.json` and restored next launch. Start with a specific one via `revenexx tui --theme <name>` or the `REVENEXX_THEME` env var. Built-in: `revenexx` (default), `dark`, `light`, `dracula`, `nord`, `solarized-dark`, `solarized-light`, `gruvbox`, `monokai`, `one-dark`, `matrix`. On terminals that honour it (e.g. Ghostty) the theme also sets the terminal background.
|
|
357
|
+
- **Run:** commands with required parameters open a form; destructive ones ask to confirm (`y`/`n`); the rest run immediately. The detail pane shows the equivalent one-shot command.
|
|
358
|
+
- **Forms:** `Tab`/`Shift+Tab` move between fields, `←`/`→`/`Space` cycle toggles and choices, `Enter` advances or runs, `^r` runs from any field. Values are validated on submit; secrets (password/token/api-key) are masked. Resource-id fields open the matching list as a **filterable table** — type to narrow it (server-side when the endpoint supports `search`, otherwise across the loaded rows), `↑`/`↓` to move, `Enter` to pick the highlighted record's id.
|
|
359
|
+
- **JSON body fields:** an `object` parameter (e.g. `--data`) opens a full-screen **key/value editor** — `Enter` adds a field (or appends an array item), `Tab` switches between the key and value cell, `^d` deletes the focused field, `^s` saves it back to the form. Values are entered as JSON (`"text"`, `42`, `true`) and validated live, so the request body round-trips exactly. **Nested JSON** is edited in place: a value that is an object or array shows as `{ n fields }` / `[ n items ]`, and `→` drills into it one level deeper (breadcrumb `data › meta › [0]`, any depth); `Esc` goes back up a level (and cancels at the top). Type `{}` or `[]` into a value to start a nested container.
|
|
360
|
+
- **Results:** table with `↑`/`↓` rows, `Enter` for row detail, `/` to filter the loaded rows (type to narrow across all columns, `Esc` clears), `←`/`→` to scroll columns, `n`/`p` to page, `o` to cycle output format (`table`/`json`/`jsonl`/`csv`), `y` to copy (`Y` copies the whole output), `c` to open the matching `create` form, `u` to open the matching `update` pre-filled, `d` to `delete` the record (behind the confirm modal), `e` to edit parameters. `u`/`d` act on the row under the cursor in a list, or on the single record from a `get`; `c` needs no row, so it works from an empty list too.
|
|
361
|
+
- The header carries a persistent, filled yellow `▲ PRODUCTION` chip (the same [production safety](#production-safety-banner) signal) for the whole session.
|
|
362
|
+
- Not browsable in the TUI (still available as one-shot commands): `tui`, `repl`, `update`, `generate`, `types`, `completion`.
|
|
363
|
+
|
|
329
364
|
## Global Configuration
|
|
330
365
|
|
|
331
366
|
The CLI stores its state in `~/.revenexx/prefs.json`. It holds one entry per signed-in **session**, keyed by a generated session ID, plus a top-level `current` that points at the active one. You don't normally edit this by hand — it's written by `login`, `logout`, `tenants use`, and `client`.
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;AA4DvB,OAAO,gCAAgC,CAAC"}
|