dirsql 0.4.70 → 0.4.72
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.
|
@@ -22,7 +22,7 @@ const NATIVE_CONFIG_SUFFIXES = [".py", ".js", ".mjs", ".cjs"];
|
|
|
22
22
|
* launcher as a clean error).
|
|
23
23
|
*/
|
|
24
24
|
export async function withResolvedExtensions(argv) {
|
|
25
|
-
if (argv[0] === "init") {
|
|
25
|
+
if (argv[0] === "init" || argv[0] === "context") {
|
|
26
26
|
return argv;
|
|
27
27
|
}
|
|
28
28
|
const configPaths = getCore()
|
package/docs/howto/skip-files.md
CHANGED
|
@@ -47,8 +47,10 @@ dirsql query "SELECT basename FROM notes ORDER BY basename" -c ./.dirsql.toml
|
|
|
47
47
|
## Notes
|
|
48
48
|
|
|
49
49
|
- `ignore` lives in a config file, so it needs one:
|
|
50
|
-
[configless mode](../reference/cli.md#configless-mode)
|
|
51
|
-
|
|
50
|
+
[configless mode](../reference/cli.md#configless-mode) has no `ignore`
|
|
51
|
+
list, though its path-tables still apply the built-in
|
|
52
|
+
[skip rules](../reference/path-tables.md#skip-rules) and respect
|
|
53
|
+
`.gitignore`.
|
|
52
54
|
- The top-level `.dirsql/` directory is always excluded, ignore list or
|
|
53
55
|
not — it is reserved for `dirsql`'s own metadata
|
|
54
56
|
([config reference](../reference/config.md#dirsql-keys)).
|
package/docs/reference/cli.md
CHANGED
|
@@ -11,6 +11,7 @@ The `dirsql` binary has these modes:
|
|
|
11
11
|
| `dirsql query "<sql>"` | Explicit synonym for the default one-shot query. |
|
|
12
12
|
| `dirsql server` | Start a long-lived HTTP server exposing a SQL view of a directory. See [HTTP API](./http-api.md). |
|
|
13
13
|
| `dirsql init` | Generate a `.dirsql.toml`. |
|
|
14
|
+
| `dirsql context` | Print the usage guide for this version, for an agent to read. |
|
|
14
15
|
| `dirsql` (bare) | Open a [REPL](#the-repl) over the current directory, reading statements until EOF. |
|
|
15
16
|
|
|
16
17
|
Bare `dirsql` does **not** start the server — that is `dirsql server`.
|
|
@@ -269,8 +270,10 @@ defines **no named tables**. Filesystem queries go through
|
|
|
269
270
|
scanned live. A `./.dirsql.toml` sitting in the current directory is **not**
|
|
270
271
|
auto-loaded (pass it with `-c ./.dirsql.toml` to use it).
|
|
271
272
|
|
|
272
|
-
`'./'`
|
|
273
|
-
|
|
273
|
+
`'./'` lists the files directly inside the root, one level, like `ls`;
|
|
274
|
+
`'./**'` reaches every depth. Both scans apply the path-table
|
|
275
|
+
[skip rules](./path-tables.md#skip-rules), and each returns one row per file
|
|
276
|
+
with all seven [stat columns](./columns.md): `path`, `basename`, `dir`, `ext`,
|
|
274
277
|
`size`, `mtime`, `ctime`.
|
|
275
278
|
|
|
276
279
|
```bash
|
|
@@ -439,6 +442,17 @@ All failures exit `1` with a message on stderr:
|
|
|
439
442
|
|
|
440
443
|
On success, `init` exits `0`.
|
|
441
444
|
|
|
445
|
+
## `dirsql context`
|
|
446
|
+
|
|
447
|
+
```sh
|
|
448
|
+
uvx dirsql context
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
Prints a markdown guide for an agent that is about to query files: the
|
|
452
|
+
first line is `dirsql <version>`, then sections on usage, recipes and
|
|
453
|
+
troubleshooting. The guide is compiled into the binary, so it describes the
|
|
454
|
+
version that prints it. It takes no flags and exits `0`.
|
|
455
|
+
|
|
442
456
|
## Plugins
|
|
443
457
|
|
|
444
458
|
A **plugin** is an ordinary Python package that ships a `dirsql.toml` config
|
|
@@ -287,10 +287,25 @@ beneath it; one above it is never read.
|
|
|
287
287
|
|
|
288
288
|
### Hidden files
|
|
289
289
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
290
|
+
A path component starting with `.` is skipped unless the path spells it, the
|
|
291
|
+
rule `ls` and `fd` use. `'./'` and `'./**'` skip `.gitignore`, `.env` and
|
|
292
|
+
everything under `.claude/`; naming the component lists it:
|
|
293
|
+
|
|
294
|
+
| You write | dirsql scans |
|
|
295
|
+
| --- | --- |
|
|
296
|
+
| `'./**'` | every file, skipping dot-named files and directories at any depth |
|
|
297
|
+
| `'./.claude'`, `'./.claude/**'` | the files under `.claude/` |
|
|
298
|
+
| `'./.env'` | that one file |
|
|
299
|
+
| `'./**/.env'` | every `.env` whose parent directories are not themselves dot-named |
|
|
300
|
+
| `'~/.claude/projects/*/*.jsonl'` | the walk starts inside `.claude/`, so nothing there is hidden |
|
|
301
|
+
|
|
302
|
+
A spelled component may be a glob of its own: `'./.env*'` lists `.env.local`,
|
|
303
|
+
and `'./.*'` lists every dot-named entry one level down. A dot component the
|
|
304
|
+
path does not spell stays hidden however deep the scan goes, so
|
|
305
|
+
`'./.claude/**'` lists `.claude/sub/notes.md` but not `.claude/sub/.cache/x`.
|
|
306
|
+
|
|
307
|
+
This is independent of `.gitignore`: [`--no-ignore`](./cli.md#flags) restores
|
|
308
|
+
gitignored files and leaves dot-named entries hidden.
|
|
294
309
|
|
|
295
310
|
## Joining against declared tables
|
|
296
311
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dirsql",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.72",
|
|
4
4
|
"description": "Ephemeral SQL index over a local directory",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/dirsql",
|
|
@@ -221,10 +221,10 @@
|
|
|
221
221
|
]
|
|
222
222
|
},
|
|
223
223
|
"optionalDependencies": {
|
|
224
|
-
"@dirsql/lib-linux-x64-gnu": "0.4.
|
|
225
|
-
"@dirsql/lib-linux-arm64-gnu": "0.4.
|
|
226
|
-
"@dirsql/lib-darwin-x64": "0.4.
|
|
227
|
-
"@dirsql/lib-darwin-arm64": "0.4.
|
|
228
|
-
"@dirsql/lib-win32-x64-msvc": "0.4.
|
|
224
|
+
"@dirsql/lib-linux-x64-gnu": "0.4.72",
|
|
225
|
+
"@dirsql/lib-linux-arm64-gnu": "0.4.72",
|
|
226
|
+
"@dirsql/lib-darwin-x64": "0.4.72",
|
|
227
|
+
"@dirsql/lib-darwin-arm64": "0.4.72",
|
|
228
|
+
"@dirsql/lib-win32-x64-msvc": "0.4.72"
|
|
229
229
|
}
|
|
230
230
|
}
|