moose_cli 0.8.0 copy "moose_cli: ^0.8.0" to clipboard
moose_cli: ^0.8.0 copied to clipboard

Moose CLI is a lightweight utility that reports the currently installed CLI version.

Moose CLI #

Moose CLI is a lightweight, globally installable tool that surfaces metadata about the Moose ecosystem and proxies common workflows (e.g., bootstrapping Moose starter templates via manifests) in an AI-friendly manner.

Install #

# Verify Flutter is on PATH (required because the CLI bootstraps Flutter projects)
# macOS/Linux:
flutter --version >/dev/null 2>&1
# Windows (PowerShell):
flutter --version > $null 2>&1

# If the command above fails, install Flutter first: https://docs.flutter.dev/get-started/install

dart pub global activate moose_cli

Once activated you can run the CLI from anywhere. The snippet below walks through the most common flows:

# Print the installed version
moose version

# Scaffold an empty Flutter project (no manifest needed)
moose init my_app

# Bootstrap from a named built-in template
moose init my_app --template shopify

# Bootstrap a Moose starter project using a manifest on disk
moose init my_app --manifest ./starter_manifest.json

# Or point to a remote manifest (GitHub raw, CDN, etc.)
moose init my_app --manifest https://raw.githubusercontent.com/greymooseinc/moose_templates/refs/heads/main/shopify.json

What happens during moose init? #

# verbose mode streams git output as repositories are cloned
moose init storefront --manifest ./manifests/shopify.json --verbose
  1. Manifest download – reads shopify.json from disk or an HTTPS URL.
  2. Base repo clone – clones the base.repository into storefront, strips .git, and prepares the project.
  3. Extensions clone – pulls the extensions.repository, copies the requested plugins/adapters into lib/plugins and lib/adapters, and merges any dependency overrides.
  4. Registration – updates lib/main.dart by adding import statements and calling pluginRegistry.registerPlugin / adapterRegistry.registerAdapter using the classes declared in each module’s moose.manifest.json.
  5. Configuration – writes plugin/adapter config blocks into assets/config/environment.json.
  6. Dependencies – merges module dependencies into pubspec.yaml and runs dart pub get.

When init finishes you’ll see a cd <project> hint, so you can immediately start building inside the new workspace.

Commands #

Command Description
moose init <name> Scaffolds an empty Flutter project.
moose init <name> --template <name> Scaffolds from a named built-in template (e.g. shopify).
moose init <name> --manifest <path|url> Copies the manifest-defined template into the target directory.
moose plugin add <name> (--git repo | --path dir) Installs a plugin from a git repo or local directory into lib/plugins/<name>.
moose adapter add <name> (--git repo | --path dir) Installs an adapter from a git repo or local directory into lib/adapters/<name>.
moose version Prints the currently installed CLI version.
moose help <command> Prints detailed usage (flags, subcommands) for the selected command.
# Add a plugin from a remote extensions repo
moose plugin add loyalty --git https://github.com/greymooseinc/moose_extensions.git

# Add an adapter from a local extensions checkout
moose adapter add stripe --path ./extensions/lib/adapters

Tips:

  • Use --template <name> for built-in templates; use --manifest for a local file or custom URL. They are mutually exclusive.
  • Templates are defined by manifest JSON files. Use --manifest to point to those manifests, either on disk or via an HTTPS URL.
  • Command output is color-coded with emoji markers so you can follow progress at a glance.
  • Use moose plugin add or moose adapter add to pull individual modules without re-running init.
  • If you omit --git when running moose plugin|adapter add, the CLI defaults to https://github.com/greymooseinc/moose_extensions.git.
  • The manifest must specify the base repository and optional extensions repository; git must be installed and available on PATH.
  • When plugins or adapters are present in the manifest, lib/main.dart is automatically updated to import and register them.
  • Plugin/adapter configs defined in manifests are merged into assets/config/environment.json under their respective sections.
  • Each plugin can ship its own moose.manifest.json describing required imports and dependencies. These dependencies are merged into your project's pubspec.yaml before dart pub get runs.
  • dart pub get runs automatically after cloning the template and installing extensions so dependencies stay in sync.

Development #

dart test
0
likes
0
points
288
downloads

Publisher

verified publishermooseapp.ai

Weekly Downloads

Moose CLI is a lightweight utility that reports the currently installed CLI version.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, io, path

More

Packages that depend on moose_cli