@larkup/cli 0.2.0 → 0.2.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
CHANGED
|
@@ -13,8 +13,7 @@ npm install -g @larkup/cli
|
|
|
13
13
|
```bash
|
|
14
14
|
larkup init product-docs
|
|
15
15
|
larkup index ./knowledge
|
|
16
|
-
larkup
|
|
17
|
-
larkup serve
|
|
16
|
+
larkup dev
|
|
18
17
|
```
|
|
19
18
|
|
|
20
19
|
`index` accepts individual files or folders, including text, source code, CSV, JSON, PDF, and Word documents. It streams loading and indexing progress.
|
|
@@ -29,6 +28,7 @@ larkup media ./demo.mp4
|
|
|
29
28
|
## Commands
|
|
30
29
|
|
|
31
30
|
- `larkup index [sources...]` loads sources and builds the index.
|
|
31
|
+
- `larkup dev [name]` creates a workspace (default: `my-larkup`) and runs its local server.
|
|
32
32
|
- `larkup documents` manages and exports corpus documents.
|
|
33
33
|
- `larkup media [sources...]` processes image, audio, and video files.
|
|
34
34
|
- `larkup serve` runs the generated server.
|
|
@@ -178,7 +178,7 @@ async function requireDataDir() {
|
|
|
178
178
|
if (scopedServerId) {
|
|
179
179
|
throw new Error(`Server "${scopedServerId}" no longer exists.`);
|
|
180
180
|
}
|
|
181
|
-
const { server } = await createServer("
|
|
181
|
+
const { server } = await createServer("my-larkup");
|
|
182
182
|
return serverDir(server.id);
|
|
183
183
|
}
|
|
184
184
|
async function isPortFree(port) {
|
|
@@ -202,7 +202,7 @@ async function nextPort(ws) {
|
|
|
202
202
|
function defaultConfigFor(id, name, prevConfig = {}) {
|
|
203
203
|
return {
|
|
204
204
|
...DEFAULT_CONFIG,
|
|
205
|
-
projectName: name.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "my-
|
|
205
|
+
projectName: name.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "my-larkup",
|
|
206
206
|
storeConfig: { mode: "local", dbPath: relServerPath(id, "lancedb") },
|
|
207
207
|
embeddingApiKey: prevConfig.embeddingApiKey ?? DEFAULT_CONFIG.embeddingApiKey,
|
|
208
208
|
customEmbeddings: prevConfig.customEmbeddings ?? DEFAULT_CONFIG.customEmbeddings,
|