@hongymagic/q 0.7.0 → 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 +37 -0
- package/dist/q.js +9743 -9662
- 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
|
|
@@ -61,7 +65,9 @@ echo "how do I restart docker" | q
|
|
|
61
65
|
| `-m, --model <id>` | Override the default model |
|
|
62
66
|
| `--copy` | Copy answer to clipboard |
|
|
63
67
|
| `--no-copy` | Disable copy (overrides config) |
|
|
68
|
+
| `--debug` | Enable debug logging to stderr |
|
|
64
69
|
| `-h, --help` | Show help message |
|
|
70
|
+
| `-v, --version` | Show version |
|
|
65
71
|
|
|
66
72
|
### Commands
|
|
67
73
|
|
|
@@ -131,6 +137,37 @@ export PORTKEY_API_KEY="your-portkey-key"
|
|
|
131
137
|
export PROVIDER_API_KEY="your-provider-key"
|
|
132
138
|
```
|
|
133
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
|
+
|
|
134
171
|
## Licence
|
|
135
172
|
|
|
136
173
|
MIT
|