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

@beaulewis/saas-cli

v1.0.2

Published

A unified CLI tool for Flutter SaaS development with live documentation, code generation, and backend integration

Readme

saas-cli

A unified CLI for Flutter SaaS development

Live documentation · AI-powered assistance · Code generation · Backend integrations

npm version npm downloads license CI node PRs Welcome


Table of Contents


Features

| Feature | Description | |---------|-------------| | Live Documentation | Query Flutter, Dart, and package docs via Context7 | | AI-Powered Questions | Ask technical questions with Perplexity AI | | Code Generation | Generate Riverpod, Drift, GoRouter, Freezed, and more | | Supabase Management | RLS policies, migrations, types, functions | | Backend Services | Redis, Cloudflare Workers, OneSignal, PostHog | | Video Processing | FFmpeg-based video operations |


Requirements

Core Requirement

External CLI Dependencies

Some commands require external CLIs to be installed. The table below shows which CLIs are needed for each command:

| Command | Required CLI | Installation | |---------|--------------|--------------| | saas init flutter | Flutter SDK | flutter.dev/get-started/install | | saas init add | Flutter SDK | flutter.dev/get-started/install | | saas init worker | Wrangler CLI | npm install -g wrangler | | saas init supabase | Supabase CLI | npm install -g supabase or brew install supabase/tap/supabase | | saas video * | FFmpeg | brew install ffmpeg (macOS) or apt install ffmpeg (Linux) | | saas cf * | Wrangler CLI | npm install -g wrangler | | saas supabase * | Supabase CLI | npm install -g supabase or brew install supabase/tap/supabase |

Commands Without External Dependencies

These commands work out of the box with just Node.js:

  • saas docs - Documentation lookup (requires CONTEXT7_API_KEY)
  • saas ask - AI questions (requires PERPLEXITY_API_KEY)
  • saas gen - Code generation
  • saas redis - Redis management (requires REDIS_URL)
  • saas push - Push notifications (requires OneSignal keys)
  • saas flags - Feature flags (requires PostHog keys)

Installation

# Global install via npm
npm install -g @beaulewis/saas-cli

# Global install via pnpm
pnpm add -g @beaulewis/saas-cli

# Run without installing
npx @beaulewis/saas-cli --help

Verify installation:

saas --version
git clone https://github.com/Beaulewis1977/saas-cli.git
cd saas-cli
pnpm install
pnpm build
pnpm link --global

Quick Start

# Look up Flutter documentation
saas docs flutter "ListView.builder with pagination"

# Ask AI a question
saas ask "best practices for offline-first Flutter apps"

# Generate a Riverpod notifier
saas gen riverpod notifier UserList --state "List<User>"

Commands

docs - Documentation Lookup

Query live documentation via Context7.

saas docs flutter "widget lifecycle"
saas docs dart "async streams"
saas docs package riverpod "provider family"
saas docs widget "TextField decoration"

ask - AI-Powered Questions

Ask technical questions using Perplexity AI.

saas ask "how to implement pull-to-refresh in Flutter"
saas ask --model sonar-pro "explain Flutter rendering pipeline"
saas ask --model sonar-reasoning "debug this riverpod error"
saas ask --model sonar-deep-research "compare state management solutions"

Available Models:

| Model | Use Case | |-------|----------| | sonar | Fast, general queries (default) | | sonar-pro | Enhanced responses | | sonar-reasoning | Complex problem solving | | sonar-deep-research | In-depth research |

gen - Code Generation

Generate Flutter code scaffolds.

# Riverpod
saas gen riverpod notifier UserList --state "List<User>"
saas gen riverpod provider AuthService --async
saas gen riverpod family UserProfile --param userId

# Drift (SQLite)
saas gen drift table users --columns "id:int,name:text,email:text"
saas gen drift dao Users --table users

# GoRouter
saas gen gorouter route /profile --name profile
saas gen gorouter shell MainShell --routes home,profile,settings

# Freezed
saas gen freezed model User --fields "id:int,name:String,email:String?"
saas gen freezed union AuthState --variants loading,authenticated,unauthenticated

# PowerSync
saas gen powersync schema --from supabase
saas gen powersync sync-rules users,profiles

# Repository Pattern
saas gen repository User --methods "getById,getAll,create,update,delete"

supabase - Database Management

Manage Supabase backend.

# View schema
saas supabase schema
saas supabase schema --table users

# Create table
saas supabase create-table profiles --columns "user_id:uuid,avatar:text,bio:text"

# RLS policies
saas supabase rls recipes --policy user-owned --column user_id
saas supabase rls posts --policy public-read

# Migrations
saas supabase migration "add_avatar_to_profiles" --sql "ALTER TABLE..."

# Generate TypeScript types
saas supabase types

# Database functions
saas supabase fn get_user_stats --returns json

redis - Cache Management

Manage Redis cache and queues.

saas redis ping
saas redis info
saas redis keys "user:*"
saas redis get "session:abc123"
saas redis set "cache:data" '{"key":"value"}' --ttl 3600
saas redis del "cache:data"
saas redis queue add jobs '{"task":"process"}'
saas redis queue pop jobs

cf - Cloudflare Workers

Manage Cloudflare Workers and KV.

