Skip to content

CLI Reference

The Archipelago CLI (archipelago) manages brick templates, scaffolds new projects, and keeps your development environment healthy.

Installation

bash
dart pub global activate archipelago_cli

Verify your installation:

bash
archipelago --version

doctor

Check system health and validate the development environment.

Usage:

bash
archipelago doctor [flags]

Flags:

FlagShortDescription
--verbose-vShow additional diagnostic information
--fixAuto-fix missing external dependencies
--brick <name>-bCheck dependencies for a specific brick only

Examples:

bash
archipelago doctor
bash
archipelago doctor --verbose
bash
archipelago doctor --brick auth
bash
archipelago doctor --fix

The 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 setup
    • gcloud — Google Cloud SDK for Firebase App Distribution / Play integration
    • supabase — 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:

bash
archipelago auth login [flags]

Flags:

FlagShortDescription
--token <token>-tAPI token for authentication
--interactive-iInteractive login flow (opens browser)

Examples:

bash
archipelago auth login --token your_api_token_here
bash
archipelago auth login --interactive

TIP

Use --token for CI environments. Use --interactive for local development — it opens a browser for OAuth login.

auth logout

Clear stored authentication credentials.

Usage:

bash
archipelago auth logout

auth status

Check current authentication status and tier information.

Usage:

bash
archipelago auth status

Output example:

✓ Authenticated
  User:  ryan@example.com
  Tier:  Pro
  Token: ****...abcd

auth activate

Activate a free trial using a promo code.

Usage:

bash
archipelago auth activate --promo <code>

Flags:

FlagShortDescription
--promo <code>-pThe promo code to activate

Examples:

bash
archipelago auth activate --promo LAUNCH2025

TIP

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:

bash
archipelago auth rotate-key

Output example:

✓ HMAC signing key rotated successfully
  New key active immediately
  Old key invalidated

WARNING

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:

bash
archipelago config set <key> <value>

Supported keys:

KeyValuesDescription
sourcer2, gitBrick download source. r2 = official Cloudflare R2 (default); git = enterprise fork.
repo<git-url>Enterprise fork URL. Only used when source is git.

Examples:

bash
archipelago config set source git
archipelago config set repo https://github.com/your-org/archipelago-enterprise.git
bash
archipelago config set source r2

TIP

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:

bash
archipelago config show

Output 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.git

config telemetry

Enable, disable, or inspect anonymous usage telemetry.

Usage:

bash
archipelago config telemetry [flags]

Flags:

FlagDescription
--enableOpt in to anonymous telemetry
--disableOpt out of telemetry
--statusShow current telemetry setting (default when no flag is passed)

Examples:

bash
archipelago config telemetry --enable
bash
archipelago config telemetry --disable
bash
archipelago config telemetry --status

brick

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:

bash
archipelago brick list

Aliases: 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:

bash
archipelago brick download <name> [flags]

Flags:

FlagDescription
--allDownload all available bricks

Examples:

bash
archipelago brick download auth
bash
archipelago brick download --all

brick update

Check all cached bricks for updates and download newer versions.

Usage:

bash
archipelago brick update

Output example:

✓ 2 update(s) available
  flutter_modular_monorepo  1.1.0 → 1.2.0  ✓ Updated
  feature_monorepo_skeleton 1.0.2 → 1.0.3  ✓ Updated

brick info

Show detailed information about a brick.

Usage:

bash
archipelago brick info <name>

Example:

bash
archipelago brick info flutter_modular_monorepo

Output 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:

bash
archipelago create [flags]

Flags:

FlagShortDescription
--config <path>-cPath to a pre-filled config JSON file (CI mode)
--output <dir>-oOutput directory (default: .)
--provision-firebasePrint Firebase setup commands and write a provision-firebase.sh helper script into the generated project
--provision-supabasePrint Supabase setup commands and write a provision-supabase.sh helper script into the generated project

Examples:

bash
archipelago create
bash
archipelago create --config project_config.json --output ./my_app
bash
archipelago create --provision-firebase --output ./my_app
bash
archipelago create --provision-supabase --output ./my_app

The --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:

  1. Creates a config template file in the current directory
  2. Opens it for you to fill in project values (name, org, features, etc.)
  3. Waits for you to save and press Enter
  4. Generates the project from your config
  5. 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:

bash
archipelago generate <brick-name> [flags]

Aliases: gen

Flags:

FlagShortDescription
--config <path>-cPath to a pre-filled config JSON file (CI mode)
--output <dir>-oOutput 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:

bash
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 ../archipelago

Common Brick Slugs

generate accepts a raw brick slug — there are no alias subcommands. Pass the exact slug shown in archipelago brick list:

SlugDescription
feature_monorepo_skeletonFeature module scaffold
flutter_ui_kitFlutter UI kit package
flutter_l10nLocalization package
app_scaffoldApp in an existing workspace
webview_sdkWebView SDK (flutter_inappwebview)
webview_sdk_advancedPro WebView add-on (JS bridge, interceptors, mini-app)
auth_sdkAuth 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:

bash
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.

bash
dart run monorepo_toolkit affected list
dart run monorepo_toolkit affected list --base develop
dart run monorepo_toolkit affected list --json   # for GitHub Actions matrix

affected analyze

Run flutter analyze lib on affected packages.

bash
dart run monorepo_toolkit affected analyze --base develop

affected test

Run flutter test on affected packages with optional coverage.

bash
dart run monorepo_toolkit affected test --coverage --base develop

affected run

Run an arbitrary command on affected packages.

bash
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:

bash
archipelago update

Output example:

✓ Checked for updates
⠏ Updating to 0.1.0...
✓ Updated to 0.1.0

TIP

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:

FlagDescription
--helpShow usage information
--versionShow the current CLI version
--verboseEnable noisy logging, including all shell commands executed

Exit Codes

CodeMeaning
0Success
64Usage error (invalid arguments)
70Software error (internal failure)

Built by Banua Coder