@hongymagic/q 0.6.1 → 0.7.1
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 +39 -1
- package/dist/q.js +9766 -9666
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# q — Quick AI Answers from the Command Line
|
|
2
2
|
|
|
3
|
+
[](https://github.com/hongymagic/q/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@hongymagic/q)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
3
7
|
A fast, minimal CLI for getting AI answers directly in your terminal.
|
|
4
8
|
|
|
5
9
|
## Installation
|
|
@@ -60,7 +64,10 @@ echo "how do I restart docker" | q
|
|
|
60
64
|
| `-p, --provider <name>` | Override the default provider |
|
|
61
65
|
| `-m, --model <id>` | Override the default model |
|
|
62
66
|
| `--copy` | Copy answer to clipboard |
|
|
67
|
+
| `--no-copy` | Disable copy (overrides config) |
|
|
68
|
+
| `--debug` | Enable debug logging to stderr |
|
|
63
69
|
| `-h, --help` | Show help message |
|
|
70
|
+
| `-v, --version` | Show version |
|
|
64
71
|
|
|
65
72
|
### Commands
|
|
66
73
|
|
|
@@ -76,7 +83,7 @@ Config is loaded from (later overrides earlier):
|
|
|
76
83
|
|
|
77
84
|
1. `~/.config/q/config.toml`
|
|
78
85
|
2. `./config.toml` (project-specific)
|
|
79
|
-
3. Environment: `Q_PROVIDER`, `Q_MODEL`
|
|
86
|
+
3. Environment: `Q_PROVIDER`, `Q_MODEL`, `Q_COPY`
|
|
80
87
|
|
|
81
88
|
See [config.example.toml](config.example.toml) for all options.
|
|
82
89
|
|
|
@@ -130,6 +137,37 @@ export PORTKEY_API_KEY="your-portkey-key"
|
|
|
130
137
|
export PROVIDER_API_KEY="your-provider-key"
|
|
131
138
|
```
|
|
132
139
|
|
|
140
|
+
## Troubleshooting
|
|
141
|
+
|
|
142
|
+
**"Missing API key" error:**
|
|
143
|
+
|
|
144
|
+
Ensure your API key environment variable is set:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
export ANTHROPIC_API_KEY="your-key-here"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**"Config file not found" error:**
|
|
151
|
+
|
|
152
|
+
Run `q config init` to create a default configuration file.
|
|
153
|
+
|
|
154
|
+
**Debug mode:**
|
|
155
|
+
|
|
156
|
+
Use `--debug` to see detailed logs on stderr:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
q --debug "how do I list docker containers"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Piped content not working:**
|
|
163
|
+
|
|
164
|
+
Ensure you're piping content correctly. The query should be in arguments:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
cat file.txt | q "explain this" # Correct
|
|
168
|
+
cat file.txt | q # Uses stdin as query (no context)
|
|
169
|
+
```
|
|
170
|
+
|
|
133
171
|
## Licence
|
|
134
172
|
|
|
135
173
|
MIT
|