CLI Reference

The nessie CLI is an npm package (@nessie-org/cli) that manages Nessie projects from the terminal. It requires Node.js 18+, Python 3.10+, and Git.

Installation
npm install -g @nessie-org/cli

There are two CLI surfaces in Nessie: the project CLI (nessie <command>) for managing the project from the terminal, and the console CLI (commands typed in the browser's console panel) for manipulating graphs at runtime. Both are documented here.

Project CLI Commands

nessie setup <folder>

Initialize a new Nessie project in the specified folder. This command:

  • Creates the directory structure (.nessie/, .venv/, core/, nessie_plugins/, my_plugins/)
  • Creates a Python virtual environment in .venv/
  • Clones nessie-api and nessie-platform from GitHub into core/ and pip-installs both
  • Shows an interactive TUI to select which official plugins to clone and install into nessie_plugins/ (all selected by default)
  • Writes .nessie/meta.json and a .gitignore
nessie setup my-project

nessie start [server]

Clone (if not already present) and start a web server. If server is omitted, an interactive TUI lists available options. If the server directory doesn't exist it is cloned from GitHub first. Any requirements.txt in the server repo is installed automatically.

nessie start             # interactive TUI selector
nessie start flask       # start Flask server on port 8000
nessie start django      # start Django server
Run from project root
All commands that require a Nessie project walk up the directory tree looking for a .nessie/ directory. Always run them from inside the project.

nessie new <plugin_name>

Scaffold a new plugin in my_plugins/ using templates fetched from GitHub. Shows an interactive TUI to select the plugin type (visualiser or datasource).

nessie new my-auth-plugin

Generated structure:

my_plugins/
└── my-auth-plugin/
    ├── my_auth_plugin/
    │   ├── __init__.py
    │   └── plugin.py
    ├── setup.py
    └── README.md

Template placeholders replaced at scaffold time:

PlaceholderReplaced withExample
{{plugin_name}}The kebab-case plugin namemy-auth-plugin
{{plugin_python_name}}The snake_case Python module namemy_auth_plugin

nessie list

List all available plugins (both nessie_plugins/ and my_plugins/) with their installed/not-installed status.

nessie list

# Output:
# 🔌 Nessie Plugins
#
# nessie_plugins/
#   nessie-auth      [installed]
#   nessie-cache     [not installed]
#
# my_plugins/
#   my-auth-plugin   [not installed]

nessie install <plugin_name>

Install a plugin into the virtual environment using pip install -e. Searches my_plugins/ first, then nessie_plugins/.

nessie install my-auth-plugin
nessie install nessie-auth

nessie remove <plugin_name>

Uninstall a plugin from the virtual environment.

nessie remove my-auth-plugin

nessie download <github_repo_url>

Clone a plugin from GitHub. URLs from github.com/Nessie-org go into nessie_plugins/; all other URLs go into my_plugins/.

# Official plugin → nessie_plugins/
nessie download https://github.com/Nessie-org/nessie-auth

# Third-party plugin → my_plugins/
nessie download https://github.com/someone/cool-plugin

nessie help

Print all available commands, servers, and plugin types.

nessie help

In-Browser Console Commands

The console panel at the bottom of the Nessie UI accepts these commands (handled by the nessie-cli plugin, parsed via a textX grammar).

create node

create node --id alice --property name = Alice --property role = Engineer;
create node --id bob --property name = Bob;

create edge

# create edge <source_id> <target_id> --id <edge_id> [--property k=v]
create edge alice bob --id e1 --property type = reports_to;

edit node

# --ch_prop: change or add a property
# --del_prop: remove a property
edit node --id alice --ch_prop role = Lead --del_prop age;

edit edge

edit edge --id e1 --ch_prop type = mentors;

delete node

# Note: fails if the node has incident edges
delete node --id alice;

delete edge

delete edge --id e1;

filter

Filter graph nodes by attribute expressions. Uses backtick-quoted expression syntax. Variables are prefixed with $.

# Single condition
filter `$role == "Engineer"`;

# Multiple conditions (AND)
filter `$_table == "employees" && $salary > 50000`;

# Numeric comparison
filter `$age >= 30`;

Supported operators: ==, !=, <, <=, >, >=, &&, ||

search

search "engineering";

drop graph

drop graph;  # removes all nodes and edges from the current workspace

clear

clear;  # clears the console output