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/querylane, or to%USERPROFILE%\.local\bin\querylane.cmdon Windows. The launcher starts the command through the QueryLane app, so the command can use saved passwords without them being written to disk. - If that folder is not on your PATH, click Add to PATH in the Run querylane in terminal row. On a Mac, QueryLane adds it to
~/.zprofilefor zsh,~/.bash_profilefor bash or a file in~/.config/fish/conf.d/for fish. On Windows, it adds the folder to your user PATH. - 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.
Agent limits apply
The command counts as an agent, like an MCP client. The level of each connection in Settings > CLI and MCP applies to it, Agents may run code decides whether it may run JavaScript, HTTP and plugin steps, and it shows masks instead of passwords, API keys and tokens. Files follow the agent rules too: --file-path of jobs export, charts render, exports start and dashboards export must name a new file in the agent files folder, jobs import reads only from there, and storage write with --local-path waits for your approval in QueryLane. See What agents may change and Local files.
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 |
storage | list, read, write, delete |
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 for scheduled runs |
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
cd ~/Library/Application\ Support/app.querylane.desktop/agent-files
querylane jobs export <jobId> <jobId> --file-path orders.querylane.json
querylane jobs import orders.querylane.json --dry-run
# List a folder of an S3 or SFTP connection
querylane storage list <connectionId> --path reports/Runs 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 |