Skip to content

CLI

The marmotte CLI scaffolds new projects and adds tooling to existing ones. Every command works in two modes:

  • Interactive — prompts guide you through each choice.
  • Non-interactive — pass flags to skip prompts entirely, useful in CI or scripts.

Installation

The CLI is included when you install marmotte:

sh
npm install --save-dev marmotte
npx marmotte --help

Or install globally:

sh
npm install -g marmotte
marmotte --help

marmotte create [dir]

Scaffold a new project from a template.

sh
marmotte create [dir] [options]

Options

FlagDescription
-t, --template <id>Template ID or remote source. Skips the template prompt and enables non-interactive mode.
-n, --name <name>Project name written into package.json. Defaults to the directory basename.
--no-examplesOmit example source files (built-in templates only).
-f, --features <ids...>Space-separated feature IDs to apply. Skips the feature prompt.

Built-in templates

IDDescription
node-libraryTypeScript library with Lib(), DTS, and docs
ui-libraryVue 3 + Vuetify component library with UILib()
ui-appVue 3 + Vuetify SPA with routing and UIApp()

Custom templates are also supported — pass a git source or local path as the template value:

sh
# GitHub shorthand
marmotte create ./my-app -t user/my-template

# giget sources
marmotte create ./my-app -t github:user/repo
marmotte create ./my-app -t gitlab:user/repo

# Local path
marmotte create ./my-app -t ./path/to/template

Examples

sh
# Fully interactive
marmotte create

# Specify directory, prompt for the rest
marmotte create ./my-lib

# Non-interactive: built-in template, no examples
marmotte create ./my-lib --template node-library --name my-lib --no-examples

# Non-interactive with features
marmotte create ./my-app -t ui-app -n my-app -f lint format

marmotte setup [dir]

Add tooling features to an existing project. Reads package.json, patches it with the selected features, and runs npm install.

sh
marmotte setup [dir] [options]

Options

FlagDescription
-f, --features <ids...>Space-separated feature IDs to apply. Skips the feature prompt.

Available features

IDWhat it adds
lintoxlintlint and lint:fix scripts
formatoxfmtfmt and fmt:check scripts
pre-commithusky + lint-staged pre-commit hook
changesets@changesets/clichangeset, version, and release scripts

Examples

sh
# Fully interactive
marmotte setup

# Non-interactive: apply lint and format to an existing project
marmotte setup -f lint format

# Target a specific directory
marmotte setup ./packages/my-lib -f lint format pre-commit