Skip to content
Download

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 ​

  1. Open Settings > CLI and MCP.
  2. Next to QueryLane CLI, click Install CLI. QueryLane writes a small launcher to ~/.local/bin/querylane that starts the command with the Node.js runtime inside the app.
  3. If ~/.local/bin is not on your PATH, click Add to PATH in the Run querylane in terminal row. QueryLane adds the directory to ~/.zprofile for zsh, ~/.bash_profile for bash or a file in ~/.config/fish/conf.d/ for fish.
  4. 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 ​

sh
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-path sets filePath. Write --option value or --option=value. A boolean option without a value means true.
  • --profile <id> picks the storage profile. The default is main.
  • --file payload.json, --input-json '<json>' or --stdin pass 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 ​

ResourceCommands
capabilitiesAPI version, run scopes and the job authoring guide
profileslist
connectorslist
connectionslist, get, validate, test, create, update, usage, delete, capabilities
schemasget
dbexplore, object, query, result, dispose
packageslist
jobslist, get, create, export, import, delete, revisions, validate
changespropose, show, apply, revert
stepspreview, test
runslist, get, diagnose, plan, start, wait, cancel, clear
resultssample, check
chartsrender
exportslist, start, get, wait, cancel
uilink, open
scheduleslist, 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 ​

sh
# 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-run

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 ​

CodeMeaning
0Success
1Other error
2Invalid or unknown arguments
3Conflict, such as a changed revision
4Execution failed
5Not found