Skip to main content

Installation

Get up and running with Compose in just a few minutes.

Packages​

Compose is published as two npm packages:

Prerequisites​

  • Node.js >= 20: required for the CLI and for npm-based Hardhat workflows
  • Foundry (Optional): required if you use a Foundry scaffold or integrate Solidity with Forge
  • Git: used by Foundry dependency installs inside generated projects

Create a new project with Compose CLI​

The fastest path is to run the CLI with npx (no global install):

npx @perfect-abstractions/compose-cli init

Manual Installation​

To install the CLI globally:

npm install -g @perfect-abstractions/compose-cli
compose init

Add Compose to an existing project​

Foundry​

forge install Perfect-Abstractions/Compose@tag=compose@0.0.6

Create a remappings.txt file in the root of your project with the following content:

@perfect-abstractions/compose/=lib/Compose/src/

Hardhat / NPM​

npm install @perfect-abstractions/compose

Import Compose in your project​

import {DiamondMod} from "@perfect-abstractions/compose/diamond/DiamondMod.sol";

What's Next?​

Now that you have Compose installed, let's understand the core concepts:

Getting Help​

Having trouble with installation?

Newsletter

Get notified about releases, feature announcements, and technical deep-dives on building smart contracts with Compose.

No spam. Unsubscribe anytime.