Skip to content

Straph is an open-source CLI and SDK toolkit for the Story Protocol.

Notifications You must be signed in to change notification settings

bixblues/straph.ai

Repository files navigation

Straph.ai

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.

Features

  • 🔐 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.

Installation

# 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 link

Quick Start

1. Connect Wallet

First, 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 connect

2. Configure IPFS (Pinata)

You need a Pinata account for storing your files. Get your JWT from the API Keys section.

straph config set-pinata
# Paste your JWT when prompted

3. Deploy Your Collection

Before 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")

4. Register an Asset

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:

  1. Upload the image to IPFS.
  2. Generate compliant IP & NFT metadata.
  3. Mint the NFT on your collection.
  4. Register it as an IP Asset on Story Protocol.
  5. Return the IP ID and Transaction Hash.

Architecture

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.

Development

See CONTRIBUTING.md for details on how to contribute.

License

MIT

About

Straph is an open-source CLI and SDK toolkit for the Story Protocol.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published