CLI
Complete reference for Strata CLI commands.
Overview
The Strata CLI provides commands for managing semantic models, datasources, and deployments. Commands follow: strata [COMMAND] [SUBCOMMAND] [OPTIONS]
Behind the scenes
The CLI works on the same YAML that the semantic model reference describes. It manages semantic model assets (datasources, tables, relationships, migrations) and deploys them to a Strata server. To understand the concepts (semantic layer, tables, relationships, datasources), see Core Concepts and Semantic Model.
Commands
Project Management
| Command | Description | Action |
|---|---|---|
| init | Initialize a new Strata project | Read more |
strata project link PROJECT_ID | Link local project to server project | Read more |
Datasource Management
| Command | Description | Action |
|---|---|---|
| datasource | Add, list, auth, test, tables, meta, exec | Read more |
strata datasource adapters | List supported adapters | Read more |
strata datasource check | Check which adapter gems are installed | Read more |
strata datasource add | Add a new datasource | Read more |
strata datasource list | List configured datasources | Read more |
strata datasource auth | Set credentials | Read more |
strata datasource test | Test connection | Read more |
strata datasource tables | List tables in a datasource | Read more |
strata datasource meta | Show table schema/structure | Read more |
strata datasource exec | Run SQL on a datasource | Read more |
A datasource is a configured connection to a database used by the semantic model. For configuration, tiers (hot/warm/cold), and YAML structure, see Datasources.
Model Creation
| Command | Description | Read more |
|---|---|---|
| create table | Create a semantic table model | Creating Tables → Tables |
| create relation | Create a relationship file | Relationships → Relationships |
| create migration rename | Create rename migration | Migrations |
| create migration swap | Create swap migration | Migrations |
Table Management
| Command | Description | Read more |
|---|---|---|
| table list | List semantic table models | Creating Tables → Tables |
Deployment
| Command | Description | Action |
|---|---|---|
| deploy | Deploy project to server | Read more |
| deploy status | Check deployment status | Read more |
Audit & Validation
| Command | Description | Action |
|---|---|---|
| audit | Run validation checks (syntax, models, connections) | Read more |
Utilities
- version - Print CLI version
- adapters - List supported adapters → Adapters
Getting Help
strata COMMAND --help
strata COMMAND SUBCOMMAND --help
Next Steps
- Projects - Initialize or link a project
- Managing Datasources - Configure datasources
- Creating Tables - Create tables and relationships
- Deployment - Deploy to server
- Auditing - Validate before deploy