Skip to main content

Installation

curl -fsSL https://raw.githubusercontent.com/StacDev/install/main/install.sh | bash
Verify installation:
stac --version

Available Commands

CommandDescriptionRequires Auth
loginAuthenticate with Google OAuthNo
logoutClear stored authentication tokensNo
statusShow authentication statusNo
initInitialize Stac in projectYes
buildConvert Dart widgets to JSONNo
deployBuild and deploy to Stac CloudYes
project listList all cloud projectsYes
project createCreate new cloud projectYes

Authentication

Before using most CLI commands, you’ll need to authenticate with Stac Cloud.

Login

This opens your browser for OAuth authentication. Your credentials are securely stored locally.
stac login

Check Status

stac status

Logout

stac logout

Initialize Stac

Use this to set up Stac in an existing Flutter/Dart project. It links your local app to a Stac Cloud project and scaffolds required files.
stac init

What it does

  • Creates stac/ folder for Stac DSL widgets
  • Adds lib/default_stac_options.dart with your StacOptions (e.g., projectId)
  • Updates pubspec.yaml with stac and related dependencies
  • Optionally links to an existing Stac Cloud project

Generated files

|- Flutter project
├── lib/
   ├── default_stac_options.dart
   └── main.dart
├── stac/
   └── stac_widget.dart
└── pubspec.yaml

Convert Dart to JSON

Build all widgets in current project:
stac build
Build specific project directory:
stac build --project /path/to/project
Build with validation (enabled by default):
stac build --validate
Build with verbose output:
stac build --verbose

Build Options

OptionDescriptionDefault
-p, --projectProject directory pathCurrent directory
--validateValidate generated JSONtrue
-v, --verboseShow detailed build outputfalse
The build command converts Stac widget definitions from the stac/ folder into JSON format in the build/ folder.

Deploy to Stac Cloud

Build and deploy to Stac Cloud:
stac deploy
Deploy specific project directory:
stac deploy --project /path/to/project
Skip build and deploy existing files:
stac deploy --skip-build
Deploy with verbose output:
stac deploy --verbose

Deployment Options

OptionDescriptionDefault
-p, --projectProject directory pathCurrent directory
--skip-buildSkip building before deploymentfalse
-v, --verboseShow detailed deployment outputfalse
By default, stac deploy automatically runs stac build before deploying. Use --skip-build to deploy existing build files without rebuilding.

List Projects

List all your Stac Cloud projects:
stac project list
Output as JSON format:
stac project list --json
The list command shows:
  • Project name and ID
  • Project description
  • Created and updated timestamps

Create New Project

stac project create --name "My App" --description "My SDUI app"
Short form:
stac project create -n "My App" -d "My SDUI app"
After creating a project, run stac init to initialize it locally.

Typical Workflow

  1. Authenticate with Stac Cloud (one-time):
stac login
  1. List available projects:
stac project list
  1. Initialize a project in your Flutter/Dart app:
cd your-flutter-project
stac init
  1. Create your widget definitions in the stac/ folder, then deploy:
stac deploy

Command Reference

Global Options

OptionDescription
-v, --verboseShow additional command output
--versionPrint tool version
--helpPrint usage information