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

@fliidotdev/blinks-cli

v0.1.3

Published

CLI for Blinks SDK

Downloads

11

Readme

@fliidotdev/blinks-cli

Command-line interface for creating, managing, and deploying Solana Blinks. Build blockchain interactions from your terminal with powerful scaffolding and deployment tools.

Installation

Global Installation (Recommended)

npm install -g @fliidotdev/blinks-cli
# or
yarn global add @fliidotdev/blinks-cli
# or
pnpm add -g @fliidotdev/blinks-cli

Local Installation

npm install --save-dev @fliidotdev/blinks-cli
# or
yarn add -D @fliidotdev/blinks-cli
# or
pnpm add -D @fliidotdev/blinks-cli

Quick Start

# Create a new Blink project
blinks init my-blink-app

# Navigate to project
cd my-blink-app

# Start development server
blinks dev

# Deploy to mainnet
blinks deploy --network mainnet

Commands

blinks init [project-name]

Initialize a new Blinks project with boilerplate code and configuration.

blinks init my-project

# With options
blinks init my-project --template react --typescript --git

Options:

  • --template, -t - Project template (react | vue | vanilla | next)
  • --typescript, --ts - Use TypeScript (default: true)
  • --git - Initialize git repository
  • --install, -i - Install dependencies automatically
  • --pm - Package manager (npm | yarn | pnpm)

blinks create [type]

Create new Blink components and actions.

# Create a new action
blinks create action transfer-sol

# Create a new component
blinks create component payment-button

# Create a new hook
blinks create hook use-balance

Types:

  • action - Create a new Blink action
  • component - Create a React component
  • hook - Create a custom React hook
  • contract - Create a Solana program template

blinks dev

Start the development server with hot reload.

blinks dev

# Custom port
blinks dev --port 4000

# With network
blinks dev --network devnet

Options:

  • --port, -p - Port number (default: 3000)
  • --host, -h - Host address (default: localhost)
  • --network, -n - Solana network (mainnet | devnet | testnet)
  • --open, -o - Open browser automatically

blinks build

Build the project for production.

blinks build

# With optimization
blinks build --optimize

# Custom output directory
blinks build --out dist

Options:

  • --out, -o - Output directory (default: build)
  • --optimize - Enable optimization
  • --analyze - Analyze bundle size
  • --sourcemap - Generate source maps

blinks deploy

Deploy Blinks to Solana network.

# Deploy to devnet
blinks deploy --network devnet

# Deploy to mainnet with custom RPC
blinks deploy --network mainnet --rpc https://api.mainnet-beta.solana.com

# Deploy specific Blink
blinks deploy payment-blink --network mainnet

Options:

  • --network, -n - Target network (required)
  • --rpc, -r - Custom RPC endpoint
  • --keypair, -k - Path to keypair file
  • --program-id - Program ID to deploy to
  • --dry-run - Simulate deployment without executing

blinks test

Run tests for your Blinks.

# Run all tests
blinks test

# Run specific test
blinks test payment.test.ts

# With coverage
blinks test --coverage

# Watch mode
blinks test --watch

Options:

  • --coverage, -c - Generate coverage report
  • --watch, -w - Run in watch mode
  • --bail - Stop on first test failure
  • --verbose, -v - Verbose output

blinks validate

Validate Blink configurations and actions.

# Validate all Blinks
blinks validate

# Validate specific Blink
blinks validate payment-blink

# Validate with network check
blinks validate --network devnet

Options:

  • --network, -n - Network to validate against
  • --strict - Strict validation mode
  • --fix - Auto-fix issues where possible

blinks list

List all Blinks in the current project.

# List all Blinks
blinks list

# List with details
blinks list --detailed

# Filter by type
blinks list --type action

Options:

  • --detailed, -d - Show detailed information
  • --type, -t - Filter by type
  • --json - Output as JSON

blinks wallet

Manage wallet operations.

# Generate new wallet
blinks wallet generate

# Show wallet info
blinks wallet info

# Get balance
blinks wallet balance --network devnet

# Request airdrop (devnet only)
blinks wallet airdrop 2 --network devnet

Subcommands:

  • generate - Generate new wallet keypair
  • info - Display wallet information
  • balance - Check wallet balance
  • airdrop - Request SOL airdrop (devnet/testnet)

blinks config

Manage CLI configuration.

# Show current config
blinks config

# Set default network
blinks config set network mainnet

# Set custom RPC
blinks config set rpc https://api.mainnet-beta.solana.com

# Get specific value
blinks config get network

Subcommands:

  • set [key] [value] - Set configuration value
  • get [key] - Get configuration value
  • reset - Reset to default configuration
  • list - List all configuration options

Configuration

