@k-leumas/queque-cli 0.3.8 → 0.4.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 CHANGED
@@ -1,25 +1,35 @@
1
- # QueQue - your inline AI terminal helper
1
+ # QueQue — copy-pasting shell commands is dead
2
2
 
3
- **Turn natural-language intent into a shell command — without leaving the terminal.**
3
+ **Before:** Google it → copy → paste → tweak → pray.
4
4
 
5
- Type your intent, hit `??`, pick a command. It lands in your buffer ready to run or edit. No browser, no prompt takeover, no clipboard gymnastics.
5
+ **Now:** Type your intent, hit `??`, pick a command — it lands in your buffer, ready to tweak and run.
6
6
 
7
- ![QueQue demo](assets/demo.gif)
8
7
 
9
- ## Install
8
+ #### Copy-pasting commands from the browser is dead.
10
9
 
11
- ```zsh
12
- brew install k-leumas/tap/queque
13
- ```
10
+ Welcome to the **future** –
11
+ `
12
+ brew install k-leumas/tap/queque
13
+ `
14
+
15
+
16
+ ![QueQue demo](assets/demo.gif)
14
17
 
15
18
  > [!NOTE]
16
- > The homebrew script automagically appends the shell-integration command and sources your `.zshrc`, which is shown during install.
19
+ > After install, run `qq init zsh >> ~/.zshrc && source ~/.zshrc` to wire up the `??` keybinding.
17
20
 
18
21
 
19
22
  <details>
20
- <summary>Install via npm or source</summary>
23
+ <summary>Install via npm</summary>
24
+
25
+ ## Requirements
21
26
 
22
- ```zsh
27
+ - zsh
28
+ - Node.js ≥ 20
29
+ - [jq](https://jqlang.github.io/jq/)
30
+
31
+
32
+ ```shell
23
33
  npm install -g @k-leumas/queque-cli
24
34
  qq init zsh >> ~/.zshrc && source ~/.zshrc
25
35
  ```
@@ -32,7 +42,7 @@ QueQue resolves `ANTHROPIC_API_KEY` in order:
32
42
 
33
43
  1. **Environment variable** — `export ANTHROPIC_API_KEY="sk-ant-..."` in your shell or `.zshrc`
34
44
  2. **`.env.local` file** — place a `.env.local` in your project directory (or any parent). QueQue searches upward from the current working directory:
35
- ```
45
+ ```shell
36
46
  ANTHROPIC_API_KEY=sk-ant-...
37
47
  ```
38
48
 
@@ -42,7 +52,7 @@ The `.env.local` option is useful for project-specific keys or keeping the key o
42
52
 
43
53
  Type anything before `??` and QueQue turns it into a shell command:
44
54
 
45
- ```
55
+ ```shell
46
56
  list files by size??
47
57
  find docker containers using port 3000??
48
58
  git undo last commit but keep changes??
@@ -50,45 +60,49 @@ git undo last commit but keep changes??
50
60
 
51
61
  A selection UI opens in-terminal. Pick a command with arrow keys or fuzzy search, press `Enter`, and the command lands in your buffer — ready to run or edit before you commit.
52
62
 
53
- Press `Esc` to cancel and return to what you were typing.
63
+ Press `Esc` to cancel and return to what you were typing, you can even tweak your intent and hit `??` again.
54
64
 
55
65
  ### Inside Zellij
56
66
 
57
67
  QueQue detects Zellij automatically and opens in a floating pane instead of inline. Same trigger, same result, better layout.
58
68
 
59
- ## Requirements
69
+ Set `QQ_PANE_WIDTH` (default `80`) and `QQ_PANE_HEIGHT` (default `24`) to resize the floating pane.
60
70
 
61
- - zsh
62
- - Node.js ≥ 20
63
- - [jq](https://jqlang.github.io/jq/)
64
- - `ANTHROPIC_API_KEY`
71
+ Without Zellij, QueQue falls back to an inline TUI in your current terminal session.
65
72
 
66
- ## Configuration
73
+ ## Privacy defaults
67
74
 
68
- | Variable | Default | Description |
69
- |---|---|---|
70
- | `ANTHROPIC_API_KEY` | — | Required. Your Anthropic API key. |
71
- | `QQ_MODEL` | `claude-haiku-4-5-20251001` | Override the Claude model. |
72
- | `QQ_DEBUG_LOG_FILE` | — | Path to write a debug log (e.g. `/tmp/qq.log`). |
75
+ QueQue is **insertion-only**: it writes commands into your shell buffer — you press Enter to run them. QueQue never auto-executes suggestions.
73
76
 
74
- Both env vars and `.env.local` are supported for all variables.
77
+ **What leaves your machine (when using Claude):**
75
78
 
76
- ## Contributing
79
+ - Your query text and current working directory
80
+ - Git metadata (branch, dirty flag, changed file *names* — not file contents)
81
+ - Parsed filename hints from your query (no disk reads)
77
82
 
78
- ```zsh
79
- git clone https://github.com/k-leumas/queque
80
- cd queque
81
- pnpm install
82
- pnpm dev # watch build
83
- pnpm test:run # run tests
84
- ```
83
+ **What QueQue never sends:**
85
84
 
86
- To wire up the dev build as the live `??` trigger:
85
+ - File contents (unless you explicitly opt in later with `QQ_ALLOW_FILE_READ=1`)
86
+ - Paths matching sensitive patterns (`.env`, credentials, `.pem`, `id_rsa`, etc.) are stripped from git context
87
+
88
+ **Debug logging:** Off by default. When enabled, logs redact shell buffer text unless `QQ_DEBUG_VERBOSE=1`.
89
+
90
+ **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`. Malformed `config.json` is ignored with a warning; QueQue falls back to built-in defaults (fail-closed).
91
+
92
+ See [docs/EXTENSIONS.md](docs/EXTENSIONS.md) for the expansion path (local learning, multi-provider, plugins).
93
+
94
+ ## Configuration reference
95
+
96
+ Copy [docs/config.example.json](docs/config.example.json) to `~/.config/qq/config.json` (or set `QQ_CONFIG_FILE`). Field meanings:
97
+
98
+ | Field | Type | Purpose |
99
+ |-------|------|---------|
100
+ | `privacy.sensitivePathPatterns` | `string[]` | Extra regex patterns merged onto built-in defaults (`.env`, credentials, keys, etc.). Built-in patterns are never removed. |
101
+ | `privacy.redactLogKeys` | `string[]` | Extra JSON keys to redact in debug logs (merged with defaults: `lbuffer`, `rbuffer`, `queryText`, `request`). |
102
+ | `privacy.allowFileRead` | `boolean` | Opt-in gate for future file-content context. Env `QQ_ALLOW_FILE_READ=1` overrides this. No file reads in v1. |
103
+ | `privacy.useGitignore` | `boolean` | Reserved for future gitignore-based filtering. Ignored today. |
104
+ | `safety.destructiveCommandPatterns` | `string[]` | Extra warn-only UI patterns merged onto built-in defaults (`rm`, `sudo`, etc.). |
105
+
106
+ See [docs/SYSTEM_DESIGN.md](docs/SYSTEM_DESIGN.md) for architecture and [docs/EXTENSIONS.md](docs/EXTENSIONS.md) for Phase 7/8 expansion.
87
107
 
88
- ```zsh
89
- export QQ_DEV_ROOT="$PWD"
90
- qq init zsh >> ~/.zshrc
91
- source ~/.zshrc
92
- ```
93
108
 
94
- Changes to `src/` rebuild automatically and the widget picks them up immediately.