npm.io
0.3.0 • Published 2d agoCLI

@polymerix-labs/dont-break-query

Licence
MIT
Version
0.3.0
Deps
1
Size
20 kB
Vulns
0
Weekly
0

@polymerix-labs/dont-break-query

JSON CLI over the dont-break structural query API, for shell scripts and CI pipelines. Results are printed as raw JSON on stdout so they compose with jq.

npx @polymerix-labs/dont-break-query arch-status

Setup

Set four environment variables (the dont-break extension's Connect your agent panel provides ready-to-copy values):

export DONT_BREAK_API_URL="https://api.dont-break.dev"
export DONT_BREAK_TOKEN="<jwt>"
export DONT_BREAK_WORKSPACE="<workspace-id>"
export DONT_BREAK_PROJECT="<project-slug>"

Configuration is environment-only by design: tokens never appear in argv, process lists, or shell history.

Commands

Command Purpose
find <name> [--kind <kind>] [--limit <n>] Resolve a name/path into graph nodes (entry point — other commands take node ids)
dependencies <node_id> [--depth <n>] What a node depends on
dependents <node_id> [--depth <n>] Who depends on a node
impact [--file <path>]... [--node <id>]... Blast radius of a change
path <from> <to> [--k <n>] Cheapest dependency routes between two nodes
do-not-touch [--scope <prefix>] Danger list: high fan-in + low stability
arch-status Practicability report + verdict

Exit codes

Code Meaning
0 Success (JSON result on stdout)
1 API or network error (JSON { error, code, status } on stderr)
2 Usage or configuration error (JSON { error } on stderr)

Examples

# Gate a CI job on architectural health
verdict=$(dont-break-query arch-status | jq -r .practicability.verdict)
[ "$verdict" != "critical" ] || { echo "architecture critical — blocking merge"; exit 1; }

# Impact of the files changed in a merge request
git diff --name-only origin/main... \
  | xargs -I{} echo --file {} \
  | xargs dont-break-query impact | jq .modules

# Refuse to touch danger-zone files
dont-break-query do-not-touch --scope src/services | jq -e 'length == 0'

All business logic (weights, caps, thresholds) lives server-side; the CLI is a pure transport built on @polymerix-labs/agents-core.

License

MIT

Keywords