@optiqcode/cli 0.1.0 → 0.1.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 +93 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# @optiqcode/cli
|
|
2
|
+
|
|
3
|
+
The CLI and MCP server for [Optiq](https://optiqcode.com) — graph-augmented code search that actually understands your codebase.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @optiqcode/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Getting started
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
optiq login
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
You'll get a one-time code via email. Paste it in, and you're good.
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
optiq login Sign in with email OTP
|
|
23
|
+
optiq logout Sign out
|
|
24
|
+
optiq whoami Check which account you're using
|
|
25
|
+
|
|
26
|
+
optiq index [path] Index a directory for search
|
|
27
|
+
optiq search <query> Search your indexed code
|
|
28
|
+
optiq repos List your indexed repositories
|
|
29
|
+
optiq status <job_id> Check on an indexing job
|
|
30
|
+
|
|
31
|
+
optiq mcp Start the MCP server (stdio)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Indexing
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Index the current directory
|
|
38
|
+
optiq index
|
|
39
|
+
|
|
40
|
+
# Index a specific path
|
|
41
|
+
optiq index ~/projects/my-app
|
|
42
|
+
|
|
43
|
+
# Force a clean re-index
|
|
44
|
+
optiq index --fresh
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
After the first index, the backend watches your files and keeps the index up to date automatically. You don't need to re-run `optiq index`.
|
|
48
|
+
|
|
49
|
+
### Search
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
optiq search "authentication middleware"
|
|
53
|
+
optiq search "database connection pooling" --repo-id my-app
|
|
54
|
+
optiq search "error handling" --limit 20
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## MCP server
|
|
58
|
+
|
|
59
|
+
The CLI doubles as an MCP server for AI agents (Claude Code, Cursor, etc). It exposes four tools:
|
|
60
|
+
|
|
61
|
+
- `optiq_index` — index a directory
|
|
62
|
+
- `optiq_search` — search indexed code
|
|
63
|
+
- `optiq_status` — check indexing job status
|
|
64
|
+
- `optiq_repos` — list indexed repositories
|
|
65
|
+
|
|
66
|
+
### Claude Code
|
|
67
|
+
|
|
68
|
+
Add this to `.claude/settings.json`:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"optiq": {
|
|
74
|
+
"command": "optiq",
|
|
75
|
+
"args": ["mcp"]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Other MCP clients
|
|
82
|
+
|
|
83
|
+
Any client that supports stdio transport works. Point it at `optiq mcp`.
|
|
84
|
+
|
|
85
|
+
## Environment variables
|
|
86
|
+
|
|
87
|
+
| Variable | Default | Description |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| `OPTIQ_API_URL` | `https://optiqcode.com` | API endpoint (set to `http://localhost:12000` for local dev) |
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
|
|
93
|
+
MIT
|