@zilfu/cli 1.0.2 → 1.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.
Files changed (4) hide show
  1. package/dist/cli.js +1738 -1646
  2. package/dist/cli.js.map +1 -1
  3. package/package.json +10 -12
  4. package/README.md +0 -61
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@zilfu/cli",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "Official command-line interface for the Zilfu API",
5
5
  "license": "MIT",
6
- "type": "module",
7
6
  "bin": {
8
7
  "zilfu": "./dist/cli.js"
9
8
  },
@@ -12,10 +11,7 @@
12
11
  "README.md",
13
12
  "LICENSE"
14
13
  ],
15
- "engines": {
16
- "node": ">=18.17"
17
- },
18
- "packageManager": "pnpm@10.30.0",
14
+ "type": "module",
19
15
  "publishConfig": {
20
16
  "access": "public"
21
17
  },
@@ -23,18 +19,20 @@
23
19
  "build": "tsup",
24
20
  "dev": "node --import tsx src/cli.ts",
25
21
  "typecheck": "tsc --noEmit",
26
- "lint": "oxlint",
27
- "prepublishOnly": "pnpm lint && pnpm typecheck && pnpm build"
22
+ "prepublishOnly": "pnpm -w lint && pnpm typecheck && pnpm build"
28
23
  },
29
24
  "dependencies": {
30
- "@zilfu/sdk": "^1.0.2",
25
+ "@zilfu/sdk": "^1.2.0",
31
26
  "citty": "^0.2.2"
32
27
  },
33
28
  "devDependencies": {
34
- "@types/node": "^22.10.0",
35
- "oxlint": "^1.61.0",
29
+ "@types/node": "^24.13.3",
36
30
  "tsup": "^8.5.0",
37
31
  "tsx": "^4.22.3",
38
32
  "typescript": "^5.9.3"
39
- }
33
+ },
34
+ "engines": {
35
+ "node": ">=24"
36
+ },
37
+ "packageManager": "pnpm@10.30.0"
40
38
  }
package/README.md DELETED
@@ -1,61 +0,0 @@
1
- # @zilfu/cli
2
-
3
- Official command-line interface for the [Zilfu](https://zilfu.app) API. A thin
4
- wrapper around [`@zilfu/sdk`](https://www.npmjs.com/package/@zilfu/sdk).
5
-
6
- ## Install
7
-
8
- ```sh
9
- npm install -g @zilfu/cli
10
- ```
11
-
12
- Requires Node.js >= 18.17.
13
-
14
- ## Authenticate
15
-
16
- ```sh
17
- zilfu login --web # authorize in the browser (recommended)
18
- zilfu login # prompts for a token (hidden input)
19
- zilfu login --token <token> # non-interactive
20
- ```
21
-
22
- `--web` opens a Zilfu consent screen in your browser, mints a token for the
23
- already-signed-in account, and hands it back to the CLI over a local loopback
24
- callback (PKCE-protected). If a browser can't be opened, the authorize URL is
25
- printed — open it on any machine that can reach the printed `127.0.0.1` port.
26
-
27
- Otherwise, create a token manually at **Settings → API tokens** and paste it.
28
- Credentials are stored at `~/.config/zilfu/config.json` (mode `600`).
29
-
30
- You can also authenticate per-invocation without `login`:
31
-
32
- ```sh
33
- export ZILFU_TOKEN=<token>
34
- zilfu spaces list
35
- # or
36
- zilfu spaces list --token <token> --base-url https://zilfu.app/api
37
- ```
38
-
39
- Token resolution precedence: `--token` flag → `ZILFU_TOKEN` → stored config.
40
-
41
- ## Commands
42
-
43
- ```sh
44
- zilfu whoami # current user
45
- zilfu health # API health (no auth required)
46
- zilfu spaces list # spaces you can access
47
- zilfu accounts list --space <id> # connected accounts in a space
48
- zilfu posts list --space <id> # posts in a space
49
- zilfu logout # remove stored credentials
50
- ```
51
-
52
- Global flags: `--token`, `--base-url`, `--json`. Pass `--json` to any command
53
- for raw, pipeable JSON output.
54
-
55
- ```sh
56
- zilfu spaces list --json | jq '.[].name'
57
- ```
58
-
59
- ## License
60
-
61
- MIT