eo4j-cliet是Neo4j的命令行shell(CLI)。它支持与Neo4j服务器的安全连接,发送语句(包括多行语句)、持久命令行历史记录以及将结果渲染成表或CSV。
eo4j-cliet 使用Bolt网络协议,并可在任何支持Bolt的服务器上工作。
环境要求:
eo4j-cliet可在GNU/Liux,MacOSX和FreeBSD平台上运行,需要eo4j3.0.0或更高版本。
eo4j-cliet的用法
Exampleiteractiveusage:
$ eo4j-cliet -u eo4j localhostThe autheticity of host 'localhost:7687' could ot be established.TLS certificate figerprit is ded0fd2e893cd0b579f47f7798e10cb68dfa2fd3bc9b3c973157da81bab451d74f9452ba99a9c5f66dadb8a360959e5ebd8abb2d7c81230841e60531a96d268.Would you like to trust this host (NO/yes/oce)? yesPassword: *****eo4j> :helpEter commads or cypher statemets at the prompt.Commads always begi with a colo (:) ad coclude at the ed of the lie,for example `:help`. Statemets do ot begi with a colo (:), may spamultiple lies, are termiated with a semi-colo (;) ad will be set tothe Neo4j server for evaluatio.Available commads::quit Exit the shell:coect '<url>' Coect to the specified URL:coect host [port] Coect to the specified host (ad optioal port):discoect Discoect the cliet from the server:export Display curretly exported parameters:export ame=val ... Export parameters for queries:uexport ame ... Uexport parameters for queries:reset Reset the sessio with the server:set Display curret optio values:set optio=value ... Set shell optios:uset optio ... Uset shell optios:status Show the cliet coectio status:help Show usage iformatio:format (table|csv) Set the output format:width (<>|auto) Set the umber of colums i the table outputFor more iformatio, see the eo4j-cliet(1) mapage.eo4j>eo4j> :statusCoected to 'eo4j://eo4j@localhost:7687'eo4j>eo4j> MATCH (:Perso) RETURN LIMIT 3;+----------------------------------------------------------------------------+| |+----------------------------------------------------------------------------+| (:Perso{bor:1964,ame:"Keau Reeves"}) || (:Perso{bor:1967,ame:"Carrie-Ae Moss"}) || (:Perso{bor:1961,ame:"Laurece Fishbure"}) |+----------------------------------------------------------------------------+eo4j>eo4j> :set echo=off // echo o-iteractive commads before rederig results isecure=o // do ot attempt to establish secure coectios format=table // set the output format (`table` or `csv`). outfile= // redirect output to a file userame="eo4j" // the default userame for coectios width=auto // the width to reder tables (`auto` for term width)eo4j>eo4j> :quit$Exampleo-iteractiveusage:
$ echo "MATCH (:Perso) RETURN .ame AS ame, .bor AS bor LIMIT 3" | \ eo4j-cliet -u eo4j -P localhost > result.csvPassword: *****$$ cat result.csv"ame","bor""Keau Reeves",1964"Carrie-Ae Moss",1967"Laurece Fishbure",1961$
评论