@k-leumas/queque-cli 0.8.0 → 0.8.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.
- package/README.md +32 -152
- package/dist/cli/app.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,113 +1,45 @@
|
|
|
1
1
|
# QueQue — copy-pasting shell commands is dead
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
#### Copy-pasting commands from the browser is dead.
|
|
9
|
-
|
|
10
|
-
Welcome to the **future** –
|
|
11
|
-
`
|
|
12
|
-
brew install k-leumas/tap/queque
|
|
13
|
-
`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-

|
|
17
|
-
|
|
18
|
-
> [!NOTE]
|
|
19
|
-
> After install, run `qq init zsh && source ~/.zshrc` to wire up the `??` keybinding. `qq init zsh` adds the QueQue source line to the end of `~/.zshrc` itself, so do not redirect its output into the file.
|
|
3
|
+
[](https://github.com/k-leumas/queque/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/k-leumas/queque/actions/workflows/nightly.yml)
|
|
5
|
+
[](https://github.com/k-leumas/queque/actions/workflows/release.yaml)
|
|
20
6
|
|
|
7
|
+
[](https://github.com/k-leumas/queque/actions/workflows/ci.yml)
|
|
8
|
+
[](https://github.com/k-leumas/queque/actions/workflows/ci.yml)
|
|
9
|
+
[](https://github.com/k-leumas/queque/actions/workflows/ci.yml)
|
|
10
|
+
[](https://github.com/k-leumas/queque/actions/workflows/ci.yml)
|
|
11
|
+
[](https://github.com/k-leumas/queque/actions/workflows/ci.yml)
|
|
12
|
+
[](https://github.com/k-leumas/queque/actions/workflows/ci.yml)
|
|
21
13
|
|
|
22
|
-
|
|
23
|
-
<summary>Install via npm</summary>
|
|
14
|
+
**Before:** Google it → copy → paste → tweak → pray.
|
|
24
15
|
|
|
25
|
-
|
|
16
|
+
**Now:** Type your intent, hit `??`, pick a command — it lands in your buffer, ready to tweak and run.
|
|
26
17
|
|
|
27
|
-
-
|
|
28
|
-
- Node.js 24 or newer
|
|
29
|
-
- [jq](https://jqlang.github.io/jq/)
|
|
30
|
-
- Claude Code signed in, an Anthropic API key, an OpenAI API key, or Ollama (see [Choose a provider](#choose-a-provider))
|
|
18
|
+

|
|
31
19
|
|
|
20
|
+
## Install
|
|
32
21
|
|
|
33
22
|
```shell
|
|
34
|
-
|
|
23
|
+
brew install k-leumas/tap/queque
|
|
35
24
|
qq init zsh && source ~/.zshrc
|
|
36
25
|
```
|
|
37
26
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Choose a provider
|
|
27
|
+
`qq init zsh` wires up the `??` keybinding and adds the QueQue source line to the end of `~/.zshrc` itself, so do not redirect its output into the file.
|
|
41
28
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Claude (default)
|
|
45
|
-
|
|
46
|
-
QueQue talks to Claude in one of two ways. You only need one.
|
|
47
|
-
|
|
48
|
-
**Claude Code login (no API key needed).** If you already use Claude Code, QueQue runs `claude -p` on your existing login whenever no API key is set. Sign in once through Claude Code's `/login`:
|
|
29
|
+
Or with npm (needs zsh, Node.js 24 or newer and jq):
|
|
49
30
|
|
|
50
31
|
```shell
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
On this route QueQue uses whatever account and default model Claude Code is set to; it passes no model flag. `claude -p` runs with its tools disabled and session persistence off, so it only answers the query. If `claude` is not signed in, `??` shows this message and puts back what you typed:
|
|
55
|
-
|
|
56
|
-
```text
|
|
57
|
-
QueQue: Claude is not authenticated. Run `claude /login`, or set ANTHROPIC_API_KEY in the environment or ~/.env.local. To use OpenAI or Ollama instead, run `qq init provider`.
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
If `claude` is not on your `PATH` at all, the message starts with `QueQue: No AI provider is ready.` and lists the same three options. Any other `claude -p` failure, such as an overloaded API or a usage limit, shows `QueQue: Claude Code could not answer (claude -p failed).`; run `claude -p "hi"` to see the underlying error.
|
|
61
|
-
|
|
62
|
-
**Anthropic API key.** QueQue looks for `ANTHROPIC_API_KEY` in this order:
|
|
63
|
-
|
|
64
|
-
1. **Environment variable**: `export ANTHROPIC_API_KEY="sk-ant-..."` in `~/.zshrc`, above the QueQue source line.
|
|
65
|
-
2. **`.env.local` file**: a line `ANTHROPIC_API_KEY=sk-ant-...` in `~/.env.local`. QueQue reads only `~/.env.local` itself: never the directory you run `??` from and never a directory above your home directory, so a `.env.local` inside a project (or in `/tmp`) is not used. The background daemon reads the file once, when it starts.
|
|
66
|
-
|
|
67
|
-
An empty or whitespace-only value counts as unset.
|
|
68
|
-
|
|
69
|
-
**Which route wins.** A non-empty `ANTHROPIC_API_KEY` always wins: QueQue calls Claude through the Anthropic SDK and never runs `claude -p`. There is no automatic fallback in either direction. If the API-key request fails, QueQue shows that error instead of trying your Claude Code login, and a failed `claude -p` run never falls back to a key. To switch to your Claude Code login, remove the key from your environment and `~/.env.local`, then restart the daemon.
|
|
70
|
-
|
|
71
|
-
`QQ_MODEL` (in your environment or `~/.env.local`) picks the model on the API-key route only. The default is `claude-sonnet-5`.
|
|
72
|
-
|
|
73
|
-
### OpenAI or Ollama (beta)
|
|
74
|
-
|
|
75
|
-
Run the picker in a terminal:
|
|
76
|
-
|
|
77
|
-
```shell
|
|
78
|
-
qq init provider
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
It asks one question (Claude, OpenAI or Ollama), saves your answer to `~/.config/qq/provider.json`, and restarts the background daemon. Nothing is probed until you answer, and `??` never asks you to choose.
|
|
82
|
-
|
|
83
|
-
- **OpenAI (beta)** needs `OPENAI_API_KEY` in your environment (`export OPENAI_API_KEY="sk-..."` in `~/.zshrc`, above the QueQue source line) or in `~/.env.local`. Set the key first, open a new terminal, then run `qq init provider`. QueQue never asks for the key and never stores it: `provider.json` only records that you chose OpenAI. The default model is `gpt-5.5`.
|
|
84
|
-
- **Ollama (beta)** lists the models you have already pulled and pins the one you pick. If Ollama is not running, the picker prints the download link and `ollama serve`. If it has no models, the picker tells you to run `ollama pull`. When `provider.json` has a `baseUrl` (a remote server), the picker lists and keeps that server; to go back to Ollama on this machine, remove `baseUrl` from `provider.json`.
|
|
85
|
-
|
|
86
|
-
Your choice sticks. If the chosen provider fails, `??` shows that provider's error; QueQue never switches to a different provider on its own. Run `qq init provider` again to switch, including back to Claude.
|
|
87
|
-
|
|
88
|
-
Every provider gets 25 seconds per `??`. If an OpenAI or Ollama answer is cut off before a full command, QueQue asks the same provider once more within those same 25 seconds. If the second try also falls short, you get the commands that did arrive, or a "cut off" message when none did. When an OpenAI model rejects one of QueQue's request settings, QueQue re-sends without it and remembers that for the model until the daemon restarts.
|
|
89
|
-
|
|
90
|
-
`provider.json` is plain JSON you can edit by hand, and QueQue reads it again on every `??`:
|
|
91
|
-
|
|
92
|
-
```json
|
|
93
|
-
{"version":1,"provider":"ollama","model":"gemma4"}
|
|
32
|
+
npm install -g @k-leumas/queque-cli
|
|
33
|
+
qq init zsh && source ~/.zshrc
|
|
94
34
|
```
|
|
95
35
|
|
|
96
|
-
|
|
36
|
+
See [Install](https://github.com/k-leumas/queque/blob/main/docs/INSTALL.md) for the full requirements.
|
|
97
37
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
A background daemon answers `??` for every terminal. It starts with your first interactive shell (and again on the next `??` if it is not running) and inherits that shell's environment. It reads `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `QQ_MODEL`, `~/.env.local` and `~/.config/qq/config.json` once, when it starts. `provider.json` is the exception: it is read on every `??`. On the Claude Code login route, the daemon also keeps one idle `claude -p` process ready, so the next `??` skips Claude Code's start-up.
|
|
38
|
+
## Choose a provider
|
|
101
39
|
|
|
102
|
-
|
|
40
|
+
Claude is the default. If you already use Claude Code (signed in with `claude /login`) or have an Anthropic API key (`ANTHROPIC_API_KEY`), there is nothing to set up. To use OpenAI or a local Ollama model instead (both in beta), run `qq init provider`.
|
|
103
41
|
|
|
104
|
-
|
|
105
|
-
- After changing any of them, restart the daemon from a shell that has the new values:
|
|
106
|
-
|
|
107
|
-
```shell
|
|
108
|
-
pkill -f 'daemon --socket /tmp/qq-'
|
|
109
|
-
qq daemon --ensure
|
|
110
|
-
```
|
|
42
|
+
See [Choose a provider](https://github.com/k-leumas/queque/blob/main/docs/PROVIDERS.md) for keys, models and restarting the daemon.
|
|
111
43
|
|
|
112
44
|
## Usage
|
|
113
45
|
|
|
@@ -119,68 +51,16 @@ find docker containers using port 3000??
|
|
|
119
51
|
git undo last commit but keep changes??
|
|
120
52
|
```
|
|
121
53
|
|
|
122
|
-
A
|
|
123
|
-
|
|
124
|
-
Press `Esc` to cancel. It stops the request to the provider and restores what you were typing, so you can tweak your intent and hit `??` again.
|
|
125
|
-
|
|
126
|
-
A command that matches a destructive pattern (`rm`, `sudo` and similar) is marked `⚠ review carefully — this command may be destructive`. The mark is a warning only; the row stays selectable.
|
|
127
|
-
|
|
128
|
-
### Installed-tool awareness
|
|
129
|
-
|
|
130
|
-
On every `??`, zsh refreshes its list of the commands it can find (`rehash`), so a tool you installed a moment ago in the same shell counts. QueQue uses that list in two ways.
|
|
131
|
-
|
|
132
|
-
**It tells the provider which well-known tools you have.** QueQue ships a fixed catalog of 196 public command-line tool names that have common alternatives, such as `rg`, `fd`, `bat`, `jq` and `kubectl`. The request includes only the catalog tools you have installed, with instructions to prefer them, to make at least one suggestion that uses only installed tools, and never to suggest install steps. The catalog mostly leaves out basic utilities such as `ls`, `grep` and `find`; the provider is told those are present. Nothing outside the catalog is sent: the rest of your `PATH`, your shell functions and your aliases stay on your machine. The catalog is checked twice, once before the request leaves the client and again just before the prompt is built, so a name that is not in it never reaches a provider.
|
|
133
|
-
|
|
134
|
-
**It marks suggestions that need a missing tool.** This check runs locally, against the full list. A row that needs a tool zsh cannot find gets `ⓘ` before its explanation, and the legend reads `ⓘ not installed`. The row stays selectable. When QueQue knows how to install that tool with brew, apt, dnf or pacman, the legend adds `tab prepends the install command`: press `Tab` (or `Shift+Tab`) on the row to switch it to the install form, and again to switch back. The install form is inserted like any other command, never run.
|
|
135
|
-
|
|
136
|
-
Set `QQ_TOOL_AWARENESS=0` in your shell to turn off both: no tool names are sent and no rows are marked.
|
|
137
|
-
|
|
138
|
-
### Inside Zellij
|
|
139
|
-
|
|
140
|
-
QueQue detects Zellij automatically and opens in a floating pane instead of inline. Same trigger, same result, better layout.
|
|
141
|
-
|
|
142
|
-
Set `QQ_PANE_WIDTH` (default `80`) and `QQ_PANE_HEIGHT` (default `24`) to resize the floating pane.
|
|
143
|
-
|
|
144
|
-
Without Zellij, QueQue falls back to an inline TUI in your current terminal session.
|
|
145
|
-
|
|
146
|
-
## Privacy defaults
|
|
147
|
-
|
|
148
|
-
QueQue is **insertion-only**: it writes commands into your shell buffer — you press Enter to run them. QueQue never auto-executes suggestions.
|
|
149
|
-
|
|
150
|
-
**What leaves your machine (Claude and OpenAI, hosted).** The provider you chose receives the same context, whichever it is: Claude (through `claude -p` or the API key) or OpenAI (through `OPENAI_API_KEY`). Only that one provider receives it:
|
|
151
|
-
|
|
152
|
-
- Your query text and current working directory
|
|
153
|
-
- Your OS platform name (for example `darwin` or `linux`) and shell name (`zsh`)
|
|
154
|
-
- Git metadata (repository root path, branch, dirty flag, changed file *names* — not file contents)
|
|
155
|
-
- Parsed filename hints from your query (no disk reads)
|
|
156
|
-
- The names of installed tools that appear in QueQue's public catalog of 196 well-known tools (see [Installed-tool awareness](#installed-tool-awareness)). The rest of your `PATH`, your function names and your alias names stay on your machine. `QQ_TOOL_AWARENESS=0` stops even the catalog names.
|
|
157
|
-
|
|
158
|
-
**With Ollama**, the same context goes only to your Ollama server (`http://localhost:11434` by default, or the `baseUrl` in `provider.json`). With the default setting, nothing leaves your machine. A `baseUrl` that starts with `http://` and names another machine sends that context across the network unencrypted; for a remote server, use an `https://` URL (for example behind a reverse proxy).
|
|
159
|
-
|
|
160
|
-
**What QueQue never sends:**
|
|
161
|
-
|
|
162
|
-
- File contents. `QQ_ALLOW_FILE_READ=1` is reserved for a future opt-in and reads nothing today.
|
|
163
|
-
- Paths matching sensitive patterns (`.env`, credentials, `.pem`, `id_rsa`, `.ssh/`, `.aws/`, `secret`) are stripped from git context
|
|
164
|
-
|
|
165
|
-
**Debug logging:** The client and daemon append short diagnostics to `/tmp/qq-<uid>-debug.log`, or to the file named by `QQ_DEBUG_LOG_FILE`. Shell buffer and query text are redacted unless `QQ_DEBUG_VERBOSE=1`. The zsh widget adds its own lines only when `QQ_DEBUG_LOG_FILE` is set. The log stays on your machine.
|
|
166
|
-
|
|
167
|
-
**User config:** Copy [docs/config.example.json](docs/config.example.json) to `~/.config/qq/config.json` to add extra sensitive path patterns, log redaction keys, or destructive-command warnings. Built-in defaults always apply — your patterns are merged on top. Override the file path with `QQ_CONFIG_FILE`: a leading `~/` means your home directory, and a relative path is resolved against your home directory. Malformed `config.json` is ignored with a warning; QueQue falls back to built-in defaults (fail-closed).
|
|
168
|
-
|
|
169
|
-
See [docs/EXTENSIONS.md](docs/EXTENSIONS.md) for the expansion path (local learning, multi-provider, plugins).
|
|
170
|
-
|
|
171
|
-
## Configuration reference
|
|
172
|
-
|
|
173
|
-
Copy [docs/config.example.json](docs/config.example.json) to `~/.config/qq/config.json` (or set `QQ_CONFIG_FILE`). Field meanings:
|
|
174
|
-
|
|
175
|
-
| Field | Type | Purpose |
|
|
176
|
-
|-------|------|---------|
|
|
177
|
-
| `effort` | `"low" \| "medium" \| "high" \| "xhigh" \| "max"` | Claude effort for `claude -p` (`--effort`) and for the API-key SDK path, which sends it as `output_config.effort`. The SDK path omits it when `QQ_MODEL` names a model without effort support (Haiku 4.5, Sonnet 4.5 or older); a level that a `QQ_MODEL` model does not support (for example `xhigh` on Opus 4.5) is your responsibility. Default `low`. Trimmed and case-insensitive; invalid values fall back to `low` without affecting the rest of the file. Takes effect after a [daemon restart](#after-changing-your-key-or-settings), because the daemon reads config.json once. OpenAI and Ollama ignore it. |
|
|
178
|
-
| `privacy.sensitivePathPatterns` | `string[]` | Extra regex patterns merged onto built-in defaults (`.env`, credentials, keys, etc.). Built-in patterns are never removed. An invalid pattern, or one longer than 256 characters, is skipped. |
|
|
179
|
-
| `privacy.redactLogKeys` | `string[]` | Extra JSON keys to redact in debug logs (merged with defaults: `lbuffer`, `rbuffer`, `queryText`, `request`). |
|
|
180
|
-
| `privacy.allowFileRead` | `boolean` | Opt-in gate for future file-content context. Env `QQ_ALLOW_FILE_READ=1` overrides this. No file reads in v1. |
|
|
181
|
-
| `privacy.useGitignore` | `boolean` | Reserved for future gitignore-based filtering. Ignored today. |
|
|
182
|
-
| `safety.destructiveCommandPatterns` | `string[]` | Extra warn-only UI patterns merged onto built-in defaults (`rm`, `sudo`, `chmod -R`, writes to `/dev/`, `curl` or `wget` piped to `sh`). The same skip rule applies. |
|
|
54
|
+
A picker opens in your terminal: move with the arrow keys and press `Enter`. The command lands in your buffer exactly as shown, ready to run or edit; QueQue never runs it for you. `Esc` cancels and restores what you typed.
|
|
183
55
|
|
|
184
|
-
See [
|
|
56
|
+
See [Usage](https://github.com/k-leumas/queque/blob/main/docs/USAGE.md) for filtering, destructive-command warnings, installed-tool awareness and Zellij.
|
|
185
57
|
|
|
58
|
+
## More
|
|
186
59
|
|
|
60
|
+
- [Install](https://github.com/k-leumas/queque/blob/main/docs/INSTALL.md): requirements, Homebrew and npm.
|
|
61
|
+
- [Choose a provider](https://github.com/k-leumas/queque/blob/main/docs/PROVIDERS.md): Claude Code login, API keys, OpenAI and Ollama (beta), restarting the daemon.
|
|
62
|
+
- [Usage](https://github.com/k-leumas/queque/blob/main/docs/USAGE.md): the picker, installed-tool awareness, Zellij.
|
|
63
|
+
- [Privacy](https://github.com/k-leumas/queque/blob/main/docs/PRIVACY.md): what leaves your machine, debug logging, opt-in anonymous telemetry.
|
|
64
|
+
- [Configuration](https://github.com/k-leumas/queque/blob/main/docs/CONFIGURATION.md): the `config.json` fields.
|
|
65
|
+
- [System design](https://github.com/k-leumas/queque/blob/main/docs/SYSTEM_DESIGN.md) and [Extensions](https://github.com/k-leumas/queque/blob/main/docs/EXTENSIONS.md): architecture and extension seams.
|
|
66
|
+
- [Contributing](https://github.com/k-leumas/queque/blob/main/CONTRIBUTING.md): development setup and developer-only settings.
|
package/dist/cli/app.js
CHANGED
|
@@ -61710,7 +61710,7 @@ function CandidateSelect({
|
|
|
61710
61710
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: legend.slice(MISSING_TOOL_MARK.length) })
|
|
61711
61711
|
] }),
|
|
61712
61712
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ControlsLine, {}),
|
|
61713
|
-
process.env.QQ_DEV_ROOT != null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", children: `dev v${"0.8.
|
|
61713
|
+
process.env.QQ_DEV_ROOT != null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { justifyContent: "flex-end", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", children: `dev v${"0.8.2"} ${"a180650"}` }) })
|
|
61714
61714
|
] });
|
|
61715
61715
|
}
|
|
61716
61716
|
|
|
@@ -62697,7 +62697,7 @@ function createTelemetryBuffer(deps = {}) {
|
|
|
62697
62697
|
const readState = deps.readState ?? (() => readTelemetryState());
|
|
62698
62698
|
const env3 = deps.env ?? (() => process.env);
|
|
62699
62699
|
const endpointFor = deps.endpoint ?? resolveTelemetryEndpoint;
|
|
62700
|
-
const version3 = deps.version ?? "0.8.
|
|
62700
|
+
const version3 = deps.version ?? "0.8.2";
|
|
62701
62701
|
let events = [];
|
|
62702
62702
|
let lastSent = null;
|
|
62703
62703
|
let lastEnvironment = null;
|
|
@@ -63206,7 +63206,7 @@ function defaultDoctorDeps() {
|
|
|
63206
63206
|
uid: process.getuid?.() ?? 0,
|
|
63207
63207
|
socketPath: socketPath(),
|
|
63208
63208
|
nodeVersion: process.versions.node,
|
|
63209
|
-
qqVersion: "0.8.
|
|
63209
|
+
qqVersion: "0.8.2",
|
|
63210
63210
|
which: (name) => whichOnPath(name, env3.PATH),
|
|
63211
63211
|
zshVersion: async () => {
|
|
63212
63212
|
const out = await captureStdout(
|