Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Installation

This guide will help you set up magical-nft for your project.

Prerequisites

Before you begin, make sure you have the following installed:

  • Bun - JavaScript runtime
  • Foundry - Ethereum development toolkit
  • Git - Version control

Option 1: Create a New Project (Recommended)

Use the CLI to scaffold a new project in a new directory:

# Link the CLI tool
bun link
 
# Create a new project
magical-nft create "My Project Name"

This will create a folder named my-project-name with the template set up, git initialized, and Forge dependencies installed.

Then install JS dependencies:

cd my-project-name
bun install

Option 2: Clone and Setup

Clone the repository and set up in the current directory:

git clone https://github.com/nahiiko/magical-nft
cd magical-nft
bun run setup "My Project Name"

Since Forge uses git submodules, you'll need to initialize them:

git init  # If not already a git repo
forge install foundry-rs/forge-std OpenZeppelin/openzeppelin-contracts vectorized/solady
bun install

Environment Configuration

Copy the example environment file:

cp .env.example .env

Then fill in your configuration values (RPC URLs, private keys, etc.).

Verify Installation

Build the contracts to verify everything is set up correctly:

forge build

You should see a successful compilation with no errors.

Next Steps

Now that you have magical-nft installed, continue to the Quick Start guide to learn how to use it.