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

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

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: .)

Examples:

bash
archipelago create
bash
archipelago create --config project_config.json --output ./my_app
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: .)

Examples:

bash
archipelago generate my_custom_brick
archipelago gen my_custom_brick --config vars.json

Shortcut Subcommands

Common generation tasks have dedicated shortcuts:

generate feature

Generate a feature module scaffold.

bash
archipelago generate feature
archipelago gen feature --config feature_config.json

Uses brick: feature_monorepo_skeleton

generate ui-kit

Generate a Flutter UI kit package.

bash
archipelago generate ui-kit

Uses brick: flutter_ui_kit

generate l10n

Generate a localization package.

bash
archipelago generate l10n

Uses brick: flutter_l10n

generate app

Generate an app scaffold.

bash
archipelago generate app

Uses brick: app_scaffold

TIP

All generate subcommands support --config and --output flags, just like the parent command. The shortcut subcommands map a friendly name to the underlying brick 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.


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

Exit Codes

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

Built by Banua Coder