// STRYKE-MONGO — MONGODB CLIENT FOR STRYKE // CRUD + AGGREGATION + INDEX ADMIN

stryke package · CLI launcher mongo · Rust helper stryke-mongo-helper · opt-in (kept out of stryke core)

Report GitHub Issues
// Color scheme

>_STRYKE-MONGO

Documents, one stryke pipe at a time. MongoDB client for stryke. CRUD, aggregation, index admin against any MongoDB 5.0+ standalone, replica set, or sharded cluster. Opt-in package.

Install

# build the helper binary, install as a stryke package
cd ~/projects/stryke-mongo
cargo build --release
s pkg install -g .

# one-liner
make install

# verify
mongo --help

After install, mongo --help works from anywhere on PATH (assuming ~/.stryke/bin/ is on PATH). The stryke library is auto-discoverable to any project that depends on the package via [deps] mongo = { path = "..." } or, when published, by name.

CLI: mongo

find documentsmongo find users --filter '{"active":true}'
insert NDJSON pipecat events.ndjson | mongo insert events
aggregation pipelinemongo agg orders '[{"$match":{"status":"new"}},{"$group":{"_id":"$user","n":{"$sum":1}}}]'
create an indexmongo index create users '{"email":1}' --unique
list collectionsmongo collections list

The full flag matrix lives in the README "CLI" section.

Why a package, not a builtin

Official mongodb Rust crate. Designed for piping documents in/out as NDJSON to feed other stryke or shell tools.

The stryke side is a thin NDJSON-pipe wrapper; the heavy code lives in the stryke-mongo-helper sidecar binary and is loaded on demand. Core stryke is never linked against this package's deps.

Helper protocol

The stryke-mongo-helper sidecar speaks newline-delimited JSON over stdin/stdout. The stryke library shells out per call and pipes structured data both ways. This keeps stryke startup small while making the package's surface area available on demand.

# manual invocation (debugging only)
echo '{"op":"version"}' | stryke-mongo-helper

Layout

stryke-mongo/
├── Cargo.toml             # bin = stryke-mongo-helper (publish = false)
├── src/
│   └── main.rs           # helper binary entry point
├── lib/                   # stryke .stk wrapper(s)
├── stryke.toml            # stryke package manifest
├── t/                     # zunit-style tests
├── examples/              # runnable .stk examples
├── Makefile               # `make install` builds + installs
└── docs/                  # this site (GitHub Pages)

Sibling packages

Part of the stryke connector family. Browse the others via the MenkeTechnologiesMeta umbrella repo (Tier 2):