CLI Reference
The Archipelago CLI (archipelago) manages brick templates, scaffolds new projects, and keeps your development environment healthy.
Installation
dart pub global activate archipelago_cliVerify your installation:
archipelago --versiondoctor
Check system health and validate the development environment.
Usage:
archipelago doctor [flags]Flags:
| Flag | Short | Description |
|---|---|---|
--verbose | -v | Show additional diagnostic information |
--fix | Auto-fix missing external dependencies | |
--brick <name> | -b | Check dependencies for a specific brick only |
Examples:
archipelago doctorarchipelago doctor --verbosearchipelago doctor --brick autharchipelago doctor --fixThe doctor checks:
- Flutter SDK installation and version
- Dart SDK version
- Required CLI tools (melos, mason, etc.)
- Brick-specific external dependencies
- Authentication status
- Cloud CLIs (optional — informational only, does not affect exit code):
firebase— Firebase CLI for FCM / Crashlytics setupgcloud— Google Cloud SDK for Firebase App Distribution / Play integrationsupabase— Supabase CLI for database migrations and edge functions
TIP
Run archipelago doctor after initial setup to ensure all prerequisites are met before generating code.
auth
Manage authentication with the Archipelago API. Authentication determines which brick tier (Free, Pro, Enterprise) you can access.
auth login
Authenticate with the Archipelago API.
Usage:
archipelago auth login [flags]Flags:
| Flag | Short | Description |
|---|---|---|
--token <token> | -t | API token for authentication |
--interactive | -i | Interactive login flow (opens browser) |
Examples:
archipelago auth login --token your_api_token_herearchipelago auth login --interactiveTIP
Use --token for CI environments. Use --interactive for local development — it opens a browser for OAuth login.
auth logout
Clear stored authentication credentials.
Usage:
archipelago auth logoutauth status
Check current authentication status and tier information.
Usage:
archipelago auth statusOutput example:
✓ Authenticated
User: ryan@example.com
Tier: Pro
Token: ****...abcdauth activate
Activate a free trial using a promo code.
Usage:
archipelago auth activate --promo <code>Flags:
| Flag | Short | Description |
|---|---|---|
--promo <code> | -p | The promo code to activate |
Examples:
archipelago auth activate --promo LAUNCH2025TIP
Promo codes grant a free trial of a paid tier. Run archipelago auth status after activation to confirm your trial tier and expiry date.
auth rotate-key
Rotate the HMAC signing key used to sign CLI requests to the Archipelago API. Use this if you suspect your key has been compromised.
Usage:
archipelago auth rotate-keyOutput example:
✓ HMAC signing key rotated successfully
New key active immediately
Old key invalidatedWARNING
Rotating your key will invalidate all active sessions on other machines. You will need to run archipelago auth login again on any other device where the CLI is authenticated.
config
Manage persistent CLI configuration stored at ~/.archipelago/config.json.
config set
Set a configuration value.
Usage:
archipelago config set <key> <value>Supported keys:
| Key | Values | Description |
|---|---|---|
source | r2, git | Brick download source. r2 = official Cloudflare R2 (default); git = enterprise fork. |
repo | <git-url> | Enterprise fork URL. Only used when source is git. |
Examples:
archipelago config set source git
archipelago config set repo https://github.com/your-org/archipelago-enterprise.gitarchipelago config set source r2TIP
After setting source git, run archipelago config set repo <url> to specify your fork. The first archipelago generate will clone the fork; subsequent runs fetch and reset to HEAD.
config show
Print the resolved CLI configuration.
Usage:
archipelago config showOutput example:
Archipelago CLI configuration
Config file: /Users/you/.archipelago/config.json
Telemetry: enabled
Brick source: git
Brick repo URL: https://github.com/your-org/archipelago-enterprise.gitconfig telemetry
Enable, disable, or inspect anonymous usage telemetry.
Usage:
archipelago config telemetry [flags]Flags:
| Flag | Description |
|---|---|
--enable | Opt in to anonymous telemetry |
--disable | Opt out of telemetry |
--status | Show current telemetry setting (default when no flag is passed) |
Examples:
archipelago config telemetry --enablearchipelago config telemetry --disablearchipelago config telemetry --statusbrick
Manage brick templates — list available bricks, download them, check for updates, and view details.
brick list
List all available bricks for your subscription tier.
Usage:
archipelago brick listAliases: ls
Output example:
Available Bricks (Pro tier)
Name Version Category Size Cached
flutter_modular_monorepo 1.2.0 scaffold 45 KB ✓
feature_monorepo_skeleton 1.0.3 feature 12 KB ✓
flutter_ui_kit 1.1.0 package 8 KB ✗
flutter_l10n 1.0.0 package 5 KB ✗
app_scaffold 1.0.1 scaffold 15 KB ✗brick download
Download a brick bundle to the local cache.
Usage:
archipelago brick download <name> [flags]Flags:
| Flag | Description |
|---|---|
--all | Download all available bricks |
Examples:
archipelago brick download autharchipelago brick download --allbrick update
Check all cached bricks for updates and download newer versions.
Usage:
archipelago brick updateOutput example:
✓ 2 update(s) available
flutter_modular_monorepo 1.1.0 → 1.2.0 ✓ Updated
feature_monorepo_skeleton 1.0.2 → 1.0.3 ✓ Updatedbrick info
Show detailed information about a brick.
Usage:
archipelago brick info <name>Example:
archipelago brick info flutter_modular_monorepoOutput example:
flutter_modular_monorepo v1.2.0
Category: scaffold
Description: Full Flutter modular monorepo with DI, routing, and CI/CD
Tier: Free
Size: 45 KB
Dependencies: flutter, melos, mason_cli
Cached: Yes (downloaded 2d ago)create
Create a new Flutter modular monorepo project. This is a shortcut for archipelago generate flutter_modular_monorepo.
Usage:
archipelago create [flags]Flags:
| Flag | Short | Description |
|---|---|---|
--config <path> | -c | Path to a pre-filled config JSON file (CI mode) |
--output <dir> | -o | Output directory (default: .) |
--provision-firebase | Print Firebase setup commands and write a provision-firebase.sh helper script into the generated project | |
--provision-supabase | Print Supabase setup commands and write a provision-supabase.sh helper script into the generated project |
Examples:
archipelago createarchipelago create --config project_config.json --output ./my_apparchipelago create --provision-firebase --output ./my_apparchipelago create --provision-supabase --output ./my_appThe --provision-firebase flag prints a checklist of Firebase setup commands (firebase login, flutterfire configure, etc.) and writes a provision-firebase.sh script into the project root. The --provision-supabase flag does the same for Supabase (supabase login, supabase init, supabase link).
How the config flow works
When run without --config, the CLI:
- Creates a config template file in the current directory
- Opens it for you to fill in project values (name, org, features, etc.)
- Waits for you to save and press Enter
- Generates the project from your config
- Cleans up the temporary config file
In CI mode (--config), it reads the JSON file directly and skips the interactive step.
generate
Generate code from a brick template. This is the general-purpose generation command.
Usage:
archipelago generate <brick-name> [flags]Aliases: gen
Flags:
| Flag | Short | Description |
|---|---|---|
--config <path> | -c | Path to a pre-filled config JSON file (CI mode) |
--output <dir> | -o | Output directory (default: .) |
--local-bricks <path> | Path to a local Archipelago repo. Bypasses R2 download and loads the brick from bricks/<slug>/ or bundles/<slug>.bundle. |
Examples:
archipelago generate my_custom_brick
archipelago gen my_custom_brick --config vars.json
archipelago generate feature_monorepo_skeleton --output ./features
archipelago generate webview_sdk_advanced --local-bricks ../archipelagoCommon Brick Slugs
generate accepts a raw brick slug — there are no alias subcommands. Pass the exact slug shown in archipelago brick list:
| Slug | Description |
|---|---|
feature_monorepo_skeleton | Feature module scaffold |
flutter_ui_kit | Flutter UI kit package |
flutter_l10n | Localization package |
app_scaffold | App in an existing workspace |
webview_sdk | WebView SDK (flutter_inappwebview) |
webview_sdk_advanced | Pro WebView add-on (JS bridge, interceptors, mini-app) |
auth_sdk | Auth feature module |
TIP
Run archipelago brick list to see all available slugs for your subscription tier. Pass any slug directly to archipelago generate <slug>.
WARNING
Before generation, the CLI checks for external dependencies required by the brick. If any are missing, you'll see a warning suggesting archipelago doctor --brick <name> for details.
affected (generated devtool) Enterprise
Run CI tasks scoped to git-affected packages. There is no archipelago affected CLI command. The affected command lives in the generated devtools/ directory of your project and is run with:
dart run monorepo_toolkit affected <subcommand>Install the affected brick first to get this tool in your workspace. See the full reference at Affected Package Detection.
affected list
List packages affected by git changes.
dart run monorepo_toolkit affected list
dart run monorepo_toolkit affected list --base develop
dart run monorepo_toolkit affected list --json # for GitHub Actions matrixaffected analyze
Run flutter analyze lib on affected packages.
dart run monorepo_toolkit affected analyze --base developaffected test
Run flutter test on affected packages with optional coverage.
dart run monorepo_toolkit affected test --coverage --base developaffected run
Run an arbitrary command on affected packages.
dart run monorepo_toolkit affected run -- "dart format --set-exit-if-changed ."TIP
For the complete flag reference, see Affected Package Detection.
update
Update the Archipelago CLI to the latest version from pub.dev.
Usage:
archipelago updateOutput example:
✓ Checked for updates
⠏ Updating to 0.1.0...
✓ Updated to 0.1.0TIP
The CLI also checks for updates automatically when you run any command. If a newer version is available, you'll see a notification.
Global Flags
These flags are available on all commands:
| Flag | Description |
|---|---|
--help | Show usage information |
--version | Show the current CLI version |
--verbose | Enable noisy logging, including all shell commands executed |
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
64 | Usage error (invalid arguments) |
70 | Software error (internal failure) |