Skip to content

Installing Packs

  • Node.js 18+
  • A project using React, Vue, or React Native / Expo
  • A published icon pack identifier like acme/brand/core-icons

React:

Terminal window
npx @icon-forge/cli install acme/brand/core-icons --framework react

Vue:

Terminal window
npx @icon-forge/cli install acme/brand/core-icons --framework vue

React Native / Expo:

Terminal window
npx @icon-forge/cli install acme/brand/core-icons --framework react-native

If this is your first install (no iconforge.json yet), passing --framework makes the command copy-pasteable in any environment. After the first run, the CLI saves your framework and output directory so you usually won’t need to pass them again.

On install, the CLI:

  1. Resolves the published manifest for the pack
  2. Downloads the release archive
  3. Writes one component file per slot
  4. Generates a barrel index.ts
  5. Creates or updates iconforge.json and iconforge-lock.json

Typical output:

Install
Pack: acme/brand/core-icons
Framework: react
Version: latest
API: https://app.iconforge.ai
> Fetching manifest
> Downloading archive
> Writing 42 components
> Generating barrel
> Replacing install directory
Done
Pack: acme/brand/core-icons
Release: 8f3a9c2d14be
Framework: react
Components: 42
Output: src/components/icons/core-icons/

If iconforge.json doesn’t exist yet, the CLI creates it and walks you through setup — it’ll ask for your framework, confirm the output directory, and anything else it needs. Your answers are saved so you won’t be asked again.

In CI or other non-interactive environments, pass the required options as flags instead (e.g., --framework react).

src/components/icons/core-icons/
├── ArrowLeft.tsx # or .vue for Vue
├── CheckCircle.tsx
├── Home.tsx
├── Settings.tsx
├── ...
└── index.ts

Each file is a self-contained component with inline SVG. React and Vue installs have no runtime dependency; React Native installs use react-native-svg.

By default, packs are written to src/components/icons/<pack-slug>/.

Customize with:

Terminal window
# Change the base output directory
npx @icon-forge/cli install acme/brand/core-icons --output-dir src/icons
# Override just the pack's folder name
npx @icon-forge/cli install acme/brand/core-icons --dir-name ui-icons
  • --output-dir sets the shared base directory for all packs
  • --dir-name overrides the leaf folder for this specific pack

So you can keep a stable base like src/components/icons/ while giving each pack a shorter local name like core/ or nav/.

FlagPurpose
`—framework reactvue
--output-dir PATHChange the base directory where packs are installed
--dir-name NAMEOverride just this pack’s folder name
--version HASHInstall a specific 12-character release hash instead of latest
--forceOverwrite unrelated conflicting files
--skipLeave conflicting files in place and install only new files
--dry-runPreview the install without writing files
--api-url URLPoint the CLI at a local or staging backend for that run

When files already exist at the destination, the CLI distinguishes between files it owns (tracked in the lockfile) and unrelated files that happen to be in the way.

FlagBehavior
--forceOverwrite unrelated conflicting files
--skipSkip conflicts, install only non-conflicting files
--dry-runShow what would happen without writing anything
(default)Error with a clear conflict message

Tracked files from a previous install of the same pack are always replaced — that’s a reinstall, not a conflict.

By default, the CLI installs the latest published release for the pack. To lock to a specific immutable release hash:

Terminal window
npx @icon-forge/cli install acme/brand/core-icons --version 8f3a9c2d14be

See Updating & Pinning for the full workflow.

The CLI defaults to https://app.iconforge.ai. For local development or staging:

Terminal window
npx @icon-forge/cli install acme/brand/core-icons --api-url http://127.0.0.1:7000

Or via environment variable:

Terminal window
ICONFORGE_API_URL=http://127.0.0.1:7000 npx @icon-forge/cli install acme/brand/core-icons

The API URL is not persisted in config — it only affects that run.

If you need the raw manifest and artifact endpoints behind the CLI, see API Reference.