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
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: ****...abcdbrick
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: .) |
Examples:
archipelago createarchipelago create --config project_config.json --output ./my_appHow 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: .) |
Examples:
archipelago generate my_custom_brick
archipelago gen my_custom_brick --config vars.jsonShortcut Subcommands
Common generation tasks have dedicated shortcuts:
generate feature
Generate a feature module scaffold.
archipelago generate feature
archipelago gen feature --config feature_config.jsonUses brick: feature_monorepo_skeleton
generate ui-kit
Generate a Flutter UI kit package.
archipelago generate ui-kitUses brick: flutter_ui_kit
generate l10n
Generate a localization package.
archipelago generate l10nUses brick: flutter_l10n
generate app
Generate an app scaffold.
archipelago generate appUses 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:
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 |
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
64 | Usage error (invalid arguments) |
70 | Software error (internal failure) |