Project Configuration

Create blinks.config.js in your project root:

module.exports = {
  // Network configuration
  network: 'devnet',
  rpc: 'https://api.devnet.solana.com',
  
  // Build configuration
  build: {
    outDir: 'dist',
    sourcemap: true,
    minify: true
  },
  
  // Development server
  dev: {
    port: 3000,
    host: 'localhost',
    open: true
  },
  
  // Blink defaults
  defaults: {
    commitment: 'confirmed',
    preflightCommitment: 'processed'
  },
  
  // Custom paths
  paths: {
    actions: './src/actions',
    components: './src/components',
    contracts: './src/contracts'
  }
};

TypeScript Configuration

For TypeScript projects, use blinks.config.ts:

import { defineConfig } from '@fliidotdev/blinks-cli';

export default defineConfig({
  network: 'mainnet',
  rpc: process.env.SOLANA_RPC_URL,
  build: {
    target: 'es2020',
    lib: ['esnext', 'dom']
  }
});

Environment Variables

Create .env file for environment-specific configuration:

# Network
SOLANA_NETWORK=devnet
SOLANA_RPC_URL=https://api.devnet.solana.com

# Wallet
WALLET_PRIVATE_KEY=your_private_key_here

# API Keys
HELIUS_API_KEY=your_helius_key
QUICKNODE_API_KEY=your_quicknode_key

# Development
DEV_PORT=3000
DEV_HOST=localhost

Templates

React Template

blinks init my-app --template react

# Includes:
# - React 18 with TypeScript
# - Solana wallet adapter
# - Pre-built components
# - Example actions

Next.js Template

blinks init my-app --template next

# Includes:
# - Next.js 14 with App Router
# - Server-side rendering
# - API routes for Blinks
# - Optimized for production

Vue Template

blinks init my-app --template vue

# Includes:
# - Vue 3 with Composition API
# - TypeScript support
# - Pinia for state management
# - Vue Router

Vanilla Template

blinks init my-app --template vanilla

# Includes:
# - Pure JavaScript/TypeScript
# - No framework dependencies
# - Minimal bundle size
# - Web Components

Programmatic API

Use the CLI programmatically in your Node.js applications:

const { CLI } = require('@fliidotdev/blinks-cli');

const cli = new CLI();

// Initialize project
await cli.init('my-project', {
  template: 'react',
  typescript: true
});

// Create action
await cli.create('action', 'transfer', {
  template: 'transfer'
});

// Deploy
await cli.deploy({
  network: 'mainnet',
  rpc: 'https://api.mainnet-beta.solana.com'
});

Plugins

Extend CLI functionality with plugins:

// blinks.config.js
module.exports = {
  plugins: [
    '@fliidotdev/blinks-plugin-analytics',
    '@fliidotdev/blinks-plugin-monitoring',
    ['@fliidotdev/blinks-plugin-custom', {
      option1: 'value1'
    }]
  ]
};

CI/CD Integration

GitHub Actions

name: Deploy Blinks

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      
      - name: Setup Node.js
        uses: actions/setup-node@v2
        with:
          node-version: '18'
          
      - name: Install dependencies
        run: npm install
        
      - name: Install Blinks CLI
        run: npm install -g @fliidotdev/blinks-cli
        
      - name: Build
        run: blinks build --optimize
        
      - name: Deploy
        run: blinks deploy --network mainnet
        env:
          WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}

Vercel Deployment

{
  "buildCommand": "blinks build",
  "outputDirectory": "dist",
  "installCommand": "npm install && npm install -g @fliidotdev/blinks-cli"
}

Troubleshooting

Common Issues

  1. Command not found

    # Reinstall globally
    npm install -g @fliidotdev/blinks-cli
       
    # Or use npx
    npx @fliidotdev/blinks-cli init
  2. Network connection issues

    # Use custom RPC
    blinks deploy --rpc https://your-rpc-endpoint.com
  3. Transaction failures

    # Increase commitment level
    blinks deploy --commitment finalized
  4. Build errors

    # Clear cache
    blinks clean
    blinks build --no-cache

Debug Mode

Enable debug output for troubleshooting:

# Enable debug mode
DEBUG=blinks:* blinks deploy

# Verbose logging
blinks deploy --verbose

# Dry run
blinks deploy --dry-run

Best Practices

  1. Use environment variables for sensitive data
  2. Test on devnet before mainnet deployment
  3. Version control your blinks.config.js
  4. Implement proper error handling in custom actions
  5. Use TypeScript for better type safety
  6. Regular backups of wallet keypairs
  7. Monitor gas usage and optimize transactions

License

MIT © fliidotdev

Contributing

We welcome contributions! Please see our Contributing Guide.

Support