Skip to main content

@repo/cli

MonoStack CLI for scaffolding apps/domains and managing migrations.

Alias

Add to .bashrc/.zshrc for shorter commands:

alias mono="mono"

Then use mono update my-app instead of mono update my-app.

Usage

mono --help

Commands

mono update <app>

Updates all changed files from parent app to derived app based on monostack.config.json. Applies all changes at once.

mono update salary-calc
mono update salary-calc --dry-run
mono update salary-calc --no-update

Options:

  • --dry-run: Show what would be updated without applying
  • --no-update: Don't update parentCommit in config

mono migrate <app>

Migrates changes commit-by-commit from parent app. Useful for reviewing each change.

mono migrate salary-calc
mono migrate salary-calc --dry-run

Options:

  • --dry-run: Show commits without applying
  • --no-update: Don't update parentCommit in config

mono scaffold app <name>

Scaffold a new app from parent template.

mono scaffold app my-new-app
mono scaffold app my-new-app --parent boiler

Options:

  • --parent <app>: Parent app to copy from (default: boiler)

mono scaffold domain <name>

Scaffold a new domain with routes and database schema.

mono scaffold domain user --app salary-calc
mono scaffold domain user-role --app salary-calc --plural user-roles

Options:

  • --app <app>: Target app (required)
  • --plural <name>: Plural form (default: same as name)

mono claude

Launch Claude Code with all workspace dependencies automatically added as additional directories.

# From an app directory (uses INIT_CWD)
mono claude

# Specify directory explicitly
mono claude --dir apps/salary-calc

# Pass arguments to claude
mono claude --print "explain this codebase"

# Dry run to see the command
mono claude --dry-run

Options:

  • --dir, -d <path>: Package directory (defaults to INIT_CWD or current working directory)
  • --dry-run: Show command without executing

This command reads the package.json in the target directory, finds all workspace:* dependencies, and launches Claude with --add-dir flags pointing to each resolved package path.

Config

Apps use monostack.config.json to track their parent:

{
"parentCommit": "abc123...",
"parentApp": "boiler"
}
  • parentCommit - last synced commit from parent app
  • parentApp - parent app name (default: "boiler")