Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Releases: nicolewhite/cycli

cycli 0.7.0

29 Jan 23:33
Compare
Choose a tag to compare

Bolt

You can now use cycli with Bolt—Neo4j's new binary protocol—thanks to Nigel! You'll need to install:

Bolt support is still in its alpha stage. For example, it does not yet support authentication.

Better Autocomplete

Autocomplete has received several improvements. Most notably, the autocomplete menu will no longer disengage when you get to an underscore _ in a relationship name.

pic

It also stays on when using spaces inside backticks:

pic

Both of the above improvements apply to labels, relationship types, and property keys.

Better CSVs

Non-numerics are now wrapped in double quotes when written to .csv files. Woops.

Better Syntax Highlighting

A few bugs in the syntax highlighting with different combinations of nodes, relationships, and arrows have been fixed.

cycli 0.6.0

10 Jan 22:53
Compare
Choose a tag to compare

New Features

save-csv

Prepend a query with save-csv to save the query results to a CSV file in the current working directory.

> save-csv MATCH (p:Person)-[:ACTED_IN]->(m:Movie)
WHERE p.name = "Tom Hanks"
RETURN m.title, m.released;
    | m.title                | m.released
----+------------------------+------------
  1 | Charlie Wilson's War   |       2007
  2 | The Polar Express      |       2004
  3 | A League of Their Own  |       1992
  4 | Cast Away              |       2000
  5 | Apollo 13              |       1995
  6 | The Green Mile         |       1999
  7 | The Da Vinci Code      |       2006
  8 | Cloud Atlas            |       2012
  9 | That Thing You Do      |       1996
 10 | Joe Versus the Volcano |       1990
 11 | Sleepless in Seattle   |       1993
 12 | You've Got Mail        |       1998

22 ms
> quit
Goodbye!
$ ls *.csv
cycli 2016-01-22 at 11.02.27 AM.csv
$ cat cycli\ 2016-01-22\ at\ 11.02.27\ AM.csv 
m.title,m.released
Charlie Wilson's War,2007
The Polar Express,2004
A League of Their Own,1992
Cast Away,2000
Apollo 13,1995
The Green Mile,1999
The Da Vinci Code,2006
Cloud Atlas,2012
That Thing You Do,1996
Joe Versus the Volcano,1990
Sleepless in Seattle,1993
You've Got Mail,1998

cycli 0.5.0

02 Dec 19:06
Compare
Choose a tag to compare

Parameters

Export parameters with export key=value.

> export name="Tom Hanks"
> export year=2005
> env
name=Tom Hanks
year=2005
> MATCH (p:Person {name:{name}})-[:ACTED_IN]->(m:Movie)
WHERE m.released > {year}
RETURN m.title, m.released;
   | m.title              | m.released
---+----------------------+------------
 1 | Charlie Wilson's War |       2007
 2 | Cloud Atlas          |       2012
 3 | The Da Vinci Code    |       2006

12 ms
> export names=["Kevin Bacon", "Tom Hanks"]
> MATCH (p:Person) WHERE p.name IN {names} RETURN p;
   | p                                           
---+----------------------------------------------
 1 | (n189:Person {born:1958,name:"Kevin Bacon"})
 2 | (n241:Person {born:1956,name:"Tom Hanks"})  

13 ms
> export col=[1,2,3]
> UNWIND {col} AS i
RETURN i;
   | i
---+---
 1 | 1
 2 | 2
 3 | 3

12 ms
> export map={"name":"Nicole", "age":24}
> env
col=[1, 2, 3]
name=Tom Hanks
names=['Kevin Bacon', 'Tom Hanks']
map={'age': 24, 'name': 'Nicole'}
year=1980
> UNWIND {map} AS row
RETURN row.name, row.age;
   | row.name | row.age
---+----------+---------
 1 | Nicole   |      24

20 ms
> export fancy=[x ** 2 for x in range(5)]
> env["fancy"]
[0, 1, 4, 9, 16]

cycli 0.4.0

19 Oct 17:39
Compare
Choose a tag to compare

New Features

Query history is saved to ~/.cycli_history.

cycli 0.3.0

13 Sep 22:22
Compare
Choose a tag to compare

New Features

Schema Keywords

New keywords schema, schema-labels, schema-rels, schema-indexes, and schema-constraints display schema information.

run-n

New keyword run-n allows you to run a Cypher query n times.

Read Only Mode

Starting cycli with the -r or --read-only flag will start it in read-only mode. Any queries that make updates--queries that have the keywords CREATE, MERGE, SET, DELETE, REMOVE, or DROP--will not be run.

cycli 0.2.0

15 Aug 19:40
Compare
Choose a tag to compare

New Features

Logging

Log each query and its results to a file with the -l or --logfile option.

cycli -l output.txt

Execute Files

Execute semicolon-separated Cypher queries from a file with the -f or --filename option.

cycli -f queries.txt

This can be combined with logging.

cycli -f queries.txt -l output.txt

Passwords

Passwords can now be passed in with the -p option.

cycli -u neo4j -p password

The -u option can still be used by itself, where you will then be prompted for a password.

cycli -u neo4j

Matching Character Insert

Typing a (, [, {, ', or " will automatically insert a corresponding closing version of that character to the right of your cursor.

Rainbows

You are now greeted with this:

rainbow

Breaking Changes

The port is now passed in with the -P option, where it had been previously passed in with the -p option. The -p option has been repurposed for passwords.

Update

If you already have cycli installed:

pip install cycli --upgrade

Otherwise:

pip install cycli