Crossmint CLI Setup Guide
Install and Configure the Crossmint CLI
1️⃣ Install Dependencies
pnpm install
2️⃣ Build the CLI
pnpm build
4️⃣ Link the CLI Globally
pnpm link --global
5️⃣ Verify the CLI is Installed
crossmint --help
Development Mode (Auto-Reload)
To automatically rebuild and relink on changes:
pnpm dev
Troubleshooting Issues
Issue: zsh: command not found: crossmint
Fix: Ensure the CLI is linked globally:
pnpm unlink --global
pnpm link --global
Then, verify it’s linked:
pnpm bin -g
ls -l $(pnpm bin -g)
Issue: pnpm bin -g
is empty or returns an error
Fix: The global bin directory is missing or not in PATH
. Run:
pnpm config set global-bin-dir ~/.local/bin
Then, add it to your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Then, relink the CLI:
pnpm unlink --global
pnpm link --global
Releasing
For releasing you will need to modify the package.json version. You can do this by running
pnpm version <patch|minor|major>
Then you'll have to commit the package change and include it in your PR.
For Running a Production Build
First build the js dist for pkg
pnpm build:pkg
Notice that this will break the pnpm linked bin, you can fix it by running later pnpm build
.
Then run to create the binary:
pnpm exec pkg dist/bin/crossmint.js --targets node20-macos-arm64 --output build/cli
Then try the package by running:
./build/cli help