ktx/examples/local-warehouse/README.md

21 lines
909 B
Markdown
Raw Permalink Normal View History

2026-05-10 23:12:26 +02:00
# Local Warehouse Example
2026-05-10 23:51:24 +02:00
This example is a standalone KTX project that can be copied to a temp directory
2026-05-12 23:51:46 +02:00
and used with the local CLI. It uses the `fake` ingest adapter so it does not
require a database or external app server.
2026-05-10 23:12:26 +02:00
Run the example from the repository root after building the CLI:
```bash
2026-05-10 23:51:24 +02:00
pnpm --filter @ktx/cli run build
2026-05-10 23:12:26 +02:00
EXAMPLE_DIR="$(mktemp -d)/local-warehouse"
cp -R examples/local-warehouse "$EXAMPLE_DIR"
node packages/cli/dist/bin.js knowledge list --project-dir "$EXAMPLE_DIR"
node packages/cli/dist/bin.js sl list --project-dir "$EXAMPLE_DIR" --connection-id warehouse
node packages/cli/dist/bin.js ingest run --project-dir "$EXAMPLE_DIR" --connection-id warehouse --adapter fake --source-dir "$EXAMPLE_DIR/source"
```
The copied project creates its own Git repository on first use. Keep commands
pointed at a copy when experimenting so the checked-in example fixture stays
unchanged.