dirsql 0.3.78 → 0.3.79
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/docs/reference/cli.md +11 -17
- package/package.json +11 -11
package/docs/reference/cli.md
CHANGED
|
@@ -5,8 +5,8 @@ The `dirsql` binary has three modes:
|
|
|
5
5
|
| Invocation | Behavior |
|
|
6
6
|
|---|---|
|
|
7
7
|
| `dirsql` (no subcommand) | Start a long-lived HTTP server exposing a SQL view of a directory. See [HTTP API](./http-api.md). |
|
|
8
|
-
| `dirsql query "<sql>"` |
|
|
9
|
-
| `dirsql init` | Generate a
|
|
8
|
+
| `dirsql query "<sql>"` | Query the file system as JSON |
|
|
9
|
+
| `dirsql init` | Generate a `.dirsql.toml` |
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
@@ -100,8 +100,7 @@ with a JSON body describing the failure:
|
|
|
100
100
|
|
|
101
101
|
## `dirsql query`
|
|
102
102
|
|
|
103
|
-
Run
|
|
104
|
-
docs verification snippets — without booting the server and `curl`ing it:
|
|
103
|
+
Run a SQL query from the shell:
|
|
105
104
|
|
|
106
105
|
```bash
|
|
107
106
|
dirsql query "SELECT basename, size FROM files ORDER BY size DESC LIMIT 5"
|
|
@@ -140,34 +139,29 @@ stderr, with exit code `1`.
|
|
|
140
139
|
|
|
141
140
|
## `dirsql init`
|
|
142
141
|
|
|
143
|
-
|
|
144
|
-
directory. The generated config contains only filesystem-fact tables
|
|
145
|
-
(`[[table]]` entries whose columns come from [glob captures and virtual
|
|
146
|
-
columns](./columns.md)) — never content-derived columns.
|
|
142
|
+
Writes a starter `.dirsql.toml`:
|
|
147
143
|
|
|
148
144
|
```bash
|
|
149
145
|
dirsql init
|
|
150
146
|
```
|
|
151
147
|
|
|
148
|
+
You can further tweak this config as needed.
|
|
149
|
+
|
|
152
150
|
### Flags
|
|
153
151
|
|
|
154
152
|
| Flag | Default | Description |
|
|
155
153
|
|---|---|---|
|
|
156
|
-
| `--root <path>` | current directory | Directory
|
|
157
|
-
| `--output <path>` | `<root>/.dirsql.toml` | Where to write the
|
|
154
|
+
| `--root <path>` | current directory | Directory the default `--output` path is resolved against. |
|
|
155
|
+
| `--output <path>` | `<root>/.dirsql.toml` | Where to write the config. |
|
|
158
156
|
| `--force` | off | Overwrite the output file if it already exists. |
|
|
159
157
|
|
|
160
158
|
### Requirements and failure modes
|
|
161
159
|
|
|
162
|
-
`init` requires `claude` on `PATH`, signed in; there is no separate API key.
|
|
163
160
|
All failures exit `1` with a message on stderr:
|
|
164
161
|
|
|
165
162
|
| Condition | Behavior |
|
|
166
163
|
|---|---|
|
|
167
|
-
| Output file exists and `--force` not passed | Fails
|
|
168
|
-
|
|
|
169
|
-
| `claude` exits non-zero | Fails with `claude`'s stderr; no partial config is written. |
|
|
170
|
-
| `claude` produces non-UTF-8 output | Fails; nothing is written. |
|
|
164
|
+
| Output file exists and `--force` not passed | Fails; nothing is written. |
|
|
165
|
+
| Output path unwritable (e.g. missing parent directory) | Fails with the underlying I/O error. |
|
|
171
166
|
|
|
172
|
-
On success, `
|
|
173
|
-
`init` exits `0`.
|
|
167
|
+
On success, `init` exits `0`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dirsql",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.79",
|
|
4
4
|
"description": "Ephemeral SQL index over a local directory",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/dirsql",
|
|
@@ -230,15 +230,15 @@
|
|
|
230
230
|
]
|
|
231
231
|
},
|
|
232
232
|
"optionalDependencies": {
|
|
233
|
-
"@dirsql/lib-linux-x64-gnu": "0.3.
|
|
234
|
-
"@dirsql/lib-linux-arm64-gnu": "0.3.
|
|
235
|
-
"@dirsql/lib-darwin-x64": "0.3.
|
|
236
|
-
"@dirsql/lib-darwin-arm64": "0.3.
|
|
237
|
-
"@dirsql/lib-win32-x64-msvc": "0.3.
|
|
238
|
-
"@dirsql/cli-linux-x64-gnu": "0.3.
|
|
239
|
-
"@dirsql/cli-linux-arm64-gnu": "0.3.
|
|
240
|
-
"@dirsql/cli-darwin-x64": "0.3.
|
|
241
|
-
"@dirsql/cli-darwin-arm64": "0.3.
|
|
242
|
-
"@dirsql/cli-win32-x64-msvc": "0.3.
|
|
233
|
+
"@dirsql/lib-linux-x64-gnu": "0.3.79",
|
|
234
|
+
"@dirsql/lib-linux-arm64-gnu": "0.3.79",
|
|
235
|
+
"@dirsql/lib-darwin-x64": "0.3.79",
|
|
236
|
+
"@dirsql/lib-darwin-arm64": "0.3.79",
|
|
237
|
+
"@dirsql/lib-win32-x64-msvc": "0.3.79",
|
|
238
|
+
"@dirsql/cli-linux-x64-gnu": "0.3.79",
|
|
239
|
+
"@dirsql/cli-linux-arm64-gnu": "0.3.79",
|
|
240
|
+
"@dirsql/cli-darwin-x64": "0.3.79",
|
|
241
|
+
"@dirsql/cli-darwin-arm64": "0.3.79",
|
|
242
|
+
"@dirsql/cli-win32-x64-msvc": "0.3.79"
|
|
243
243
|
}
|
|
244
244
|
}
|