@victor-software-house/exa-cli 0.0.1 → 0.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Add `exa auth login`, `status`, and `logout`. Interactive commands now resolve the API key from macOS Keychain, Linux Secret Service, or Windows Credential Manager after `--api-key` and `EXA_API_KEY`. Storing a key needs no external tool on any platform; on Linux a running Secret Service provider is still required. When secure storage is unavailable, `login` fails closed unless given `--insecure-storage`, which writes an atomic `0600` file instead ([`d83d3c6`](https://github.com/victor-software-house/exa-cli/commit/d83d3c6cb9ea1b7325cb8bb6e79b0456bf765f59)).
8
+
9
+ ## 0.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Apply the documented dynamic Context token default and accept its observed cost response shape ([`83dd937`](https://github.com/victor-software-house/exa-cli/commit/83dd9375ad85618adfdd5ec8ac04a1da05773113)).
14
+
15
+ - Redesign generated help with concise command menus, focused errors, practical examples, and nested `agent` commands ([`2b9b5bf`](https://github.com/victor-software-house/exa-cli/commit/2b9b5bfa0efe04bd4b8152573b137b604f0f65c1)).
16
+
3
17
  ## 0.0.1
4
18
 
5
19
  ### Patch Changes
package/README.md CHANGED
@@ -33,11 +33,25 @@ bun src/cli.ts --help
33
33
 
34
34
  The binary name is `exa`. That can collide with the old `exa` / `eza` ls replacement.
35
35
 
36
+ On Alpine and other musl distributions, the binary needs `libstdc++` (`apk add libstdc++`), which every Bun-compiled musl binary links dynamically.
37
+
36
38
  ## Auth
37
39
 
38
- Set `EXA_API_KEY`, or pass `--api-key`. There is no interactive login.
40
+ For interactive use, store the key in the operating system credential store:
41
+
42
+ ```bash
43
+ exa auth login
44
+ exa auth status
45
+ exa auth logout
46
+ ```
47
+
48
+ `auth login` reads from a hidden prompt on a terminal or from stdin when piped. It uses macOS Keychain, Linux Secret Service, and Windows Credential Manager. If secure storage is unavailable, it fails closed. `--insecure-storage` explicitly permits a plaintext fallback at `$XDG_CONFIG_HOME/exa-cli/credentials.json` or `~/.config/exa-cli/credentials.json`, created with mode `0600`.
49
+
50
+ For automation, set `EXA_API_KEY`. Resolution order is `--api-key`, `EXA_API_KEY`, then the stored credential. Passing a key in `--api-key` can expose it through the process list, so prefer the environment or `exa auth login`.
51
+
52
+ No external command or library is required: the credential store is reached through a linked addon. Linux still needs a D-Bus session with a Secret Service provider such as gnome-keyring, so headless and CI environments should use `EXA_API_KEY`.
39
53
 
40
- Operator checkouts with the global fnox profile `exa` get the key from mise (`mise.dev.toml` / `mise -E test`). Contributors can export the variable themselves.
54
+ Operator checkouts with the global fnox profile `exa` get `EXA_API_KEY` from mise (`mise.dev.toml` / `mise -E test`).
41
55
 
42
56
  ## Commands
43
57
 
@@ -47,11 +61,12 @@ exa contents https://exa.ai/docs/reference/search.md
47
61
  exa answer "when did Exa ship the context endpoint"
48
62
  exa similar https://exa.ai/docs/reference/search.md
49
63
  exa context "how to use React hooks for state management" --tokens-num 500
50
- exa agent-create "narrow research question"
51
- exa agent-create "narrow research question" --wait --timeout 600
52
- exa agent-get agent_run_…
53
- exa agent-wait agent_run_… --timeout 600
54
- exa agent-cancel agent_run_…
64
+ exa agent create "narrow research question"
65
+ exa agent create "narrow research question" --wait --timeout 600
66
+ exa agent get agent_run_…
67
+ exa agent wait agent_run_… --timeout 600
68
+ exa agent cancel agent_run_…
69
+ exa auth status
55
70
  exa doctor
56
71
  exa cache path|clear|prune
57
72
  ```
@@ -83,7 +98,7 @@ Every uncached call spends Exa credits. Identical requests within the TTL are se
83
98
  - `--refresh` skips the read and overwrites the entry. Use only when staleness provably matters.
84
99
  - `--no-cache` skips reads and writes.
85
100
  - `exa cache prune` deletes expired entries; `exa cache clear` deletes all; `exa cache path` prints the database location.
86
- - `agent-create`, `agent-get`, `agent-wait`, and `agent-cancel` never cache: create and cancel mutate, get and wait poll.
101
+ - `agent create`, `agent get`, `agent wait`, and `agent cancel` never cache: create and cancel mutate, get and wait poll.
87
102
 
88
103
  Do not repeat an identical call in a loop — the first response is already stored.
89
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@victor-software-house/exa-cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Agent-friendly CLI for the Exa API with a local SQLite request cache.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -34,11 +34,11 @@
34
34
  "optique"
35
35
  ],
36
36
  "optionalDependencies": {
37
- "@victor-software-house/exa-cli-darwin-arm64": "0.0.1",
38
- "@victor-software-house/exa-cli-darwin-x64": "0.0.1",
39
- "@victor-software-house/exa-cli-linux-x64": "0.0.1",
40
- "@victor-software-house/exa-cli-linux-arm64": "0.0.1",
41
- "@victor-software-house/exa-cli-linux-x64-musl": "0.0.1",
42
- "@victor-software-house/exa-cli-windows-x64": "0.0.1"
37
+ "@victor-software-house/exa-cli-darwin-arm64": "0.0.3",
38
+ "@victor-software-house/exa-cli-darwin-x64": "0.0.3",
39
+ "@victor-software-house/exa-cli-linux-x64": "0.0.3",
40
+ "@victor-software-house/exa-cli-linux-arm64": "0.0.3",
41
+ "@victor-software-house/exa-cli-linux-x64-musl": "0.0.3",
42
+ "@victor-software-house/exa-cli-windows-x64": "0.0.3"
43
43
  }
44
44
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: exa
3
- description: Use the Exa CLI for live web search, known-page contents, and cited answers. Use when a question needs current web evidence and GitHub source is not already a clone or submodule. Prefer this CLI over ad-hoc HTTP.
3
+ description: Use the Exa CLI for current web evidence, known-page retrieval, cited answers, coding context, or asynchronous Exa Agent research. Prefer it over ad-hoc HTTP; use GitHub tooling or an existing clone or submodule for GitHub implementation truth.
4
4
  ---
5
5
 
6
6
  # Exa CLI
@@ -11,7 +11,7 @@ Install the GitHub Release binary with mise (`"github:victor-software-house/exa-
11
11
  npx skills add victor-software-house/exa-cli
12
12
  ```
13
13
 
14
- Auth is `EXA_API_KEY` or `--api-key`. Do not print the key.
14
+ For interactive use, run `exa auth login`; it stores the key in the OS credential store. For automation, use `EXA_API_KEY`. `--api-key` has highest precedence but can expose the key through the process list. Never print the key.
15
15
 
16
16
  ## Cost discipline
17
17
 
@@ -20,7 +20,7 @@ Every uncached call spends Exa credits. The local SQLite cache makes identical r
20
20
  - Never re-issue an identical request; the response is already cached.
21
21
  - `--refresh` only when a cached answer is provably stale.
22
22
  - `--no-cache` almost never.
23
- - Agent commands (`agent-create`, `agent-get`, `agent-wait`, `agent-cancel`) are never cached and every call is paid.
23
+ - Agent commands (`agent create`, `agent get`, `agent wait`, `agent cancel`) are never cached.
24
24
  - Housekeeping: `exa cache path`, `exa cache prune` (expired entries), `exa cache clear`.
25
25
 
26
26
  The cache key includes a digest of the API key, so switching accounts never serves another account's responses.
@@ -54,14 +54,14 @@ exa similar https://exa.ai/docs/reference/search.md --json
54
54
  exa context "how to use React hooks for state management" --tokens-num 500 --json
55
55
  ```
56
56
 
57
- Agent runs (create is not cached; block with `--wait` or `agent-wait` instead of a manual poll loop):
57
+ Agent runs (create is not cached; block with `--wait` or `agent wait` instead of a manual poll loop):
58
58
 
59
59
  ```bash
60
- exa agent-create "narrow research question" --json
61
- exa agent-create "narrow research question" --wait --timeout 600 --json
62
- exa agent-get agent_run_… --json
63
- exa agent-wait agent_run_… --timeout 600 --json
64
- exa agent-cancel agent_run_… --json
60
+ exa agent create "narrow research question" --json
61
+ exa agent create "narrow research question" --wait --timeout 600 --json
62
+ exa agent get agent_run_… --json
63
+ exa agent wait agent_run_… --timeout 600 --json
64
+ exa agent cancel agent_run_… --json
65
65
  ```
66
66
 
67
67
  Raw body is JSON text for that command's generated Hey API schema. Optique parses it; do not pass a file path:
@@ -72,4 +72,4 @@ exa search --request '{"query":"Exa search type auto","contents":{"highlights":t
72
72
 
73
73
  Do not treat snippets, citations, or generated answers as proof. Read the cited URL before making a factual claim.
74
74
 
75
- `/context` is `exa context`. Agent runs are `exa agent-create`, `exa agent-get`, `exa agent-wait`, and `exa agent-cancel`. GitHub implementation truth still stays `gh` or a pinned submodule.
75
+ `/context` is `exa context`. Agent runs are `exa agent create`, `exa agent get`, `exa agent wait`, and `exa agent cancel`. GitHub implementation truth still stays `gh` or a pinned submodule.