# Workers
saas cf worker list
saas cf worker deploy ./worker.js --name my-worker
saas cf worker logs my-worker

# KV
saas cf kv list
saas cf kv get MY_NAMESPACE key123
saas cf kv put MY_NAMESPACE key123 "value"

push - Push Notifications

Send notifications via OneSignal.

saas push send --title "Hello" --message "World" --segments "All"
saas push schedule --title "Reminder" --time "2025-01-15T10:00:00Z"
saas push template list
saas push template create welcome --title "Welcome!" --message "Thanks for joining"

flags - Feature Flags

Manage feature flags via PostHog.

saas flags list
saas flags get dark-mode
saas flags set dark-mode --enabled --percent 50
saas flags add-user dark-mode user123
saas flags remove-user dark-mode user123

video - Video Processing

FFmpeg-based video operations.

saas video info input.mp4
saas video thumbnail input.mp4 --time 00:00:05 --output thumb.jpg
saas video resize input.mp4 --width 1280 --height 720
saas video compress input.mp4 --quality medium
saas video trim input.mp4 --start 00:00:10 --end 00:00:30
saas video combine video1.mp4 video2.mp4 --output merged.mp4

init - Project Scaffolding

Initialize new projects.

saas init flutter my-app --template saas
saas init supabase --project my-app
saas init worker my-edge-function
saas init add riverpod,drift,freezed

Environment Variables

The CLI reads environment variables for API keys and service credentials. You have two options:

Option 1: Project .env File (Recommended)

Create a .env file in your project directory. This allows different API keys per project.

# Create .env in your project root (add to .gitignore!)
touch .env

Copy this template into your .env file:

# Documentation (Context7)
CONTEXT7_API_KEY=

# AI Questions (Perplexity)
PERPLEXITY_API_KEY=

# Supabase
SUPABASE_PROJECT_REF=
SUPABASE_ACCESS_TOKEN=

# Redis
REDIS_URL=

# Cloudflare Workers
CF_API_TOKEN=

# Push Notifications (OneSignal)
ONESIGNAL_APP_ID=
ONESIGNAL_API_KEY=

# Feature Flags (PostHog)
POSTHOG_API_KEY=
POSTHOG_PROJECT_ID=

Add .env to your .gitignore to avoid committing secrets:

.env

Option 2: Shell Exports (Global)

Add these to your ~/.bashrc, ~/.zshrc, or shell config for system-wide access:

# Documentation (Context7)
export CONTEXT7_API_KEY="your-key-here"

# AI Questions (Perplexity)
export PERPLEXITY_API_KEY="pplx-your-key-here"

# Supabase
export SUPABASE_PROJECT_REF="your-project-ref"
export SUPABASE_ACCESS_TOKEN="your-access-token"

# Redis
export REDIS_URL="redis://localhost:6379"

# Cloudflare Workers
export CF_API_TOKEN="your-cloudflare-token"

# Push Notifications (OneSignal)
export ONESIGNAL_APP_ID="your-app-id"
export ONESIGNAL_API_KEY="your-api-key"

# Feature Flags (PostHog)
export POSTHOG_API_KEY="your-posthog-key"
export POSTHOG_PROJECT_ID="your-project-id"

After adding, reload your shell: source ~/.bashrc or source ~/.zshrc

Note: Shell-exported environment variables take precedence over .env file values. If you have both, the shell export wins.

Variable Reference

| Variable | Description | Required For | |----------|-------------|--------------| | CONTEXT7_API_KEY | Context7 API key | docs | | PERPLEXITY_API_KEY | Perplexity API key | ask | | SUPABASE_PROJECT_REF | Supabase project reference | supabase | | SUPABASE_ACCESS_TOKEN | Supabase access token | supabase | | REDIS_URL | Redis connection URL | redis | | CF_API_TOKEN | Cloudflare API token | cf | | ONESIGNAL_APP_ID | OneSignal app ID | push | | ONESIGNAL_API_KEY | OneSignal API key | push | | POSTHOG_API_KEY | PostHog API key | flags | | POSTHOG_PROJECT_ID | PostHog project ID | flags |


Global Options

--json          Output results as JSON
-v, --verbose   Enable verbose output
--debug         Enable debug output
-V, --version   Display version number
-h, --help      Display help

Configuration

The CLI stores configuration in ~/.config/saas-cli/:

~/.config/saas-cli/
├── config.yaml    # CLI settings
└── cache/         # Response cache for faster lookups

Security Notes

This CLI executes external tools (FFmpeg, Wrangler, Flutter, Supabase CLI) via shell commands. Ensure you trust the input you provide, especially for:

  • Project names in init commands
  • File paths in video commands
  • Custom arguments passed to backend CLIs

Contributing

Contributions are welcome! See CONTRIBUTING.md for development guidelines.

# Clone and install
git clone https://github.com/Beaulewis1977/saas-cli.git
cd saas-cli
pnpm install

# Run in development
pnpm dev

# Run tests
pnpm test

# Build
pnpm build

License

MIT License - see LICENSE file for details.


Author

Beau Lewis

GitHub Email


Support This Project

If you find this tool useful and want to support continued development:

Ko-fi Venmo