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, or to %USERPROFILE%\.local\bin\querylane.cmd on Windows. The launcher starts the command through the QueryLane app, so the command can use saved passwords without them being written to disk.
  3. 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 ~/.zprofile for zsh, ~/.bash_profile for bash or a file in ~/.config/fish/conf.d/ for fish. On Windows, it adds the folder to your user PATH.
  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.

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 ​

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
storagelist, read, write, delete
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 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 ​

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
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 ​

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