@gmickel/gno 0.9.4 → 0.9.6
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/assets/skill/SKILL.md +173 -41
- package/package.json +1 -1
- package/src/cli/run.ts +34 -0
package/assets/skill/SKILL.md
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gno
|
|
3
|
-
description: Search local documents, files, notes, and knowledge bases.
|
|
4
|
-
allowed-tools: Bash(gno:*)
|
|
3
|
+
description: Search local documents, files, notes, and knowledge bases. Index directories, search with BM25/vector/hybrid, get AI answers with citations. Use when user wants to search files, find documents, query notes, look up information in local folders, index a directory, set up document search, build a knowledge base, needs RAG/semantic search, or wants to start a local web UI for their docs.
|
|
4
|
+
allowed-tools: Bash(gno:*) Read
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# GNO - Local
|
|
7
|
+
# GNO - Local Knowledge Engine
|
|
8
8
|
|
|
9
|
-
Fast local semantic search for your documents. Index once, search instantly.
|
|
9
|
+
Fast local semantic search for your documents. Index once, search instantly. No cloud, no API keys.
|
|
10
10
|
|
|
11
|
-
**Role**:
|
|
12
|
-
**Goal**:
|
|
11
|
+
**Role**: Document search and knowledge retrieval assistant
|
|
12
|
+
**Goal**: Help users index, search, query, and get answers from their local documents
|
|
13
13
|
|
|
14
14
|
## When to Use This Skill
|
|
15
15
|
|
|
16
16
|
- User asks to **search files, documents, or notes**
|
|
17
17
|
- User wants to **find information** in local folders
|
|
18
18
|
- User needs to **index a directory** for searching
|
|
19
|
-
- User mentions **PDFs, markdown, docs** they want to search
|
|
19
|
+
- User mentions **PDFs, markdown, Word docs, code** they want to search
|
|
20
20
|
- User asks about **knowledge base** or **RAG** setup
|
|
21
21
|
- User wants **semantic/vector search** over their files
|
|
22
22
|
- User needs to **set up MCP** for document access
|
|
23
|
+
- User wants a **web UI** to browse/search documents
|
|
24
|
+
- User asks to **get AI answers** from their documents
|
|
23
25
|
|
|
24
26
|
## Quick Start
|
|
25
27
|
|
|
@@ -39,6 +41,52 @@ gno search "your query"
|
|
|
39
41
|
|
|
40
42
|
## Core Commands
|
|
41
43
|
|
|
44
|
+
### Search Commands
|
|
45
|
+
|
|
46
|
+
| Command | Description |
|
|
47
|
+
| --------------------- | ------------------------------------------- |
|
|
48
|
+
| `gno search <query>` | BM25 keyword search (fast, exact terms) |
|
|
49
|
+
| `gno vsearch <query>` | Vector semantic search (meaning-based) |
|
|
50
|
+
| `gno query <query>` | Hybrid search (BM25 + vector + rerank) |
|
|
51
|
+
| `gno ask <question>` | Get AI answer with citations from your docs |
|
|
52
|
+
|
|
53
|
+
### Search Options
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Limit results
|
|
57
|
+
gno search "api" -n 10
|
|
58
|
+
|
|
59
|
+
# Filter by collection
|
|
60
|
+
gno query "auth" --collection work
|
|
61
|
+
|
|
62
|
+
# Search modes (for query/ask)
|
|
63
|
+
gno query "topic" --fast # ~0.7s, skip expansion/rerank
|
|
64
|
+
gno query "topic" # ~2-3s, default with rerank
|
|
65
|
+
gno query "topic" --thorough # ~5-8s, full pipeline
|
|
66
|
+
|
|
67
|
+
# Get AI answer
|
|
68
|
+
gno ask "how does auth work" --answer
|
|
69
|
+
|
|
70
|
+
# Output formats
|
|
71
|
+
gno search "test" --json # JSON for parsing
|
|
72
|
+
gno search "test" --files # URIs for piping
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Document Retrieval
|
|
76
|
+
|
|
77
|
+
| Command | Description |
|
|
78
|
+
| ------------------------- | ---------------------------- |
|
|
79
|
+
| `gno get <ref>` | Get document by URI or docid |
|
|
80
|
+
| `gno multi-get <refs...>` | Get multiple documents |
|
|
81
|
+
| `gno ls [scope]` | List indexed documents |
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
gno get gno://work/readme.md
|
|
85
|
+
gno get "#a1b2c3d4" --line-numbers
|
|
86
|
+
gno ls notes
|
|
87
|
+
gno ls --json
|
|
88
|
+
```
|
|
89
|
+
|
|
42
90
|
### Indexing
|
|
43
91
|
|
|
44
92
|
| Command | Description |
|
|
@@ -47,62 +95,146 @@ gno search "your query"
|
|
|
47
95
|
| `gno collection add <path> --name <name>` | Add folder to index |
|
|
48
96
|
| `gno index` | Full index (ingest + embed) |
|
|
49
97
|
| `gno update` | Sync files without embedding |
|
|
98
|
+
| `gno embed` | Generate embeddings only |
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
gno init
|
|
102
|
+
gno collection add ~/notes --name notes --pattern "**/*.md"
|
|
103
|
+
gno index
|
|
104
|
+
gno index --collection notes # Single collection
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Model Management
|
|
108
|
+
|
|
109
|
+
| Command | Description |
|
|
110
|
+
| ------------------ | ------------------------------------- |
|
|
111
|
+
| `gno models list` | Show available model presets |
|
|
112
|
+
| `gno models use` | Switch preset (slim/balanced/quality) |
|
|
113
|
+
| `gno models pull` | Download models |
|
|
114
|
+
| `gno models clear` | Remove cached models |
|
|
115
|
+
| `gno models path` | Show model cache directory |
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
gno models use slim # Default, fast (~1GB)
|
|
119
|
+
gno models use balanced # Larger model (~2GB)
|
|
120
|
+
gno models use quality # Best answers (~2.5GB)
|
|
121
|
+
gno models pull --all
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Context Hints
|
|
50
125
|
|
|
51
|
-
|
|
126
|
+
| Command | Description |
|
|
127
|
+
| -------------------------------- | ---------------------- |
|
|
128
|
+
| `gno context add <scope> "text"` | Add context for scope |
|
|
129
|
+
| `gno context list` | List all contexts |
|
|
130
|
+
| `gno context check` | Validate configuration |
|
|
131
|
+
| `gno context rm <scope>` | Remove a context |
|
|
52
132
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
| `gno query <query>` | Hybrid search (BM25 + vector + rerank) |
|
|
58
|
-
| `gno ask <question>` | AI-powered Q&A with citations |
|
|
133
|
+
```bash
|
|
134
|
+
gno context add "/" "Corporate knowledge base"
|
|
135
|
+
gno context add "work:" "Work documents and contracts"
|
|
136
|
+
```
|
|
59
137
|
|
|
60
|
-
###
|
|
138
|
+
### Web UI
|
|
61
139
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
140
|
+
| Command | Description |
|
|
141
|
+
| ------------------- | ------------------------ |
|
|
142
|
+
| `gno serve` | Start web UI (port 3000) |
|
|
143
|
+
| `gno serve -p 8080` | Custom port |
|
|
66
144
|
|
|
67
|
-
|
|
145
|
+
Features: Dashboard, search, browse, document editor, AI Q&A with citations.
|
|
68
146
|
|
|
69
|
-
###
|
|
147
|
+
### MCP Server
|
|
148
|
+
|
|
149
|
+
| Command | Description |
|
|
150
|
+
| ------------------- | ------------------------------- |
|
|
151
|
+
| `gno mcp` | Start MCP server (stdio) |
|
|
152
|
+
| `gno mcp install` | Install for Claude Desktop, etc |
|
|
153
|
+
| `gno mcp uninstall` | Remove MCP configuration |
|
|
154
|
+
| `gno mcp status` | Show installation status |
|
|
70
155
|
|
|
71
156
|
```bash
|
|
72
|
-
|
|
73
|
-
gno
|
|
157
|
+
gno mcp install --target claude-desktop
|
|
158
|
+
gno mcp install --target cursor
|
|
159
|
+
gno mcp install --target claude-code --scope project
|
|
160
|
+
```
|
|
74
161
|
|
|
75
|
-
|
|
76
|
-
gno vsearch "how to cancel contract"
|
|
162
|
+
### Skill Management
|
|
77
163
|
|
|
78
|
-
|
|
79
|
-
|
|
164
|
+
| Command | Description |
|
|
165
|
+
| --------------------- | --------------------------- |
|
|
166
|
+
| `gno skill install` | Install skill for AI agents |
|
|
167
|
+
| `gno skill uninstall` | Remove skill |
|
|
168
|
+
| `gno skill show` | Preview skill files |
|
|
169
|
+
| `gno skill paths` | Show installation paths |
|
|
80
170
|
|
|
81
|
-
|
|
82
|
-
gno
|
|
171
|
+
```bash
|
|
172
|
+
gno skill install --target claude --scope project
|
|
173
|
+
gno skill install --target codex --scope user
|
|
83
174
|
```
|
|
84
175
|
|
|
85
|
-
###
|
|
176
|
+
### Admin Commands
|
|
177
|
+
|
|
178
|
+
| Command | Description |
|
|
179
|
+
| ---------------- | ----------------------------- |
|
|
180
|
+
| `gno status` | Show index status |
|
|
181
|
+
| `gno doctor` | Check system health |
|
|
182
|
+
| `gno cleanup` | Remove orphaned data |
|
|
183
|
+
| `gno reset` | Delete all data (use caution) |
|
|
184
|
+
| `gno completion` | Shell tab completion |
|
|
86
185
|
|
|
87
186
|
```bash
|
|
88
|
-
|
|
89
|
-
gno
|
|
187
|
+
gno status --json
|
|
188
|
+
gno doctor
|
|
189
|
+
gno completion install
|
|
190
|
+
```
|
|
90
191
|
|
|
91
|
-
|
|
92
|
-
gno get "#a1b2c3d4" --line-numbers
|
|
192
|
+
## Global Flags
|
|
93
193
|
|
|
94
|
-
# List documents
|
|
95
|
-
gno ls docs
|
|
96
194
|
```
|
|
195
|
+
--index <name> Use alternate index (default: "default")
|
|
196
|
+
--config <path> Override config file path
|
|
197
|
+
--no-color Disable colored output
|
|
198
|
+
--no-pager Disable automatic paging
|
|
199
|
+
--verbose Enable verbose logging
|
|
200
|
+
--yes Non-interactive mode
|
|
201
|
+
--offline Use cached models only
|
|
202
|
+
--json JSON output (where supported)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Common Patterns
|
|
97
206
|
|
|
98
|
-
###
|
|
207
|
+
### Search & Get Full Content
|
|
99
208
|
|
|
100
209
|
```bash
|
|
101
|
-
#
|
|
102
|
-
gno search "api" --
|
|
210
|
+
# Find documents, get full content
|
|
211
|
+
gno search "api design" --files | head -1 | cut -d, -f3 | xargs gno get
|
|
103
212
|
|
|
104
|
-
#
|
|
105
|
-
gno
|
|
213
|
+
# JSON pipeline
|
|
214
|
+
gno query "auth" --json | jq -r '.results[0].uri' | xargs gno get
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### AI-Powered Q&A
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Get answer with sources
|
|
221
|
+
gno ask "what are the deployment steps" --answer
|
|
222
|
+
|
|
223
|
+
# Show all retrieved sources
|
|
224
|
+
gno ask "summarize the auth discussion" --answer --show-sources
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Scripting
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# Check if indexed
|
|
231
|
+
gno status --json | jq '.healthy'
|
|
232
|
+
|
|
233
|
+
# List all URIs
|
|
234
|
+
gno ls --files
|
|
235
|
+
|
|
236
|
+
# Batch get
|
|
237
|
+
gno multi-get abc123 def456 ghi789 --max-bytes 10000
|
|
106
238
|
```
|
|
107
239
|
|
|
108
240
|
## Reference
|
package/package.json
CHANGED
package/src/cli/run.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { CommanderError } from "commander";
|
|
9
|
+
import { dirname, join } from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
9
11
|
|
|
10
12
|
import { CLI_NAME, PRODUCT_NAME } from "../app/constants";
|
|
11
13
|
import { CliError, exitCodeFor, formatErrorForOutput } from "./errors";
|
|
@@ -54,6 +56,32 @@ function isKnownValueFlag(arg: string): boolean {
|
|
|
54
56
|
return false;
|
|
55
57
|
}
|
|
56
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Check if --skill flag is present in argv (before end-of-options marker).
|
|
61
|
+
*/
|
|
62
|
+
function argvWantsSkill(argv: string[]): boolean {
|
|
63
|
+
for (const arg of argv) {
|
|
64
|
+
if (arg === "--") {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
if (arg === "--skill") {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Output SKILL.md content for agent discovery.
|
|
76
|
+
* Clean output with no extra text (suitable for piping/parsing).
|
|
77
|
+
*/
|
|
78
|
+
async function printSkillFile(): Promise<void> {
|
|
79
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
80
|
+
const skillPath = join(__dirname, "../../assets/skill/SKILL.md");
|
|
81
|
+
const content = await Bun.file(skillPath).text();
|
|
82
|
+
process.stdout.write(content);
|
|
83
|
+
}
|
|
84
|
+
|
|
57
85
|
/**
|
|
58
86
|
* Check if argv has no subcommand (only known global flags).
|
|
59
87
|
* Returns true for: gno, gno --json, gno --quiet --verbose
|
|
@@ -146,6 +174,12 @@ export async function runCli(argv: string[]): Promise<number> {
|
|
|
146
174
|
|
|
147
175
|
const isJson = argvWantsJson(argv);
|
|
148
176
|
|
|
177
|
+
// Handle --skill flag: output SKILL.md for agent discovery
|
|
178
|
+
if (argvWantsSkill(argv)) {
|
|
179
|
+
await printSkillFile();
|
|
180
|
+
return 0;
|
|
181
|
+
}
|
|
182
|
+
|
|
149
183
|
// Handle "no subcommand" case before Commander (avoids full help display)
|
|
150
184
|
if (hasNoSubcommand(argv)) {
|
|
151
185
|
printConciseHelp({ json: isJson });
|