Installation
This guide will help you set up magical-nft for your project.
Prerequisites
Before you begin, make sure you have the following installed:
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 installOption 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 installEnvironment Configuration
Copy the example environment file:
cp .env.example .envThen fill in your configuration values (RPC URLs, private keys, etc.).
Verify Installation
Build the contracts to verify everything is set up correctly:
forge buildYou 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.