Command line
The querylane command gives a terminal or a script the same operations that MCP agents get: connections, database queries, jobs, runs, results and exports. It works with your profile files directly, so QueryLane does not have to be running.
Install the command
- Open Settings > CLI and MCP.
- Next to QueryLane CLI, click Install CLI. QueryLane writes a small launcher to
~/.local/bin/querylanethat starts the command with the Node.js runtime inside the app. - If
~/.local/binis not on your PATH, click Add to PATH in the Run querylane in terminal row. QueryLane adds the directory to~/.zprofilefor zsh,~/.bash_profilefor bash or a file in~/.config/fish/conf.d/for fish. - Open a new terminal window and check it with
querylane capabilities.
If you move QueryLane to another folder, the row shows Update required. Click Update CLI.
Syntax
querylane <resource> <command> [ids] [--option value] [--profile main] [--json]- IDs go after the command in order, for example
querylane runs wait <runId>. - Options use kebab-case names of the tool arguments:
--file-pathsetsfilePath. Write--option valueor--option=value. A boolean option without a value meanstrue. --profile <id>picks the storage profile. The default ismain.--file payload.json,--input-json '<json>'or--stdinpass the arguments as a JSON object. Options on the command line override its fields.--timeout <seconds>sets a wait timeout, and--step <stepId>selects a step.
Every command prints a JSON envelope with ok, data, meta and error. The output is indented by default; --json prints it on one line.
Commands
| Resource | Commands |
|---|---|
capabilities | API version, run scopes and the job authoring guide |
profiles | list |
connectors | list |
connections | list, get, validate, test, create, update, usage, delete, capabilities |
schemas | get |
db | explore, object, query, result, dispose |
packages | list |
jobs | list, get, create, export, import, delete, revisions, validate |
changes | propose, show, apply, revert |
steps | preview, test |
runs | list, get, diagnose, plan, start, wait, cancel, clear |
results | sample, check |
charts | render |
exports | list, start, get, wait, cancel |
ui | link, open |
schedules | list, plus sync, run and tick used by the background item |
Each command calls the MCP tool of the same name, and its options are that tool's arguments. See MCP tools reference. querylane call <tool_name> calls any tool by its full name, and querylane mcp serve starts the MCP server on standard input and output.
Examples
# Find a connection and run a query on it
querylane connections list --query warehouse
querylane db query <connectionId> --query "SELECT count(*) FROM orders"
# Run a job, wait up to two minutes and look at the result
querylane jobs list --query orders
querylane runs start <jobId>
querylane runs wait <runId> --timeout 120
querylane results sample <runId> --limit 20
querylane runs diagnose <runId>
# Run a single step
querylane runs start <jobId> --scope only-step --step <stepId>
# Share jobs as a file
querylane jobs export <jobId> <jobId> --file-path orders.querylane.json
querylane jobs import orders.querylane.json --dry-runRuns started from the command line keep going after the command returns. Relative file paths in jobs export, jobs import and charts render are resolved from the current directory.
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Other error |
2 | Invalid or unknown arguments |
3 | Conflict, such as a changed revision |
4 | Execution failed |
5 | Not found |