@qaecy/cue-cli
v0.0.51
Published
Cue CLI for QAECY platform
Readme
Cue CLI tool
The CLI tool lets you sync a local folder to Cue or compare a local folder's content to that on Cue.
Use
Pre-steps
You need an API key in order to authenticate with the CLI tool.
- Go to your profile page and create an API key.
- Save the value in the environment variable
CUE_API_KEYon your system*
- You can also specify it using the
--keyflag but it is more convenient and safe to use an environment variable.
What commands?
- Run
npx @qaecy/cue-cli --helpto list all supported commands. - Use the
--helpflag on any command to see all supported flags on that command (eg.npx @qaecy/cue-cli sync --help)
Sync a folder
To sync the current dir to the space with id <space-id> under the provider id d_drive (provider id is used to distinguish different document sources and if none is provided the default provider is used). The v-flag is for verbose logging so we can follow the progress.
npx @qaecy/cue-cli sync -s <space-id> -p . --provider d_drive -v
Sync command options
| Option | Description | Default |
|-----------------------|------------------------------------------------------------------------------------------------------|--------------|
| -s, --space <id> | Specify the space ID (required) | N/A |
| -p, --path <id> | Specify the folder path to sync (required) | N/A |
| -k, --key <api-key> | Specify the API key (or set CUE_API_KEY env variable) | N/A |
| --provider <id> | Specify the provider ID (e.g., sharepoint, drive, dropbox). Leave empty for default provider | "" |
| -v, --verbose | Enable verbose output | false |
| -e, --emulators | Use emulators for sync | false |
| -z, --zip | Include zipped content. Will be unzipped to <zip_path>_unzipped. Max uncompressed size: 500 MB, max recursion depth: 3. Cleans up unzipped files after sync. | false |
| --legacy | Write RDF metadata as serialised Turtle BLOBs to the processed storage bucket instead of patching the knowledge graph directly. Use this when the ledger and graph services are not yet available for the target environment. | false |
| --metadata-only | Push filesystem-structure metadata for every local file directly to the commands API, without checking what is already on the remote, running a credit estimate, or uploading any file content. Useful for repairing missing graph metadata after a migration or interrupted sync. Can be combined with --legacy to write the metadata as BLOBs. | false |
app-builder-tools
A set of JSON-output commands designed for agent-assisted Cue app development. All sub-commands accept -k/--key (or CUE_API_KEY), -e/--emulators, and -v/--verbose.
list-projects
List all projects accessible to the authenticated user.
npx @qaecy/cue-cli app-builder-tools list-projects
Outputs a JSON array with id, name, organizationID, isPublic, graphType, and lastSync for each project.
entity-summary-graph
Fetch the entity category relationship summary graph for a project — useful for understanding the knowledge graph schema before writing queries.
npx @qaecy/cue-cli app-builder-tools entity-summary-graph -s <project-id>
| Option | Description | Default |
|----------------------|----------------------------------------------------------------------------------------------|---------|
| -s, --space <id> | Project ID (required) | N/A |
| -f, --format <fmt> | Output format: md (aligned text table), graph (JSON nodes + weighted edges), json (raw SPARQL result) | md |
| --entity <iri> | Filter to the one-hop neighbourhood of this category IRI (prefixed, e.g. qcy-e:Building, or full URL) | N/A |
sparql
Execute a SPARQL SELECT query against a project triplestore. The query can be passed inline or piped via stdin. Outputs raw SPARQL JSON results.
npx @qaecy/cue-cli app-builder-tools sparql -s <project-id> -q "SELECT * WHERE { ?s ?p ?o } LIMIT 10"
echo "SELECT * WHERE { ?s ?p ?o } LIMIT 10" | npx @qaecy/cue-cli app-builder-tools sparql -s <project-id>
| Option | Description | Default |
|---------------------|-----------------------------------------------------------|---------|
| -s, --space <id> | Project ID (required) | N/A |
| -q, --query <sparql> | SPARQL query string (or pipe query via stdin) | N/A |
mcp
Call any Cue Index MCP data tool (search, lookup, traverse, combine, select, schema, inspect) and print the returned Context. The tool's markdown snippet is rendered to the terminal — headings, lists, tables, inline code and blockquotes — inside a titled box wrapped to the terminal width; pass --json for the raw result instead.
npx @qaecy/cue-cli mcp schema -s <space-id> -a '{"mode":"overview"}'
npx @qaecy/cue-cli mcp search -s <space-id> -a '{"input":"concrete"}'
npx @qaecy/cue-cli mcp lookup -s <space-id> -a '{"input":"qcy-e:DesignDocument"}'
npx @qaecy/cue-cli mcp inspect -s <space-id> -a '{"ctx":"<ctx-id>","page":1,"details":"high"}'
The first argument is the tool name; --args carries that tool's parameters as a JSON object. --space is a convenience that fills space_id when it isn't already present in --args.
Options
| Option | Description | Default |
|-----------------------|------------------------------------------------------------------------------------------------------|---------|
| <tool> | Tool name (positional, required): search / lookup / traverse / combine / select / schema / inspect | N/A |
| -s, --space <id> | Project/space ID (merged into the call as space_id when not present in --args) | N/A |
| -a, --args <json> | Tool arguments as a JSON object | {} |
| -k, --key <api-key> | Specify the API key (or set CUE_API_KEY env variable) | N/A |
| -e, --emulators | Use emulators | false |
| -v, --verbose | Enable verbose output | false |
| --json | Print the raw JSON result instead of the rendered Context | false |
util-remove-rdf-star
Remove RDF-star (quoted triple) statements from an NQuads file. Supports both plain .nq and gzipped .nq.gz files. If the input is gzipped the output will also be gzipped.
npx @qaecy/cue-cli util-remove-rdf-star -i <input.nq.gz> -o <output.nq.gz> -v
Options
| Option | Description | Default |
|----------------------|-----------------------------------------|---------|
| -i, --input <path> | Input file path (.nq or .nq.gz) (required) | N/A |
| -o, --output <path>| Output file path (.nq or .nq.gz) (required) | N/A |
| -v, --verbose | Enable verbose output | false |
