The Neocarta CLI (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/neo4j-labs/neocarta/llms.txt
Use this file to discover all available pages before exploring further.
pip install "neocarta[cli]") wraps all connector classes behind a consistent noun-verb command grammar so you can drive ingestion, run graph queries, and start the MCP server without writing Python. The CLI is designed to be agent-friendly first — stable JSON output, documented exit codes, non-interactive by default, and an agent-context introspection command for AI agents to discover capabilities at runtime.
Install
[cli] extra adds click, rich, and pydantic-settings on top of the base library. The MCP server (neocarta mcp serve) additionally needs pip install "neocarta[mcp]", and Databricks support requires pip install "neocarta[databricks]".
Global Options
These flags are accepted by the top-levelneocarta group and apply to every subcommand.
| Flag | Description |
|---|---|
--json / -j | Emit JSON on stdout. Auto-enabled when stdout is not a TTY (pipe, CI). |
--log-level [DEBUG|INFO|WARNING|ERROR] | Diagnostics verbosity on stderr. Default: INFO. |
--debug | Alias for --log-level DEBUG. Emits verbose diagnostics on stderr. |
--no-color | Suppress ANSI colors in output. NO_COLOR=1 env var also honored. |
-v / --version | Print the CLI version and exit. |
-h / --help | Show help and exit. |
Command Tree
The CLI organizes commands asneocarta <noun> <verb>. Every connector command follows the same pattern: flag overrides > environment variables > built-in defaults.
| Command | Description |
|---|---|
neocarta bigquery schema | Extract BigQuery schema metadata (Database, Schema, Table, Column) into Neo4j |
neocarta bigquery logs | Extract BigQuery query logs from INFORMATION_SCHEMA.JOBS_BY_PROJECT |
neocarta csv ingest | Load metadata from a directory of CSV files |
neocarta dataplex schema | Load BigQuery schema from the Dataplex Universal Catalog |
neocarta dataplex glossary | Load a Dataplex business glossary (Glossary, Category, BusinessTerm) |
neocarta jdbc schema | Extract schema from any JDBC-accessible database via SchemaCrawler |
neocarta osi ingest | Load an OSI YAML semantic model from a local path or HTTP(S) URL |
neocarta osi export | Export an OSI semantic model from Neo4j back to a YAML file |
neocarta query-log ingest | Parse a query-log JSON file into Query and reference nodes |
neocarta databricks tags | Load Databricks Unity Catalog governed-tag definitions |
neocarta tool <tool> | Query the semantic graph directly, mirroring every MCP server tool |
neocarta mcp serve | Start the Neocarta MCP server over stdio |
neocarta agent-context | Emit the full CLI shape as JSON for AI agents to consume |
Exit Codes
The CLI uses a closed exit-code map. Renaming a code’s meaning is a breaking change.| Exit Code | Name | Description |
|---|---|---|
0 | success | Success, including empty results |
1 | general_failure | General or unexpected failure |
2 | usage_error | Bad flag, missing required argument, or malformed input |
3 | not_found | Named resource or required index does not exist |
4 | auth_error | Missing or invalid credentials |
5 | conflict | Resource already exists or concurrent modification detected |
6 | validation_error | Input was syntactically valid but semantically rejected |
7 | rate_limited | Rate limited or quota exceeded |
8 | upstream_error | Transient upstream service failure |
124 | timeout | Operation exceeded its timeout |
In
--json mode, errors are also emitted to stdout under an { "error": {...} } envelope so agents can parse them without reading stderr. Human-readable diagnostics always go to stderr.JSON Output Format
All commands support--json output. The flag is automatically enabled when stdout is not a TTY (e.g. when piping to jq or running in CI).
Success envelope — keyed by the command name:
error key:
Tool commands (
neocarta tool *) use the tool_<tool_name> key, e.g. { "tool_list_schemas": { "count": 3, "results": [...] } }.Neo4j Connection Flags
Every connector command accepts three per-invocation overrides for the Neo4j connection. These take priority over the corresponding environment variables.| Flag | Overrides env var | Default |
|---|---|---|
--neo4j-uri | NEO4J_URI | — |
--neo4j-username | NEO4J_USERNAME | — |
--neo4j-database | NEO4J_DATABASE | neo4j |
Output Discipline
stdout — results only
Carries the command result. In JSON mode, a single top-level JSON object. In TTY mode, a short human-readable summary. Never mixes diagnostics.
stderr — diagnostics only
Carries progress spinners, log output, and error messages. Never carries the result payload. Errors appear here in human-readable form regardless of
--json mode.Agent Integration Notes
Discover the command surface
Call
neocarta agent-context once to obtain the full command tree, flags, exit codes, and recognized env vars as a single JSON document. Cache it for the duration of a session.Validate before committing
Every write-capable command supports
--dry-run, which performs zero side effects and prints the planned action as JSON. Use it to validate inputs before committing.