/neo4j-skills:neo4j-cli-tools-skillfrom neo4j-skills
Provides guidance on Neo4j CLI tools: neo4j-cli (Cypher, schema, Aura, Docker, credentials), neo4j-admin (backup, restore, import), cypher-shell (ad-hoc queries, CI/CD), and neo4j-mcp (MCP server install).
Ships in neo4j-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
neo4j-cli (preferred)neo4j-admincypher-shellneo4j-mcprelate pull / relate push (see relate)neo4j-cypher-skillneo4j-migration-skillneo4j-getting-started-skillModern unified CLI. Bolt-native Cypher, schema inspection, Aura management, local Docker, credential storage, agent skill catalog install. Single binary — no Java required.
Install:
curl -sSfL https://neo4j.sh/install.sh | bash # recommended
brew install neo4j-labs/tap/neo4j-cli # Homebrew
pip install neo4j-cli / pipx install neo4j-cli # PyPI
npm i -g @neo4j-labs/cli # npm
Self-update: neo4j-cli update (also refreshes installed skills automatically)
Key subcommands:
| Subcommand | Purpose |
|---|---|
neo4j-cli query [cypher] | Run Cypher via Bolt — auto-rewrites HTTP URIs |
neo4j-cli query :schema | Inspect labels, rel types, indexes, constraints |
neo4j-cli query :embed [text] | Compute embedding vector standalone |
neo4j-cli aura instance ... | Provision and manage Aura instances |
neo4j-cli aura agent ... | Manage Aura Agents (list/get/create/invoke) |
neo4j-cli docker create/start/stop/delete | Manage local Neo4j Docker containers |
neo4j-cli credential aura-client ... | Store Aura API credentials |
neo4j-cli credential dbms ... | Store Neo4j connection profiles (URI + auth) |
neo4j-cli credential embed ... | Store embedding provider credentials |
neo4j-cli skill install [skill-name] | Install self-skill or any catalog skill |
neo4j-cli skill list / check / remove | Manage installed agent skills |
neo4j-cli update | Self-update binary + refresh installed skills |
Key patterns:
# Schema-first workflow: always inspect schema before writing Cypher
neo4j-cli query :schema --format toon
# Run Cypher (bolt URIs auto-rewritten; HTTP URIs rewritten to Bolt)
neo4j-cli query "MATCH (n:Person) RETURN n.name LIMIT 5" \
--uri neo4j+s://xxx.databases.neo4j.io --username neo4j --password $PASS
# Inline embedding parameter (text → vector; $q bound to []float32)
neo4j-cli query "MATCH (c) SEARCH c IN (VECTOR INDEX chunk_embedding FOR \$q LIMIT 5) SCORE AS score RETURN c.text, score" \
--param q:embed="graph database performance"
# Store a connection profile, then query without flags
neo4j-cli credential dbms add --name prod \
--uri neo4j+s://xxx.databases.neo4j.io --username neo4j --password $PASS
neo4j-cli query --credential prod "MATCH (n) RETURN count(n)"
# Local Docker: persistent or ephemeral
neo4j-cli docker create --name dev --wait --rw
neo4j-cli query --credential dev 'RETURN 1 AS n'
neo4j-cli docker create --name tmp --ephemeral --env-out-file /tmp/n.env --wait --rw
neo4j-cli query --env /tmp/n.env 'RETURN 1 AS n'
# Install skills from catalog (neo4j/agent-skills)
neo4j-cli skill install # self-skill into all detected agents
neo4j-cli skill install neo4j-cypher-skill # one catalog skill, all agents
neo4j-cli skill install --all # self-skill + every catalog skill
neo4j-cli skill install --agent claude-code # scope to one agent
neo4j-cli skill check # detect drift after upgrades
Agent output: Always use --format toon — ~40% fewer tokens than JSON. Set as default: neo4j-cli config set format toon.
Write gate: Write operations require --rw under agent harnesses. Do NOT add it preemptively — if a command fails with "this command writes; pass --rw to allow it", surface the error and ask the user once.
Async operations: instance create/resize/destroy and docker create accept --wait to block until terminal state.
Credentials precedence: flag > OS env (NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD, NEO4J_DATABASE) > .env walk-up > stored credential. OS env vars are ignored by default — read only when accept-env-vars is enabled (neo4j-cli config set accept-env-vars true --rw or NEO4J_CLI_ACCEPT_ENV_VARS=1); otherwise a stored credential is used silently. Prefer --uri/--username/--password, --env <file> or --credential <name>.
Supported agents: Claude Code, Cursor, Windsurf, Copilot, Gemini CLI, Antigravity CLI, Cline, Codex, OpenCode, Junie, and more. Antigravity: skills land in ~/.gemini/antigravity/skills.
Full reference: neo4j-cli skill install keeps an always-in-sync skill in your agent.
Included with Neo4j. Backup, restore, dump/load, CSV import, memory sizing, password reset. Run as Neo4j system user.
Reference: neo4j-admin-reference.md
Interactive Cypher REPL. Requires Java 21. Included with Neo4j. Use for ad-hoc queries, file-based batch scripting, CI/CD pipelines.
Reference: cypher-shell-reference.md
Legacy Aura cloud CLI. Prefer neo4j-cli aura for new work — covers all aura-cli operations plus credential storage, Docker, and agent skills.
Reference: aura-cli-reference.md
MCP server for AI agent integration. For full install + editor config → use neo4j-mcp-skill (covers Claude Code, Desktop, Cursor, Windsurf, VS Code, Kiro, stdio vs HTTP transport, troubleshooting).
pip install neo4j-mcp-server && neo4j-mcp-server -v # PyPI: command is neo4j-mcp-server
brew install neo4j-mcp && neo4j-mcp -v # Homebrew: command is neo4j-mcp
Server 2.0.0 (2026-10-28) accepts only NEO4J_MCP_* env vars and unprefixed flags (--uri, --database); STDIO requires NEO4J_MCP_DATABASE. See CHANGELOG.
Reference: neo4j-mcp-reference.md
Embedded in-memory Cypher graph database, single binary. A Neo4j product; but not a replacement for a Neo4j server. Single process, one writer, graph must fit in RAM, no RBAC/clustering.
| Situation | Use |
|---|---|
| Production, concurrent writers, larger-than-RAM, HA, RBAC, GDS, Aura | Neo4j (this skill's other tools) |
| Offline test fixtures, sandbox analytics, single-agent local memory, edge/WASM | relate |
Full matrix: neo4j-getting-started-skill → references/choose-engine.md.
curl -sSfL https://relatedb.ai/install.sh | bash # CLI
npx skills add https://relatedb.ai --skill relate # relate skill; --skill required (else installs all six)
# Neo4j/Aura slice → local file (needs neo4j.env: NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD)
relate pull --from neo4j.env --query 'MATCH (p:Person)-[r]-() RETURN p, r LIMIT 500' --database ./slice.rl
# local file → Neo4j/Aura: dry-run first, confirm with user before the real push
relate push --to neo4j.env --database ./slice.rl --dry-run
pull skips VECTOR/FULLTEXT indexes; destination must be empty. relate CLI, Cypher-on-relate, vector, geospatial → delegate to the relate skill. Docs for agents: https://relatedb.ai/llms.txt · https://relatedb.ai/skill.md
Online backup requires Enterprise Edition. Community Edition users must use dump/load only (database must be offline).
# Database name is positional (last); there is no --database option
# Full online backup — database stays online during backup
neo4j-admin database backup --to-path=/backups/ --type=FULL neo4j
# Differential backup — only changes since last backup in the chain (faster)
neo4j-admin database backup --to-path=/backups/ --type=DIFF neo4j
# Backup to cloud storage (S3, GCS, or Azure)
neo4j-admin database backup --to-path=s3://my-bucket/neo4j-backups/ neo4j
--type = FULL / DIFF / AUTO (default AUTO: full if no chain exists). --compress defaults to true. Each run writes a <db>-<timestamp>.backup artifact file into --to-path.
AGENT GATE — destructive operation: Before running restore, show the user the exact command and target database name, and wait for explicit confirmation. A restore overwrites the existing database.
# Database name is positional; allowed only when --from-path is a single artifact
# Replace existing DB: stop it first (STOP DATABASE neo4j on system)
neo4j-admin database restore \
--from-path=/backups/neo4j-2026-01-15T10-00-00.backup \
--overwrite-destination=true \
neo4j
# Restore to a new database name (non-destructive path), then CREATE DATABASE neo4jrestored on system
neo4j-admin database restore \
--from-path=/backups/neo4j-2026-01-15T10-00-00.backup \
neo4jrestored
Use for migrations, dev/test data transfers, and Community Edition backups.
# Dump — database must be stopped (dump of a running DB fails); writes /exports/neo4j.dump
neo4j-admin database dump --to-path=/exports/ neo4j
# Load — --from-path is a DIRECTORY; looks for <database>.dump; database name positional
neo4j-admin database load \
--from-path=/exports/ \
--overwrite-destination=true \
neo4j
AGENT GATE — destructive operation: Before running load with --overwrite-destination=true, confirm target database name and path with the user.
| Flag | Notes |
|---|---|
--compress | Compress backup artifact (default true) |
--type=FULL|DIFF|AUTO | Backup type; default AUTO |
--to-path | Directory: local path or s3://, gs://, azb:// |
--overwrite-destination=true | Required if target database already exists; target must be stopped |
--restore-until | Restore chain up to a transaction ID or UTC timestamp |
<db>-<timestamp>.backup; keep one chain per --to-path directory--from-path at a differential artifact replays the whole chain (full + differentials up to it). Never run separate overwrite restores per artifact — each replaces the DB.# Restore Sunday full + Monday + Tuesday differentials: point at Tuesday's artifact
neo4j-admin database restore \
--from-path=/backups/neo4j-2026-01-21T02-00-00.backup \
--overwrite-destination=true neo4j
# Point-in-time: stop replay at a UTC timestamp (or transaction ID: --restore-until=123)
neo4j-admin database restore \
--from-path=/backups/neo4j-2026-01-21T02-00-00.backup \
--restore-until="2026-01-21 01:30:00" \
--overwrite-destination=true neo4j
NEO4J_URI / NEO4J_ADDRESS — connection URINEO4J_USERNAME / NEO4J_PASSWORD / NEO4J_DATABASENEO4J_CONF — path to neo4j.conf directoryNEO4J_HOME — Neo4j installation directoryPrecedence: flags > env vars > config files. neo4j-cli uses its own credential store — see neo4j-cli credential dbms.
neo4j-cli skill install run after install or upgrade (keeps skill in sync)credential dbms; not hardcoded--format toon for agent-facing neo4j-cli outputSHOW INDEXES + countWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
neo4j-cli, neo4j-admin, cypher-shell, neo4j-mcp, database-tools
30 skills in this plugin
/neo4j-agent-memory-skillAuthoritative reference for the neo4j-agent-memory Python package — a graph-native memory system for AI agents built on Neo4j — and for the hosted service (NAMS) at memory.neo4jlabs.com. Use this skill whenever the user mentions neo4j-agent-memory, agent memory with Neo4j, context graphs, the POLE+O model, MemoryClient/MemorySettings, the memory MCP server, or any of the framework integrations (LangChain, PydanticAI, CrewAI, AWS Strands, Google ADK, Microsoft Agent Framework, OpenAI Agents, LlamaIndex). Also use when the user mentions the hosted service at memory.neo4jlabs.com, NAMS, the Neo4j Agent Memory Service, the `nams_` API key prefix, or the hosted MCP endpoint. Also use when writing documentation, blog posts, tutorials, PRDs, or code samples for the project, when comparing agent memory approaches, or when positioning graph-native memory against vector-only approaches — even if the user doesn't explicitly name the package. Does NOT handle GraphRAG pipelines — use neo4j-graphrag-skill./neo4j-aura-agent-skillManages Neo4j Aura Agents via the v2beta1 REST API — create, list, get, update, delete, and invoke Aura agents backed by an AuraDB instance. Use when configuring Aura Agent tools (CypherTemplate, SimilaritySearch, Text2Cypher), setting system prompts, deploying agents to REST or MCP endpoints, invoking agents with natural language queries, or generating evaluation datasets (max 50 questions) for the Aura Agent evaluation feature. Covers OAuth2 auth, organization/project scoping, tool parameter schemas, and InvokeAgentResponse format. Does NOT cover AuraDB instance provisioning — use neo4j-aura-provisioning-skill. Does NOT cover vector index creation — use neo4j-vector-index-skill./neo4j-aura-graph-analytics-skillServerless Aura Graph Analytics (AGA) GDS Sessions — covers GdsSessions, AuraGraphDataScience, AuraAPICredentials, DbmsConnectionInfo, SessionMemory, get_or_create, remote graph projection with gds.graph.project.cypher and gds.graph.project.remote, gds.graph.project.native, gds.graph.construct, graphdatascience client 2.0 session endpoints, async compute and gds.jobs, AuraDB Cypher API memory/sessionId projection, algorithms, write-back, and session lifecycle. Use for AuraDB-connected, self-managed Neo4j, or standalone DataFrame/Spark session workloads. Does NOT cover the embedded GDS plugin on Aura Pro or self-managed Neo4j — use neo4j-gds-skill. Does NOT handle Cypher authoring — use neo4j-cypher-skill. Does NOT cover Snowflake Graph Analytics — use neo4j-snowflake-graph-analytics-skill./neo4j-aura-provisioning-skillProvisions and manages Neo4j Aura instances via CLI (aura-cli v1.7+) or REST API. Use when creating, pausing, resuming, resizing, or deleting AuraDB Free/Professional/Business Critical/VDC instances; downloading credentials; scripting CI/CD pipelines; polling async status; or using the Terraform neo4j-labs/neo4jaura provider. Covers auth setup (client credentials OAuth2), credential lifecycle (download once — never recoverable), instance type selection, region codes, and Python provisioning scripts. Does NOT handle Cypher queries — use neo4j-cypher-skill. Does NOT cover Graph Data Science algorithms — use neo4j-gds-skill or neo4j-aura-graph-analytics-skill. Does NOT cover neo4j-admin/cypher-shell — use neo4j-cli-tools-skill./neo4j-cypher-skillGenerates, optimizes, and validates Cypher 25 queries for Neo4j 2025.x and 2026.x. Use when writing new Cypher queries, optimizing slow queries, graph pattern matching, vector or fulltext search, subqueries, or batch writes. Covers MATCH, MERGE, CREATE, WITH, RETURN, CALL, UNWIND, FOREACH, LOAD CSV, SEARCH, expressions, functions, indexes, and subqueries. Does NOT handle driver migration or API changes — use neo4j-migration-skill. Does NOT cover DB administration or server ops — use neo4j-cli-tools-skill. Does NOT cover Cypher on the relate embedded engine — use the relate skill./neo4j-document-import-skillIngests unstructured and semi-structured documents into Neo4j as a knowledge graph. Use when chunking PDFs, HTML, plain text, or Markdown; extracting entities and relationships from text with an LLM (SimpleKGPipeline, neo4j-graphrag); loading JSON via apoc.load.json; building Document→Chunk→Entity graph structures; or connecting LangChain/LlamaIndex document loaders to Neo4j. Covers neo4j-graphrag SimpleKGPipeline, LLM Graph Builder web UI, entity resolution, chunking strategies, and graph schema design for RAG pipelines. Does NOT handle structured CSV/relational import — use neo4j-import-skill. Does NOT handle GraphRAG retrieval after ingestion — use neo4j-graphrag-skill. Does NOT handle vector index creation — use neo4j-vector-index-skill.npx claudepluginhub neo4j/agent-skills --plugin neo4j-skillsOther plugins' skills for the same job