Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,16 @@ jobs:
run: |
set -e
BIN=./target/release/bitvanes
# --no-tui with no input prints help (and exits successfully).
$BIN --no-tui | head -1
# Markdown -> JSON / CSV / Arrow IPC
printf '# Hello\n\nThis is a test document.\n\nContact alice@example.com.\n' > /tmp/t.md
$BIN --no-tui -i /tmp/t.md -f markdown --scrub email -o /tmp/out.json
grep -q '"text"' /tmp/out.json
$BIN --no-tui -i /tmp/t.md -f markdown -o /tmp/out.csv
head -1 /tmp/out.csv | grep -q 'chunk_index'
$BIN --no-tui -i /tmp/t.md -f markdown -o /tmp/out.arrow
test -s /tmp/out.arrow
# JSON input
printf '{"name":"BitVanes","tags":["a","b"]}' > /tmp/t.json
$BIN --no-tui -i /tmp/t.json -o /tmp/outj.json
grep -q 'BitVanes' /tmp/outj.json
# Directory walk picks up all supported extensions
mkdir -p /tmp/docs && cp /tmp/t.md /tmp/docs/ && cp /tmp/t.json /tmp/docs/
$BIN --no-tui -i /tmp/docs/ -o /tmp/dir.json
grep -q '"chunk_index"' /tmp/dir.json
$BIN --no-tui | head -1 # help when no input
mkdir -p /tmp/docs && printf '# Hello\n\nWorld.\n' > /tmp/docs/t.md
# markdown -> JSON / CSV / Arrow
$BIN --no-tui -i /tmp/docs/t.md -f markdown -o /tmp/o.json && grep -q text /tmp/o.json
$BIN --no-tui -i /tmp/docs/t.md -o /tmp/o.csv && grep -q chunk_index /tmp/o.csv
$BIN --no-tui -i /tmp/docs/t.md -o /tmp/o.arrow && test -s /tmp/o.arrow
# dedup keys in JSON
grep -q chunk_hash /tmp/o.json
# glob
$BIN --no-tui --glob "/tmp/docs/**/*.md" -o /tmp/g.json && grep -q chunk_index /tmp/g.json
# manifest idempotency
$BIN --no-tui -i /tmp/docs --manifest /tmp/m.json -o /tmp/r1.json
$BIN --no-tui -i /tmp/docs --manifest /tmp/m.json -o /tmp/r2.json 2>&1 | grep -q "Nothing new"
17 changes: 13 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ cat /tmp/out.json

## Architecture

Headless CLI that links `bitvanes-core` via git dependency (tag `v0.1.0`).
Headless CLI that links `bitvanes-core` via path dependency (local dev) or
git tag `v0.3.0` (release).

Entry point: `src/main.rs` (clap arg parsing → dispatch to headless or TUI).
Headless: `src/headless.rs` (directory scan → rayon parallel → output).
Expand All @@ -34,19 +35,27 @@ Output formats: Arrow IPC, CSV, JSON (all from `bitvanes-core`'s `arrow_io`).
## Dependency on core

```toml
bitvanes-core = { git = "https://github.com/BitVanes/core.git", tag = "v0.1.1", features = ["ipc", "csv", "cli-pdf", "parallel"] }
bitvanes-core = { path = "../core/crates/core", features = ["ipc", "csv", "cli-pdf", "parallel"] }
# For release: git = "https://github.com/BitVanes/core.git", tag = "v0.3.0"
```

The CLI is distributed as a prebuilt binary via GitHub Releases (not published
to crates.io), so it links core via a git tag. Only `bitvanes-core` is
published to crates.io. To bump the core version, update the tag here and in
Cargo.toml.

## Features

`default = []`. The `embed` cargo feature enables `--embed` (on-device
embeddings via ONNX Runtime). It is **off by default** because linking the
prebuilt `ort` static lib needs glibc ≥ 2.38, which the Linux release runner
(ubuntu-22.04) lacks; build locally with `cargo build --features embed`.

## Release

```bash
git tag v0.1.0
git push origin v0.1.0
git tag v0.3.0
git push origin v0.3.0
```

The release workflow (.github/workflows/release.yml) builds binaries for:
Expand Down
Loading
Loading