Straph.ai is an open-source CLI and SDK toolkit for the Story Protocol. It enables creators and developers to easily register media (video, audio, images, code) as on-chain IP assets, without needing deep Web3 knowledge.
- 🔐 Secure Wallet Management: Locally encrypted keystore for signing transactions.
- 📦 IPFS Integration: Automatic upload of media and metadata via Pinata.
- 🎨 Collection Management: Deploy your own SPG (Special Purpose Gateway) NFT collections.
- 📝 One-Command Registration: Mint and register IP Assets in a single step.
- 🧠 Smart Metadata: Auto-detection of MIME types and strict adherence to Story Protocol metadata standards.
# Clone the repository
git clone https://github.com/bixblues/straph.ai.git
cd straph.ai
# Install dependencies
pnpm install
# Build the project
pnpm build
# Link the CLI globally (for local development)
cd packages/cli
npm linkFirst, you need to import an Ethereum Private Key (needs Aeneid Testnet IP tokens). Your key is encrypted and stored locally on your machine.
straph wallet connectYou need a Pinata account for storing your files. Get your JWT from the API Keys section.
straph config set-pinata
# Paste your JWT when promptedBefore registering assets, you need an NFT collection to mint them into. This command deploys a new SPG-compatible collection and saves it as your default.
straph init-collection
# Follow prompts for Name and Symbol (e.g., "My Art", "ART")Now you are ready to register your IP!
straph register ./path/to/my-image.png --title "My Masterpiece" --description "A cool AI generated image"Straph will:
- Upload the image to IPFS.
- Generate compliant IP & NFT metadata.
- Mint the NFT on your collection.
- Register it as an IP Asset on Story Protocol.
- Return the IP ID and Transaction Hash.
This project is a monorepo managed by pnpm:
packages/cli: The command-line interface logic.packages/protocols: Core logic for interacting with Story Protocol and IPFS.packages/sdk: (Upcoming) Developer SDK for Node.js integration.packages/ai: (Upcoming) Adapters for AI generation tools.
See CONTRIBUTING.md for details on how to contribute.
MIT