npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sevenlabs-hq/carbon-cli

v0.12.0

Published

Generate decoders and scaffold indexers for Solana programs from Anchor or Codama IDL

Readme

@sevenlabs-hq/carbon-cli

npm version npm downloads

Generate decoders and scaffold indexers for Solana programs from Anchor or Codama IDL files.

Installation

# Install globally
npm install -g @sevenlabs-hq/carbon-cli

# Or use npx (no installation required)
npx @sevenlabs-hq/carbon-cli

Usage

The Carbon CLI provides two main commands: parse and scaffold.

Parse Command

Generate decoder code from IDL files or program addresses.

carbon-cli parse [OPTIONS]

Options

  • -i, --idl <fileOrAddress> - Path to an IDL json file or a Solana program address
  • -o, --out-dir <dir> - Output directory for generated code
  • -c, --as-crate - Generate as a Cargo crate layout (default: false)
  • -s, --standard <anchor|codama> - Specify the IDL standard to parse (default: anchor)
  • --event-hints <csv> - Comma-separated names of defined types to parse as CPI Events (Codama only)
  • -u, --url <rpcUrl> - RPC URL for fetching IDL when using a program address
  • --no-clean - Do not delete output directory before rendering (default: false)

Examples

Parse Anchor IDL file:

carbon-cli parse --idl my_program.json --out-dir ./src/decoders

Parse from program address:

carbon-cli parse --idl LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo --url mainnet-beta --out-dir ./src/decoders

Parse Codama IDL with event hints:

carbon-cli parse --idl my_program_codama.json --out-dir ./src/decoders --standard codama --event-hints "BuyEvent,CreatePoolEvent"

Scaffold Command

Generate a complete project skeleton with decoder and indexer setup.

carbon-cli scaffold [OPTIONS]

Options

  • -n, --name <string> - Name of your project
  • -o, --out-dir <dir> - Output directory
  • -d, --decoder <name> - Decoder name (auto-detected from IDL)
  • --idl <fileOrAddress> - IDL file or program address
  • --idl-standard <anchor|codama> - IDL standard
  • --idl-url <rpcUrl> - RPC URL for fetching IDL (when using program address)
  • --event-hints <csv> - Event hints for Codama IDL
  • -s, --data-source <name> - Name of data source
  • -m, --metrics <log|prometheus> - Metrics to use (default: log)
  • --with-postgres <boolean> - Include Postgres wiring and deps (default: true)
  • --with-graphql <boolean> - Include GraphQL wiring and deps (default: true)
  • --with-serde <boolean> - Include serde feature for decoder (default: false)
  • --force - Overwrite output directory if it exists (default: false)

Examples

Scaffold with generated decoder from IDL:

carbon-cli scaffold --name my-project --out-dir . --idl ./idl.json --idl-standard anchor --data-source rpc-block-subscribe

Scaffold with Helius Laserstream datasource:

carbon-cli scaffold --name my-project --out-dir . --idl ./idl.json --idl-standard anchor --data-source helius-laserstream

Interactive Mode

Both commands support interactive mode when run without required options:

# Interactive parse
carbon-cli parse

# Interactive scaffold
carbon-cli scaffold

Available Data Sources

  • rpc-block-subscribe - Uses Solana WS JSON RPC blockSubscribe
  • rpc-program-subscribe - Uses Solana WS JSON RPC programSubscribe
  • rpc-transaction-crawler - Crawls historical transactions
  • helius-laserstream - Helius Laserstream datasource
  • yellowstone-grpc - Yellowstone gRPC datasource
  • jito-shredstream-grpc - JITO Shredstream gRPC

Related Packages

Links

License

MIT