>_AGENT_RULES

Options

Version pinning, global installs, conflicts, and more.

Platform Shorthand

The --platform flag can be shortened to -p:

npx @agentrules/cli add my-preset -p opencode

Or specify the platform in the preset name using dot notation:

npx @agentrules/cli add my-preset.opencode

Installing a Specific Version

Presets use MAJOR.MINOR versioning. By default, the latest version is installed.

# With --version flag
npx @agentrules/cli add my-preset -p opencode --version 1.0

# Or use @ syntax
npx @agentrules/cli add my-preset.opencode@1.0

Global vs Project Install

By default, presets install to your current project directory.

# Project install (default) → .opencode/
npx @agentrules/cli add my-preset -p opencode

# Global install → ~/.config/opencode
npx @agentrules/cli add my-preset -p opencode --global
Install TypeOpenCodeClaudeCursorCodex
Project.opencode/.claude/.cursor/.codex/
Global~/.config/opencode~/.claude~/.cursor~/.codex

Preview Before Installing

See what files would be installed without writing anything:

npx @agentrules/cli add my-preset -p opencode --dry-run

Handling Conflicts

When a file already exists:

# Overwrite (backs up existing files to .bak)
npx @agentrules/cli add my-preset -p opencode --force

# Overwrite without backups
npx @agentrules/cli add my-preset -p opencode --force --no-backup

# Skip conflicting files, only add new ones
npx @agentrules/cli add my-preset -p opencode --skip-conflicts

Without these flags, the CLI shows you what conflicts exist and lets you decide.

Custom Directory

Install to a specific directory instead of the default:

npx @agentrules/cli add my-preset -p opencode --dir ./custom/path

Using Custom Registries

By default, presets come from agentrules.directory. You can add other registries:

# Add a registry
npx @agentrules/cli registry add company https://registry.company.com

# Install from it
npx @agentrules/cli add my-preset -p opencode --registry company

# Set as default
npx @agentrules/cli registry use company

All Options

OptionDescription
-p, --platformTarget platform: opencode, claude, cursor, codex
-V, --versionInstall a specific version
-g, --globalInstall to global config directory
--dirInstall to a custom directory
-r, --registryUse a specific registry
-f, --forceOverwrite existing files (backs up to .bak)
--no-backupDon't backup when using --force
--dry-runPreview without writing
--skip-conflictsSkip files that already exist

On this page