Launch Neo4j shell commands through the HTTP REST interface.
You have to set the environment variable GRAPHENEDB_URL
with the URL of your Neo4j database. For example:
$ export GRAPHENEDB_URL="http://MyUser:[email protected]:12345"
Now, you can launch commands:
$ ./neo4j-shell help
Available commands: alias begin cd commit create cypher dbinfo drop dump env explain export gsh help index jsh load ls man match merge mknode mkrel mv optional paths planner profile pwd return rm rmnode rmrel rollback schema set start trav unwind using with
Use man <command> for info about each command.
$ ./neo4j-shell "man schema"
Accesses db schema. Usage: schema <action> <options...>
Listing indexes
schema ls
schema ls -l :Person
Sample indexes all indexes
schema sample -a
Sample a specific index
schema sample -l :Person -p name
Force a sampling of a specific index
schema sample -f -l :Person -p name
Awaiting indexes to come online
schema await -l Person -p name.
-a Used together with schema sample to indicate that all indexes should be sampled.
-f Used together with schema sample to force indexes to be sampled.
-l Specifies which label selected operation is about.
-p Specifies which property selected operation is about.
-v Verbose output of failure descriptions etc.
$ ./neo4j-shell 'match (n) where n.a < 2000 return n;'
+-----------------+
| n |
+-----------------+
| Node[0]{a:1000} |
| Node[2]{a:500} |
+-----------------+
2 rows
63 ms
$ ./neo4j-shell dump
begin
create (_0 {`a`:1000})
create (_1 {`a`:3300})
create (_2 {`a`:500})
;