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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@startblock-ai/cli

v1.1.0

Published

Automatic knowledge capture for codebases, allowing you to capture knowledge before it's lost.

Readme

🚀 Startblock CLI

Automatic knowledge capture for codebases. Capture the "WHY" behind your code before it's lost.

npm version License: MIT

Stop losing context when developers leave or switch projects. sb-cli integrates directly into your git workflow to automatically document your code changes, capture developer insights, and maintain a living knowledge base.


✨ Why Startblock?

  • 🧠 Never Lose Context Again: Automatically generate documentation for every file you touch.
  • ⚡ Zero Friction: Runs as a git hook. No context switching, no separate apps.
  • 💬 Capture Insights: An optional, quick prompt asks for your "gotchas" and "tricky choices" right when they're fresh in your mind.
  • 📁 Mirrored Structure: Knowledge files live right alongside your code in .startblock/knowledge/, mirroring your project structure.
  • 🤖 AI-Powered: Uses OpenAI to analyze code changes, dependencies, and purpose automatically.

📦 Installation

Install the CLI globally using npm:

npm install -g @startblock-ai/cli

Note: If you encounter permission errors, check our Installation Guide.

Verify Installation

sb --help
sb --version  # Check installed version

🚀 Quick Start

Get up and running in seconds.

For New Repositories

  1. Clone and install:

    git clone your-repo
    cd your-repo
    npm install

    If the repo has Startblock configured, onboarding runs automatically after npm install!

  2. Or initialize manually:

    cd your-project
    sb init

    This sets up the git hooks and prompts you for your OpenAI API key.

For Existing Repositories

  1. Run onboarding:

    sb onboard

    This analyzes key files and generates onboarding documentation.

  2. Commit code as usual:

    git add .
    git commit -m "feat: added payment retry logic"
  3. That's it!

    • The CLI will analyze your changes.
    • It will ask if you want to add any insights (optional).
    • Your knowledge files are generated and committed automatically! 🎉

🛠️ How It Works

Automatic Onboarding

When you clone a repository with Startblock enabled and run npm install, the postinstall script automatically invites you to run sb onboard. This:

  1. Collects your goals - What are you trying to accomplish? What's your experience level?
  2. AI selects best files - Intelligently chooses ~5 files most relevant to your goal
  3. Analyzes and documents - Generates knowledge files for those selected files
  4. Creates onboarding docs - Living documentation in .startblock/onboarding/ (INDEX.md, SETUP.md, ARCHITECTURE.md, etc.)
  5. Saves session - Stores your onboarding context in .startblock/sessions/ (never committed)
  6. Continue in Cursor - Use Startblock's MCP in Cursor chat for personalized, conversational onboarding

The onboarding experience:

  • CLI: Run sb onboard to get started with personalized file selection and analysis
  • Cursor Chat: Continue onboarding conversationally - Startblock uses your session data to guide you through the codebase
  • Living Docs: Onboarding docs evolve as you learn - they're never overwritten, only refined

Commit-Time Analysis

  1. You Commit: git commit -m "..."
  2. Analysis: AI scans your staged files to understand purpose and dependencies.
  3. Context: You see a summary of what's changing.
  4. Insight (Optional): "Any gotchas or tricky choices?" -> You type a quick note.
  5. Generation: AI combines its analysis with your notes to create detailed markdown docs.
  6. Done: The docs are staged and committed with your code.

Ideally suited for:

  • Teams with high turnover or rapid scaling.
  • Complex codebases with "hidden knowledge".
  • "Lazy" developers who hate writing documentation manually (we got you!).

📋 Commands

  • sb init - Initialize Startblock in current repository
  • sb onboard - Run personalized onboarding (collects your goals, AI-selects files, generates docs)
  • sb onboard --postinstall - Non-blocking onboarding invitation after npm install (used automatically)
  • sb analyze-commit - Analyze staged files (used by Husky hook)
  • sb setup-onboarding - Configure automatic onboarding for maintainers (adds postinstall script)
  • sb --version or sb -v - Show CLI version
  • sb --help or sb -h - Show help message

Onboarding Flow:

  1. Run sb onboard - Answer a few questions about your goals and experience
  2. CLI analyzes AI-selected files and generates knowledge docs
  3. Continue in Cursor chat - Startblock's MCP uses your session to guide personalized onboarding
  4. Docs evolve - Onboarding documentation improves with each session

⚙️ Configuration

After running sb init, you can customize behavior in .sb-config.json:

{
  "openai": {
    "apiKey": "sk-...", // Your OpenAI Key
    "model": "gpt-4o-mini", // Recommend gpt-4o for best results
    "temperature": 0.3
  },
  "analysis": {
    "excludePatterns": ["*.test.ts", "dist/**"],
    "maxFilesPerAnalysis": 10
  }
}

🔒 Security: Your API key is stored locally in .sb-config.json which is automatically added to .gitignore.


📚 Resources


License

MIT © Startblock