-
-
Notifications
You must be signed in to change notification settings - Fork 81
docs: Migrate docs from /website to /docs #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d061a1b
feat: add initial documentation structure and content
divyanshub024 df2cac2
GitButler Workspace Commit
gitbutler-client 53c98ef
refactor: update documentation structure and content for Stac framework
divyanshub024 fe3aadb
docs: enhance README
divyanshub024 d246fe0
docs: Add stac introduction docs.
divyanshub024 342ec9b
docs: update introduction link to point to quickstart guide
divyanshub024 965a1a8
docs: add project structure documentation for Stac-powered Flutter apps
divyanshub024 4421833
docs: add Stac CLI documentation for installation, commands, and usage
divyanshub024 a8e0dfa
docs: update 'Why Stac?' section to enhance clarity and detail on Ser…
divyanshub024 4776317
docs: add CLI and project structure links to documentation index
divyanshub024 e084b30
docs: enhance quickstart guide with detailed setup instructions and e…
divyanshub024 d8e5745
docs: remove 'Why Stac?' section and enhance quickstart guide with ne…
divyanshub024 12860c3
docs: update quickstart guide with clearer default option instruction…
divyanshub024 1fe967a
docs: update navigation links in documentation
divyanshub024 01b7338
docs: update support link in documentation to Discord
divyanshub024 6cda680
docs: remove /website now that docs live in /doc
divyanshub024 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,222 @@ | ||
| --- | ||
| title: "Stac CLI" | ||
| description: "Build, deploy, and manage Server-Driven UI projects with the Stac CLI." | ||
| --- | ||
|
|
||
| ## Installation | ||
|
|
||
| <Tabs> | ||
| <Tab title="macOS / Linux"> | ||
|
|
||
| ```bash | ||
| # Install Stac CLI | ||
| curl -fsSL https://raw.githubusercontent.com/StacDev/install/main/install.sh | bash | ||
|
|
||
| # Verify installation | ||
| stac --version | ||
| ``` | ||
|
|
||
| </Tab> | ||
| <Tab title="Windows"> | ||
|
|
||
| ```bash | ||
| # Install Stac CLI | ||
| irm https://raw.githubusercontent.com/StacDev/install/main/install.ps1 | iex | ||
|
|
||
| # Verify installation | ||
| stac --version | ||
| ``` | ||
|
|
||
| </Tab> | ||
| </Tabs> | ||
|
|
||
|
|
||
| ## Available Commands | ||
|
|
||
| | Command | Description | Requires Auth | | ||
| |---------|-------------|---------------| | ||
| | `login` | Authenticate with Google OAuth | No | | ||
| | `logout` | Clear stored authentication tokens | No | | ||
| | `status` | Show authentication status | No | | ||
| | `init` | Initialize Stac in project | Yes | | ||
| | `build` | Convert Dart widgets to JSON | No | | ||
| | `deploy` | Build and deploy to Stac Cloud | Yes | | ||
| | `project list` | List all cloud projects | Yes | | ||
| | `project create` | Create new cloud project | Yes | | ||
|
|
||
| ## Authentication | ||
|
|
||
| Before using most CLI commands, you'll need to authenticate with Stac Cloud. | ||
|
|
||
| ### Login | ||
|
|
||
| ```bash | ||
| # Authenticate with Google OAuth | ||
| stac login | ||
|
|
||
| # This opens your browser for OAuth authentication | ||
| # Your credentials are securely stored locally | ||
| ``` | ||
|
|
||
| ### Check Status | ||
|
|
||
| ```bash | ||
| # Check your authentication status | ||
| stac status | ||
| ``` | ||
|
|
||
| ### Logout | ||
|
|
||
| ```bash | ||
| # Clear stored authentication tokens | ||
| 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. | ||
|
|
||
|
|
||
| ```bash | ||
| # Initialize Stac in the current project | ||
| 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 | ||
|
|
||
| ```bash | ||
| |- Flutter project | ||
| ├── lib/ | ||
| │ ├── default_stac_options.dart | ||
| │ └── main.dart | ||
| ├── stac/ | ||
| │ └── stac_widget.dart | ||
| └── pubspec.yaml | ||
| ``` | ||
|
|
||
| ## Building Widgets | ||
|
|
||
| ### Convert Dart to JSON | ||
|
|
||
| ```bash | ||
| # 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 | ||
|
|
||
| | Option | Description | Default | | ||
| |--------|-------------|---------| | ||
| | `-p, --project` | Project directory path | Current directory | | ||
| | `--validate` | Validate generated JSON | `true` | | ||
| | `-v, --verbose` | Show detailed build output | `false` | | ||
|
|
||
| The build command converts Stac widget definitions from the `stac/` folder into JSON format in the `build/` folder. | ||
|
|
||
| ## Deployment | ||
|
|
||
| ### Deploy to Stac Cloud | ||
|
|
||
| ```bash | ||
| # 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 | ||
|
|
||
| | Option | Description | Default | | ||
| |--------|-------------|---------| | ||
| | `-p, --project` | Project directory path | Current directory | | ||
| | `--skip-build` | Skip building before deployment | `false` | | ||
| | `-v, --verbose` | Show detailed deployment output | `false` | | ||
|
|
||
| <Note> | ||
| By default, `stac deploy` automatically runs `stac build` before deploying. Use `--skip-build` to deploy existing build files without rebuilding. | ||
| </Note> | ||
|
|
||
| ## Cloud Project Management | ||
|
|
||
| ### List Projects | ||
|
|
||
| ```bash | ||
| # 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 | ||
|
|
||
| ```bash | ||
| # Create a new project on Stac Cloud | ||
| 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. | ||
|
|
||
| ## Development Workflow | ||
|
|
||
| ### Typical Workflow | ||
|
|
||
| ```bash | ||
| # 1. Authenticate with Stac Cloud (one-time) | ||
| stac login | ||
|
|
||
| # 2. List available projects | ||
| stac project list | ||
|
|
||
| # 3. Initialize a project in your Flutter/Dart app | ||
| cd your-flutter-project | ||
| stac init | ||
|
|
||
| # 4. Create your widget definitions in stac/ folder | ||
| # Edit stac/your_screen.dart | ||
|
|
||
| # 6. Deploy to Stac Cloud | ||
| stac deploy | ||
| ``` | ||
|
|
||
| ## Command Reference | ||
|
|
||
| ### Global Options | ||
|
|
||
| | Option | Description | | ||
| |--------|-------------| | ||
| | `-v, --verbose` | Show additional command output | | ||
| | `--version` | Print tool version | | ||
| | `--help` | Print usage information | | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify CLI commands match actual implementation.
The development workflow section (lines 195-211) lists several commands. Confirm that the command sequence and options documented here match the actual CLI implementation, especially around the build-before-deploy behavior mentioned in the Deployment section.
🏁 Script executed:
Length of output: 97
Length of output: 850
Length of output: 2365
Length of output: 2041
Fix step numbering in workflow—step 5 is missing.
The development workflow section (lines 195-211) has a critical formatting error: the steps jump from
# 4. Create your widget definitionsdirectly to# 6. Deploy to Stac Cloud, with no step 5. This should be corrected to sequential numbering (either restore step 5 with relevant content likestac build, or renumber step 6 to step 5).The build-before-deploy behavior mentioned in the Deployment section (line 159: "By default,
stac deployautomatically runsstac buildbefore deploying") is consistent with the workflow not showing an explicit build step. However, verify whether step 5 should document thestac buildcommand or if the numbering was simply edited incorrectly.🤖 Prompt for AI Agents