Thanks for your interest in contributing! This workspace is part of the Gobby suite.
git clone https://github.com/GobbyAI/gobby-cli.git
cd gobby-cli
cargo build --workspace --no-default-features
cargo test --workspace --no-default-featuresThe rust-toolchain.toml ensures you have the right toolchain and components (clippy, rustfmt) installed automatically. The --no-default-features flag skips the gcode embeddings feature which requires cmake.
cargo build --workspace # Full build (gcode embeddings require cmake)
cargo build --workspace --no-default-features # Build without embeddings
cargo build -p gobby-code # gcode only
cargo build -p gobby-squeeze # gsqz onlycargo test --workspace # All tests
cargo test --workspace --no-default-features # All tests (without embeddings)
cargo test -p gobby-code --no-default-features # gcode tests only
cargo test -p gobby-squeeze # gsqz tests only
cargo clippy --workspace -- -D warnings # Lint
cargo fmt --all --check # Check formattingAll PRs must pass CI (fmt, clippy, tests) before merging.
crates/
gcode/ — AST-aware code search (heavy: tree-sitter, SQLite, opt-level=3)
src/
main.rs — CLI entry point, command dispatch
config.rs — Runtime context resolution, service configs
db.rs — SQLite connection helpers
models.rs — Data types: Symbol, IndexedFile, SearchResult, etc.
secrets.rs — Fernet decryption for Gobby secrets
neo4j.rs — Neo4j HTTP client for graph queries
commands/ — Subcommand handlers (init, index, search, graph, etc.)
index/ — Indexing pipeline (walker, parser, chunker, hasher, indexer)
search/ — Search pipeline (FTS5, semantic, graph_boost, RRF)
gsqz/ — Output compressor (tiny: regex, opt-level="z")
src/
main.rs — CLI entry point, command execution, ANSI stripping
config.rs — Layered config loading, step deserialization
compressor.rs — Pipeline matching, step orchestration, thresholds
daemon.rs — Optional gobby daemon HTTP integration
primitives/ — filter, group (8 modes), truncate, dedup
config.yaml — Built-in pipeline definitions (35+ pipelines)
- Add the
tree-sitter-<lang>dependency tocrates/gcode/Cargo.toml - Add a grammar entry in
src/index/languages.rsmapping file extensions to the grammar - Add query patterns in
src/index/parser.rsif the language needs custom symbol extraction - Add tests
- Document the tier in the README
- Add the variant to the
Commandenum insrc/main.rswith clap attributes - Create or extend the handler function in the appropriate
src/commands/*.rsmodule - Wire the dispatch in
main()— if the command needs to work on uninitialized projects, add it to the early-dispatch block beforeContext::resolve() - Add tests
- Document in the README and
assets/SKILL.md
Add a new entry to config.yaml:
pipelines:
my-tool:
match: '\bmy-tool\b' # Regex matched against the full command
steps:
- filter_lines:
patterns:
- '^\s*$' # Remove blank lines
- group_lines:
mode: errors_warnings
- truncate:
head: 20
tail: 10
- dedup: {}- Add the function in
src/primitives/group.rs - Add the mode name to the
group_lines()dispatcher match - Add tests
- Document in the README
- UUID5 parity with Python (gcode) — Symbol IDs must be deterministic UUID5 using namespace
c0de1de0-0000-4000-8000-000000000000. Must match the Python daemon'sSymbol.make_id()exactly. - Non-destructive to Gobby databases (gcode) — Detect and skip existing Gobby-owned databases and tables. Never alter
project.jsonor Gobby-managed schema. - Exit code 0 (gsqz) — Always exit 0. The LLM reads pass/fail from content, not exit codes.
- Keep PRs focused — one feature or fix per PR
- Add tests for new functionality
- Run
cargo clippy --workspace --no-default-features -- -D warningsbefore committing - Write clear commit messages in the format
[gobby-cli-#N] Description
Open an issue with:
- What you expected to happen
- What actually happened
- The command and output (if applicable)
- Your platform and tool version (
gcode --version/gsqz --version)
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.