{
  "name": "tb",
  "description": "Tinybird CLI",
  "subcommands": [
    {
      "name": "check",
      "description": "Check file syntax",
      "options": [
        {
          "names": [
            "--debug"
          ],
          "description": "Print internal representation"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ],
      "args": [
        {
          "name": "path",
          "template": "folders"
        }
      ]
    },
    {
      "name": "dependencies",
      "description": "Print all data sources dependencies",
      "options": [
        {
          "names": [
            "--no-deps"
          ],
          "description": "Print only data sources with no pipes using them"
        },
        {
          "names": [
            "--match"
          ],
          "description": "Retrieve any resource matching the pattern",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--pipe"
          ],
          "description": "Retrieve any resource used by pipe",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--datasource"
          ],
          "description": "Retrieve resources depending on this Data Source",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--check-for-partial-replace"
          ],
          "description": "Retrieve dependant Data Sources that will have their data replaced if a partial replace is executed in the Data Source selected"
        },
        {
          "names": [
            "--recursive"
          ],
          "description": "Calculate recursive dependencies"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ]
    },
    {
      "name": "diff",
      "description": "Diffs local datafiles to the corresponding remote files in the workspace",
      "options": [
        {
          "names": [
            "--fmt"
          ],
          "description": "Format files before doing the diff, default is True so both files match the format"
        },
        {
          "names": [
            "--no-fmt"
          ],
          "description": "Format files before doing the diff, default is True so both files match the format"
        },
        {
          "names": [
            "--no-color"
          ],
          "description": "Don't colorize diff"
        },
        {
          "names": [
            "--main"
          ],
          "description": "Diffs local datafiles to the corresponding remote files in the main workspace. Only works when authenticated on a branch"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ],
      "args": [
        {
          "name": "path",
          "is_variadic": true,
          "template": "folders"
        }
      ]
    },
    {
      "name": "drop-prefix",
      "description": "Drop all the resources inside a project with prefix. This command is dangerous because it removes everything, use with care",
      "options": [
        {
          "names": [
            "--yes"
          ],
          "description": "Do not ask for confirmation"
        },
        {
          "names": [
            "--dry-run"
          ],
          "description": "Run the command without removing anything"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ],
      "args": [
        {
          "name": "text"
        }
      ]
    },
    {
      "name": "fmt",
      "description": "Formats a .datasource, .pipe or .incl file\n\nThis command removes comments starting with # from the file, use DESCRIPTION instead.\n\nThe format command tries to parse the datafile so syntax errors might",
      "options": [
        {
          "names": [
            "--line-length"
          ],
          "description": "A number indicating the maximum characters per line in the node SQL, lines will be splitted based on the SQL syntax and the number of characters passed as a parameter",
          "takes_arg": true,
          "arg": {
            "name": "integer"
          }
        },
        {
          "names": [
            "--dry-run"
          ],
          "description": "Don't ask to override the local file"
        },
        {
          "names": [
            "--yes"
          ],
          "description": "Do not ask for confirmation to overwrite the local file"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ],
      "args": [
        {
          "name": "path",
          "is_variadic": true,
          "template": "folders"
        }
      ]
    },
    {
      "name": "init",
      "description": "Initialize folder layout",
      "options": [
        {
          "names": [
            "--generate-datasources"
          ],
          "description": "Generate datasources based on CSV, NDJSON and Parquet files in this folder"
        },
        {
          "names": [
            "--folder"
          ],
          "description": "Folder where files will be placed",
          "takes_arg": true,
          "arg": {
            "name": "directory",
            "template": "folders"
          }
        },
        {
          "names": [
            "--force"
          ],
          "description": "Overrides existing files"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ]
    },
    {
      "name": "materialize",
      "description": "[BETA] Given a local Pipe datafile path (FILENAME) and optionally a Materialized View name (TARGET_DATASOURCE), choose one of its nodes to materialize.\n\nThis command guides you to generate the Materia",
      "options": [
        {
          "names": [
            "--prefix"
          ],
          "description": "Use prefix for all the resources",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--push-deps"
          ],
          "description": "Push dependencies, disabled by default"
        },
        {
          "names": [
            "--workspace_map"
          ],
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--workspace"
          ],
          "description": "Add a workspace path to the list of external workspaces, usage: --workspace name path/to/folder",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--no-versions"
          ],
          "description": "When set, resource dependency versions are not used, it pushes the dependencies as-is"
        },
        {
          "names": [
            "--verbose"
          ],
          "description": "Prints more log"
        },
        {
          "names": [
            "--force-populate"
          ],
          "description": "Subset or full",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--unlink-on-populate-error"
          ],
          "description": "If the populate job fails the Materialized View is unlinked and new data won't be ingested in the Materialized View. First time a populate job fails, the Materialized View is always unlinked"
        },
        {
          "names": [
            "--override-pipe"
          ],
          "description": "Override pipe if exists or prompt"
        },
        {
          "names": [
            "--override-datasource"
          ],
          "description": "Override data source if exists or prompt"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ],
      "args": [
        {
          "name": "path",
          "template": "folders"
        },
        {
          "name": "text"
        }
      ]
    },
    {
      "name": "prompt",
      "description": "Learn how to include info about the CLI in your shell PROMPT",
      "options": [
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ]
    },
    {
      "name": "pull",
      "description": "Retrieve latest versions for project files from Tinybird",
      "options": [
        {
          "names": [
            "--folder"
          ],
          "description": "Folder where files will be placed",
          "takes_arg": true,
          "arg": {
            "name": "directory",
            "template": "folders"
          }
        },
        {
          "names": [
            "--auto"
          ],
          "description": "Saves datafiles automatically into their default directories (/datasources or /pipes)"
        },
        {
          "names": [
            "--match"
          ],
          "description": "Retrieve any resourcing matching the pattern. eg --match _test",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--prefix"
          ],
          "description": "Download only resources with this prefix",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--force"
          ],
          "description": "Override existing files"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ]
    },
    {
      "name": "push",
      "description": "Push files to Tinybird\n",
      "options": [
        {
          "names": [
            "--prefix"
          ],
          "description": "Use prefix for all the resources",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--dry-run"
          ],
          "description": "Run the command without creating resources on the Tinybird account or any side effect"
        },
        {
          "names": [
            "--check"
          ],
          "description": "Enable/Disable output checking, enabled by default"
        },
        {
          "names": [
            "--no-check"
          ],
          "description": "Enable/Disable output checking, enabled by default"
        },
        {
          "names": [
            "--push-deps"
          ],
          "description": "Push dependencies, disabled by default"
        },
        {
          "names": [
            "--debug"
          ],
          "description": "Prints internal representation, can be combined with any command to get more information"
        },
        {
          "names": [
            "-f",
            "--force"
          ],
          "description": "Override pipes when they already exist"
        },
        {
          "names": [
            "--override-datasource"
          ],
          "description": "When pushing a pipe with a Materialized node if the target Data Source exists it will try to override it"
        },
        {
          "names": [
            "--populate"
          ],
          "description": "Populate materialized nodes when pushing them"
        },
        {
          "names": [
            "--subset"
          ],
          "description": "Populate with a subset percent of the data (limited to a maximum of 2M rows), this is useful to quickly test a materialized node with some data. The subset must be greater than 0 and lower than 0.1. A",
          "takes_arg": true,
          "arg": {
            "name": "float"
          }
        },
        {
          "names": [
            "--sql-condition"
          ],
          "description": "Populate with a SQL condition to be applied to the trigger Data Source of the Materialized View. For instance, `--sql-condition='date == toYYYYMM(now())'` it'll populate taking all the rows from the t",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--unlink-on-populate-error"
          ],
          "description": "If the populate job fails the Materialized View is unlinked and new data won't be ingested in the Materialized View. First time a populate job fails, the Materialized View is always unlinked"
        },
        {
          "names": [
            "--fixtures"
          ],
          "description": "Append fixtures to data sources"
        },
        {
          "names": [
            "--wait"
          ],
          "description": "To be used along with --populate command. Waits for populate jobs to finish, showing a progress bar. Disabled by default"
        },
        {
          "names": [
            "--yes"
          ],
          "description": "Do not ask for confirmation"
        },
        {
          "names": [
            "--only-response-times"
          ],
          "description": "Checks only response times, when --force push a pipe"
        },
        {
          "names": [
            "--workspace_map"
          ],
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--workspace"
          ],
          "description": "Add a workspace path to the list of external workspaces, usage: --workspace name path/to/folder",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--no-versions"
          ],
          "description": "When set, resource dependency versions are not used, it pushes the dependencies as-is"
        },
        {
          "names": [
            "--timeout"
          ],
          "description": "Timeout you want to use for the job populate",
          "takes_arg": true,
          "arg": {
            "name": "float"
          }
        },
        {
          "names": [
            "-l",
            "--limit"
          ],
          "description": "Number of requests to validate",
          "takes_arg": true,
          "arg": {
            "name": "integer range"
          }
        },
        {
          "names": [
            "--sample-by-params"
          ],
          "description": "When set, we will aggregate the pipe_stats_rt requests by extractURLParameterNames(assumeNotNull(url)) and for each combination we will take a sample of N requests",
          "takes_arg": true,
          "arg": {
            "name": "integer range"
          }
        },
        {
          "names": [
            "-ff",
            "--failfast"
          ],
          "description": "When set, the checker will exit as soon one test fails"
        },
        {
          "names": [
            "--ignore-order"
          ],
          "description": "When set, the checker will ignore the order of list properties"
        },
        {
          "names": [
            "--validate-processed-bytes"
          ],
          "description": "When set, the checker will validate that the new version doesn't process more than 25% than the current version"
        },
        {
          "names": [
            "--last-requests-from-main"
          ],
          "description": "When set, the checker will get top requests requests from main"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ],
      "args": [
        {
          "name": "path",
          "is_variadic": true,
          "template": "folders"
        }
      ]
    },
    {
      "name": "sql",
      "description": "Run SQL query over data sources and pipes",
      "options": [
        {
          "names": [
            "--rows_limit"
          ],
          "description": "Max number of rows retrieved",
          "takes_arg": true,
          "arg": {
            "name": "integer"
          }
        },
        {
          "names": [
            "--pipeline"
          ],
          "description": "The name of the Pipe to run the SQL Query",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--pipe"
          ],
          "description": "The path to the .pipe file to run the SQL Query of a specific NODE",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--node"
          ],
          "description": "The NODE name",
          "takes_arg": true,
          "arg": {
            "name": "text"
          }
        },
        {
          "names": [
            "--format"
          ],
          "description": "Output format",
          "takes_arg": true,
          "arg": {
            "name": "choice",
            "suggestions": [
              "json",
              "csv",
              "human"
            ]
          }
        },
        {
          "names": [
            "--stats"
          ],
          "description": "Show query stats"
        },
        {
          "names": [
            "--no-stats"
          ],
          "description": "Show query stats"
        },
        {
          "names": [
            "--help"
          ],
          "description": "Show this message and exit"
        }
      ],
      "args": [
        {
          "name": "text"
        }
      ]
    }
  ],
  "options": [
    {
      "names": [
        "--debug"
      ],
      "description": "Prints internal representation, can be combined with any command to get more information"
    },
    {
      "names": [
        "--no-debug"
      ],
      "description": "Prints internal representation, can be combined with any command to get more information"
    },
    {
      "names": [
        "--token"
      ],
      "description": "Use auth token, defaults to TB_TOKEN envvar, then to the .tinyb file",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--host"
      ],
      "description": "Use custom host, defaults to TB_HOST envvar, then to https://api.tinybird.co",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--gcp-project-id"
      ],
      "description": "The Google Cloud project ID",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--gcs-bucket"
      ],
      "description": "The Google Cloud Storage bucket to write temp files when using the connectors",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--google-application-credentials"
      ],
      "description": "Set GOOGLE_APPLICATION_CREDENTIALS",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--sf-account"
      ],
      "description": "The Snowflake Account (e.g. your-domain.west-europe.azure)",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--sf-warehouse"
      ],
      "description": "The Snowflake warehouse name",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--sf-database"
      ],
      "description": "The Snowflake database name",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--sf-schema"
      ],
      "description": "The Snowflake schema name",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--sf-role"
      ],
      "description": "The Snowflake role name",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--sf-user"
      ],
      "description": "The Snowflake user name",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--sf-password"
      ],
      "description": "The Snowflake password",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--sf-storage-integration"
      ],
      "description": "The Snowflake GCS storage integration name (leave empty to auto-generate one)",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--sf-stage"
      ],
      "description": "The Snowflake GCS stage name (leave empty to auto-generate one)",
      "takes_arg": true,
      "arg": {
        "name": "text"
      }
    },
    {
      "names": [
        "--with-headers"
      ],
      "description": "Flag to enable connector to export with headers"
    },
    {
      "names": [
        "--version-warning"
      ],
      "description": "Don't print version warning message if there's a new available version. You can use TB_VERSION_WARNING envar"
    },
    {
      "names": [
        "--no-version-warning"
      ],
      "description": "Don't print version warning message if there's a new available version. You can use TB_VERSION_WARNING envar"
    },
    {
      "names": [
        "--hide-tokens"
      ],
      "description": "Disable the output of tokens"
    },
    {
      "names": [
        "--version"
      ],
      "description": "Show the version and exit"
    },
    {
      "names": [
        "--help"
      ],
      "description": "Show this message and exit"
    }
  ]
}
