connect
2
总安装量
2
周安装量
#68442
全站排名
安装命令
npx skills add https://github.com/octaviopavon/cypher-shell --skill connect
Agent 安装分布
mcpjam
2
codebuddy
2
claude-code
2
junie
2
windsurf
2
zencoder
2
Skill 文档
cypher-shell Connect
Establishes and persists a Neo4j connection to ~/.neo4j-connection.
All cypher-shell plugin skills source this file before every command:
source ~/.neo4j-connection 2>/dev/null
This exports the native cypher-shell env vars â cypher-shell reads them automatically:
| Env Var | cypher-shell flag | Default |
|---|---|---|
NEO4J_URI / NEO4J_ADDRESS |
-a, --address, --uri |
neo4j://localhost:7687 |
NEO4J_USERNAME |
-u, --username |
â |
NEO4J_PASSWORD |
-p, --password |
â |
NEO4J_DATABASE |
-d, --database |
(default db) |
Interpret $ARGUMENTS
URI argument (contains ://)
- Parse the URI
- Ask user for username (default:
neo4j) and password - Optionally ask for database name
- Write config:
cat > ~/.neo4j-connection << 'EOF'
export NEO4J_URI="<uri>"
export NEO4J_USERNAME="<user>"
export NEO4J_PASSWORD="<pass>"
export NEO4J_DATABASE="<db>"
EOF
- Test:
source ~/.neo4j-connection && cypher-shell "RETURN 'connected' AS status;"
- On success, fetch server info:
source ~/.neo4j-connection && cypher-shell --format verbose "CALL dbms.components() YIELD name, versions, edition RETURN name, versions[0] AS version, edition;"
source ~/.neo4j-connection && cypher-shell --format verbose "SHOW DATABASES YIELD name, currentStatus, default RETURN name, currentStatus, default ORDER BY name;"
Report: version, edition, databases, connection URI.
test or no argument
- Check
~/.neo4j-connectionexists â if not, tell user to run/cypher-shell:connect <uri> - Source and test:
source ~/.neo4j-connection && cypher-shell "RETURN 'ok' AS status;"
- Show config (mask password): URI, user, database.
install
Detect OS:
- macOS:
brew install cypher-shell - Debian/Ubuntu:
curl -fsSL https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/neo4j.gpg && echo 'deb [signed-by=/usr/share/keyrings/neo4j.gpg] https://debian.neo4j.com stable latest' | sudo tee /etc/apt/sources.list.d/neo4j.list && sudo apt-get update && sudo apt-get install -y cypher-shell - Docker fallback:
docker run --rm -it --network host neo4j/neo4j:latest cypher-shell
Verify: cypher-shell --version. Requires Java 21+ (java -version).
Protocol Schemes
| Scheme | Encryption | Routing |
|---|---|---|
neo4j:// |
None | Yes (cluster) |
neo4j+s:// |
TLS (CA-verified) | Yes |
neo4j+ssc:// |
TLS (self-signed) | Yes |
bolt:// |
None | No (single) |
bolt+s:// |
TLS (CA-verified) | No |
bolt+ssc:// |
TLS (self-signed) | No |
Troubleshooting
- Not found ->
install - Java <21 ->
brew install openjdk@21/sudo apt install openjdk-21-jre - Connection refused -> Neo4j not running. Check:
lsof -i :7687ordocker ps | grep neo4j - Auth failure -> Reset at http://localhost:7474 or use
cypher-shell --change-password - TLS error -> Try
neo4j+ssc://(self-signed) orbolt://(no encryption) - Routing error -> Use
bolt://for single-server