Commands Reference
Complete reference for all dataspoc-lens CLI commands and their options.
Global options
Section titled “Global options”dataspoc-lens --version # Show versiondataspoc-lens --help # Show helpInitialize DataSpoc Lens configuration.
dataspoc-lens initCreates ~/.dataspoc-lens/ directory with config.yaml and transforms/ subdirectory.
add-bucket
Section titled “add-bucket”Register a bucket and discover tables.
dataspoc-lens add-bucket <uri>| Argument | Description |
|---|---|
uri | Bucket URI: s3://, gs://, az://, or file:// |
Reads the Pipe manifest or scans for .parquet files and prints discovered tables.
catalog
Section titled “catalog”List all tables from registered buckets.
dataspoc-lens catalog [OPTIONS]| Option | Default | Description |
|---|---|---|
--detail <table> | — | Show detailed schema for a specific table |
--output <format> | table | Output format: table or json |
Examples:
dataspoc-lens catalogdataspoc-lens catalog --detail ordersdataspoc-lens catalog --output jsonExecute a SQL query and print results.
dataspoc-lens query <sql> [OPTIONS]| Argument / Option | Default | Description |
|---|---|---|
sql | — | SQL query to execute |
--export, -e | — | Export results to file (format from extension: .csv, .json, .parquet) |
--output | table | Output format: table or json |
Examples:
dataspoc-lens query "SELECT * FROM orders LIMIT 10"dataspoc-lens query "SELECT * FROM orders" --export results.csvdataspoc-lens query "SELECT COUNT(*) FROM orders" --output jsonLaunch the interactive SQL shell.
dataspoc-lens shellNo options. See Interactive Shell for details on dot commands and features.
Ask a question in natural language and get SQL results.
dataspoc-lens ask <question> [OPTIONS]| Argument / Option | Default | Description |
|---|---|---|
question | — | Natural language question |
--debug | false | Show the prompt sent to the LLM |
--export, -e | — | Export results to file (.csv, .json, .parquet) |
--output | table | Output format: table or json |
Examples:
dataspoc-lens ask "What are the top 10 customers by revenue?"dataspoc-lens ask "Monthly order trends" --debugdataspoc-lens ask "Average order value by status" --export report.csvdataspoc-lens ask "Total revenue" --output jsonsetup-ai
Section titled “setup-ai”Install and configure Ollama for local AI (free, no API key needed).
dataspoc-lens setup-ainotebook
Section titled “notebook”Open an interactive notebook with tables pre-mounted.
dataspoc-lens notebook [OPTIONS]| Option | Default | Description |
|---|---|---|
--marimo | false | Use Marimo instead of JupyterLab |
Examples:
dataspoc-lens notebookdataspoc-lens notebook --marimotransform run
Section titled “transform run”Run SQL transforms in order.
dataspoc-lens transform runExecutes all numbered .sql files in ~/.dataspoc-lens/transforms/ in order. See SQL Transforms for details.
transform list
Section titled “transform list”List available transform files.
dataspoc-lens transform listManage local cache of remote Parquet data.
dataspoc-lens cache [TABLE] [OPTIONS]| Argument / Option | Default | Description |
|---|---|---|
table | — | Table name to cache |
--list | false | List cached tables |
--refresh | false | Force re-download of cached data |
--clear | false | Clear cached data (all or specific table) |
--output | table | Output format: table or json |
Examples:
dataspoc-lens cache orders # Cache the orders tabledataspoc-lens cache --list # List all cached tablesdataspoc-lens cache --list --output json # List cached tables as JSONdataspoc-lens cache orders --refresh # Force re-downloaddataspoc-lens cache --clear # Clear all cached datadataspoc-lens cache orders --clear # Clear specific table cacheStart the MCP server for AI agent integration.
dataspoc-lens mcpSee MCP Server for configuration details.
ml activate
Section titled “ml activate”Activate DataSpoc ML with a license key.
dataspoc-lens ml activate [KEY]Without a key, displays information about DataSpoc ML and how to purchase a license.
ml status
Section titled “ml status”Show DataSpoc ML license status.
dataspoc-lens ml statusml train
Section titled “ml train”Train a model via DataSpoc ML.
dataspoc-lens ml train --target <column> --from <table>| Option | Description |
|---|---|
--target | Target column name for prediction |
--from | Table name or path to training data |
ml predict
Section titled “ml predict”Generate predictions via DataSpoc ML.
dataspoc-lens ml predict --model <name> --from <table>| Option | Description |
|---|---|
--model | Model name to use for predictions |
--from | Table name or path to input data |
ml models
Section titled “ml models”List trained ML models.
dataspoc-lens ml modelsml explain
Section titled “ml explain”Explain a trained model via DataSpoc ML.
dataspoc-lens ml explain --model <name>| Option | Description |
|---|---|
--model | Model name to explain |