Install

Installs formulas to a codebase.

Usage

Use the install command to add a formula to a codebase, from the local registry.

Terminal
g0 install <formula-name>

This will install files from the specified formula, as well as bundled formulas under the formulas and dev-formulas field in the specified formula's formula.yml file (recursively) to the codebase at cwd.

Formula "essentials"
essentials
├── formula.yml
├── rules
│   └── essentials
│       └── clean-code.mdc
├── commands
│   └── essentials
│       └── clean-files.md
└── ai
    └── guidelines
        ├── dry.md
        └── modular.md

GroundZero only searches and installs markdown files to supported platform directories and the root /ai directory.
See Platforms for a complete list of supported platforms.

The install command will also add a codebase specific .groundzero/formula.yml file (or update to include the installed formula, if existing), along with installed formula formula.yml files under each .groundzero/formulas/<formula-name>/ directories.

.groundzero/formula.yml
name: my-nextjs-project
version: 0.1.0
formulas:
  - name: essentials
    version: ^0.1.2

If the install command is performed without specifying a <formula-name>, the CLI will look for the codebase specific .groundzero/formula.yml file and attempt to install formulas listed under formulas and dev-formulas.

.groundzero/formula.yml
name: my-nextjs-project
version: 0.1.0
formulas:
  - name: essentials
    version: ^0.1.2
dev-formulas:
  - name: formula-essentials
    version: ^0.2.3
Terminal
g0 install
# This will install `scalable-nextjs` and `formula-essentials`, as well as
# all bundled formulas specified in the `scalable-nextjs` `formula.yml` file, recursively.
Installation of bundled formulas under formula.yml formulas and dev-formulas behaves very similarly to npm's package.json dependencies and devDependencies. One notable difference is that all formula installations are flattened and conflicts are manually resolved with single version overrides.

Advanced Usage

Install specific versions

Use the @ notation to specify a specific version to install.

Terminal
g0 install <formula-name>@<version>

Install to platforms

GroundZero CLI automatically detects supported AI coding platforms to install to (by searching for existing platform specific directories, such as .cursor, .claude, etc.)
You can also specify which platforms to install to using the --platforms option, which is useful for initial setup across multiple platforms.

Terminal
g0 install <formula-name> --platforms cursor claude

Dev formulas

Only development formulas specified under the project level formula.yml file (under dev-formulas) will be installed to the codebase. In other words, formulas under formulas will be installed recursively, while only project level dev-formulas will be installed.

To install a formula as a dev-formula, use the --dev option.

Terminal
g0 install formula-essentials --dev
# This will install `formula-essentials` and
# add `formula-essentials` under `dev-formulas`.
.groundzero/formula.yml
name: my-nextjs-project
version: 0.1.0
formulas:
  - name: essentials
    version: ^0.1.2
dev-formulas: 
  - name: formula-essentials
    version: ^0.2.3