Skip to main content

Crate oy

Crate oy 

Source
Expand description

§oy

oy prepares deterministic repository evidence for audits and code-quality reviews, and finalizes the resulting Markdown/SARIF reports. The review, audit, and one-finding-fix workflows run as Agent Skills inside whichever agent the user prefers — OpenCode, Cursor, Codex, Copilot, or Gemini CLI all discover skills under .agents/skills. oy setup installs the skills; the agent executes them under its own permission model. oy does not store provider credentials. The native CLI supports Linux and macOS; Windows users should run it in WSL2.

§Start with the CLI

The command-line interface is the supported automation surface:

oy setup                    # install the oy skills under ~/.agents/skills
oy setup --workspace        # install project-local skills under .agents/skills
oy audit prepare --path .   # prepare deterministic audit evidence
oy audit finalize --run <id># write ISSUES.md or SARIF
oy review prepare main      # prepare a git-diff review
oy review finalize --run <id># write REVIEW.md
oy doctor --check           # verify the skills installation

See the getting-started guide, workflow guide, and CLI reference for the user-facing contract.

§Determinism boundary

Input collection, ordering, limits, and report rendering are deterministic. Findings are produced by the model the user’s agent runs and are not deterministic. The collector also has documented exclusions; “all chunks” does not mean every byte in a repository.

§Rust API

This crate exists primarily to keep the oy binary entrypoint small. run and err_line are public for that entrypoint and lightweight embedding, but spawning the oy executable is preferred for automation. Other modules and implementation details are private and may change without a semver-stable library API commitment.

// Arguments exclude the executable name, just like std::env::args().skip(1).
let exit_code = oy::run(vec!["doctor".into(), "--json".into()])?;
assert_eq!(exit_code, 0);

Functions§

err_line
Writes a formatted diagnostic line to standard error.
run
Runs the oy command dispatcher with arguments that exclude the executable name.