codeward
v0.1.0
Published
CodeWard's precommit checker for AI-agent-driven codebases: test, lint, format, security, screenshot-diff, lighthouse, and AI review — fast, cached, and scoped to what changed.
Downloads
207
Readme
codeward
CodeWard's precommit checker for AI-agent-driven codebases. Runs test, lint, format, security, screenshot-diff, lighthouse, and AI review against exactly what changed — fast, cached, and terse: a few precise, actionable lines, blockers first.
$ codeward check
2 blocker(s) 1 warning(s) 0 suggestion(s)
[BLOCKER] test: 1 test failed — FAILED tests::checkout_rejects_expired_card
[BLOCKER] security: possible AWS access key committed (src/config.ts:14)
[WARNING] lint: 3 unused imports
skipped: ai-review (requires login — run `codeward login`)Install
curl -fsSL https://codeward.ai/install.sh | shOr, if you already have Node:
npx codeward checkOr grab a binary from Releases. No Rust toolchain required.
Usage
codeward check [--json] [--skip-<rule> ...]
codeward login # email one-time code; unlocks screenshot-diff, lighthouse, ai-review
codeward logout
codeward status
codeward upgrade # enter your email, we send a Stripe checkout link — no login required
codeward init # write a starter codeward.toml
codeward install-hooks # run `codeward check` automatically on every commitcodeward check auto-detects your project (Node, Rust, Python, Go — including
your package manager and existing lint/format:check/test scripts) and
picks sensible default checks. Nothing to configure to get useful output on a
fresh repo.
Scope is the changed files: staged changes if you have any, otherwise your
full working-tree diff, otherwise the diff against the repo's default branch.
Any rule — built-in or one you define in codeward.toml — can be skipped ad
hoc:
codeward check --skip-test --skip-lintConfiguration
Drop a codeward.toml anywhere from your repo root upward (codeward init
writes a starter with every option commented out):
[checks.test]
enabled = true
command = "npm test" # override the auto-detected command
[checks.screenshot]
enabled = true
command = "npm run screenshots:check" # paid checks need an explicit command
[scope]
base = "origin/main" # branch to diff against when nothing is staged
[cache]
enabled = trueDevelopment
cargo test
cargo clippy --all-targets -- -D warnings
cargo fmt --check
cargo audit # cargo install cargo-audit, if you don't have it yetOne-time setup: git config core.hooksPath .githooks points git at this repo's own
commit-msg hook, which runs all four of the above (plus a conventional-commit
subject check: <type>(<scope>): <description>) on every commit — Rust doesn't have
an npm-style prepare script to do this automatically. Each check is individually
skippable with a SKIP_<NAME>=<reason> line in the commit message (SKIP_CONVENTIONAL,
SKIP_FORMAT, SKIP_LINT, SKIP_TESTS, SKIP_SECURITY).
Releases are cut by pushing a vX.Y.Z tag; CI cross-builds and publishes
binaries for Linux/macOS/Windows (x86_64 + aarch64) to GitHub Releases, then
publishes the codeward npm package (which downloads the matching binary on
install) once that finishes.
