Cypher Shell
$ cypher-shell Official High Riskcypher-shell connects to Neo4j instances over Bolt (bolt://, neo4j+s://) to execute Cypher queries interactively or in scripts. Passing --non-interactive and --format plain yields clean, uncolored tab/CSV-like output for automated graph inspection.
brew install cypher-shell cypher-shell streams Cypher files and queries directly over Neo4j's Bolt protocol with env-var auth and --non-interactive execution.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --non-interactive and --format plain, plus NEO4J_* env vars, but offers no --json output mode (only auto, verbose, plain).
- Supports
--non-interactiveand--format plain; lacks JSON output format
Supports TLS URI schemes (neo4j+s://), --encryption true, and env-var credentials, though there is no --read-only or --dry-run CLI flag.
- Env var auth and explicit
--encryptionflag; lacks--read-onlymode
Available via Homebrew and official archives across macOS, Linux, and Windows, but requires a JVM runtime.
- Available via
brew install cypher-shell; requires Java/JVM
Reliable official client for running .cypher scripts, schema queries, and admin commands over Bolt.
- Full Cypher and Neo4j
systemdatabase support over Bolt
First-party Neo4j tool (neo4j/cypher-shell) maintained alongside Neo4j Server.
- Official
neo4j/cypher-shellrepository
Well-documented in Neo4j Operations Manual and --help.
- Official docs at neo4j.com
Security, Auth & Guardrails
Accepts NEO4J_USERNAME, NEO4J_PASSWORD, NEO4J_URI, and NEO4J_DATABASE environment variables so secrets stay out of process arguments.
GPL-3.0 open-source CLI; Neo4j AuraDB cloud tiers incur vendor charges.
# Cypher Shell Agent Rules - Always pass `--non-interactive --format plain` and authenticate via `NEO4J_USERNAME` / `NEO4J_PASSWORD` env vars. - End Cypher statements with `;` and include `LIMIT` on exploratory `MATCH` queries. - Never run `DETACH DELETE` or `DROP DATABASE` without explicit human approval.
Agent-Ready Command Recipes
Safe Read-Only Queries
cypher-shell -a bolt://localhost:7687 --non-interactive --format plain "MATCH (n) RETURN labels(n) AS labels, count(n) AS total LIMIT 20;"
Counts node labels using NEO4J_USERNAME/NEO4J_PASSWORD env vars with plain machine-friendly formatting.
cypher-shell -a bolt://localhost:7687 -d system --non-interactive --format plain "SHOW DATABASES;"
Queries the system database for available Neo4j databases and online status.
Strengths for Agents
- +
--non-interactiveand--format plainprevent hangs and table-art clutter in scripts. - + Supports
NEO4J_USERNAME,NEO4J_PASSWORD, andNEO4J_URIenvironment variables.
Caveats & Pitfalls
- ! No
--jsonoutput option;--format plainoutputs comma/header text that requires CSV-style parsing. - ! Requires a JVM, adding noticeable startup overhead per invocation.