@perpetualsystems/cli 0.4.0 → 0.4.2

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 (3) hide show
  1. package/README.md +13 -48
  2. package/index.js +342 -341
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,14 +1,12 @@
1
1
  # Perpetual CLI
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@perpetualsystems/cli.svg)](https://www.npmjs.com/package/@perpetualsystems/cli)
4
- [![license](https://img.shields.io/badge/license-TBD-blue.svg)](#license)
5
- [![CI](https://img.shields.io/badge/CI-TBD-lightgrey.svg)](#)
4
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](#license)
6
5
 
7
6
  > Drive your Perpetual deployment from a terminal, a shell pipeline, or an LLM agent — without writing curl glue.
8
7
 
9
8
  ```sh
10
- # One-line install (TBD — see Installation for current paths)
11
- curl -fsSL https://example.com/install-perpetual.sh | sh
9
+ npm install -g @perpetualsystems/cli
12
10
  ```
13
11
 
14
12
  ---
@@ -59,55 +57,23 @@ perpetual case list | jq '.data[].id'
59
57
 
60
58
  ## Installation
61
59
 
62
- ### Option 1 — Standalone binary (recommended)
63
-
64
- Download a signed binary from the releases page (TBD — link once published):
65
-
66
- ```sh
67
- # macOS / Linux
68
- curl -fsSL https://example.com/install-perpetual.sh | sh
69
-
70
- # Or pin a version
71
- curl -fsSL https://example.com/install-perpetual.sh | sh -s -- --version=0.3.15
72
- ```
73
-
74
- The macOS build is codesigned (`bun run dist:sign`).
75
-
76
- **Internal-only (for now):** while the repo is private, the public installer URL above is a placeholder. Internally, this works:
77
-
78
- ```sh
79
- TOKEN=$(gh auth token); curl -fsSL -H "Authorization: Bearer $TOKEN" \
80
- https://raw.githubusercontent.com/perpetualsystems/typescript-sdk/main/install.sh \
81
- | GITHUB_TOKEN=$TOKEN sh
82
- ```
83
-
84
- This pulls `install.sh` from the private repo using your `gh` auth token and re-exports it as `GITHUB_TOKEN` so the script can fetch the release asset behind the same credential.
85
-
86
- ### Option 2 — From the npm package
87
-
88
- Requires Bun ≥ 1.1 or Node ≥ 20:
60
+ Requires Node 22.13 or later. Install globally with any package manager:
89
61
 
90
62
  ```sh
91
- bun add -g @perpetualsystems/cli
63
+ npm install -g @perpetualsystems/cli
92
64
  # or
93
- npm i -g @perpetualsystems/cli
65
+ pnpm add -g @perpetualsystems/cli
66
+ yarn global add @perpetualsystems/cli
67
+ bun add -g @perpetualsystems/cli
94
68
  ```
95
69
 
96
- ### Option 3 — From source
70
+ Or run it without installing:
97
71
 
98
72
  ```sh
99
- git clone https://github.com/perpetual/typescript-sdk.git
100
- cd typescript-sdk/packages/cli
101
- bun install
102
- bun run dist:build # → ./perpetual-bin
103
- ./perpetual-bin --version
73
+ npx @perpetualsystems/cli --help
104
74
  ```
105
75
 
106
- For local development without a compiled binary:
107
-
108
- ```sh
109
- bun run dev -- login --endpoint=https://your-endpoint.example.com
110
- ```
76
+ To pin a version, install `@perpetualsystems/cli@<version>`. `perpetual update` upgrades with the package manager that installed it.
111
77
 
112
78
  ---
113
79
 
@@ -190,7 +156,7 @@ perpetual completion fish > ~/.config/fish/completions/perpetual.fish
190
156
  | `threat-report` | `list` / `get` — read threat reports |
191
157
  | `user` | `whoami` — show the current user |
192
158
  | `robot-docs` | `guide` — print the agent handbook (always, regardless of TTY); `manifest` — print the command tree as JSON |
193
- | `update` | Update the way perpetual was installed: re-run the release installer for an `install.sh` install, or the package manager's global install for npm, bun, pnpm or yarn (`--version <tag>`, `--dry-run`); with a private repo, run `GH_TOKEN=$(gh auth token) perpetual update` |
159
+ | `update` | Update the way perpetual was installed: re-run the release installer for an `install.sh` install, or the package manager's global install for npm, bun, pnpm or yarn (`--version <tag>`, `--dry-run`) |
194
160
  | `completion` | `<bash\|zsh\|fish>` — print a shell completion script |
195
161
 
196
162
  Top-level flags applicable to every command:
@@ -504,7 +470,6 @@ Honest list of what the CLI does **not** do yet:
504
470
 
505
471
  - **Pretty result rendering.** Query and detection results currently render as flat key/value blocks rather than rich tables for complex shapes.
506
472
  - **`--agent` override.** No way to force agent-mode output when the CLI is genuinely attached to a TTY (use `--json` instead for now).
507
- - **Auto-update.** No built-in `perpetual self-update` — users update manually via the install script or package manager.
508
473
  - **GitOps sync.** No CRUD-from-files workflow for detections/dashboards — every change is a discrete API call.
509
474
  - **Folder API.** No folder/grouping commands yet for organizing cases or detections client-side.
510
475
 
@@ -515,7 +480,7 @@ If one of these blocks you, please file an issue (see [Contributions](#about-con
515
480
  ## FAQ
516
481
 
517
482
  **Q: Do I need Node or Bun installed?**
518
- No — the standalone binary built via `bun build --compile` is self-contained. The npm package does require Bun ≥ 1.1 or Node ≥ 20.
483
+ Yes. The npm package needs Node 22.13 or later.
519
484
 
520
485
  **Q: Can I store credentials somewhere other than `~/.local/state/perpetual/`?**
521
486
  Yes. Set `XDG_STATE_HOME` for credentials and `XDG_CONFIG_HOME` for profile endpoints before running the CLI.
@@ -548,4 +513,4 @@ A top-level flag that exits early after printing `{ok, authenticated, profile, e
548
513
 
549
514
  ## License
550
515
 
551
- TBD.
516
+ MIT.