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

nia-onboarding-agent

v1.0.2

Published

Nia Onboarding Agent — AI-powered Collison Installation for any SDK

Readme


Why "Collison Installation"?

The name comes from Paul Graham's 2013 essay Do Things that Don't Scale:

Stripe is one of the most successful startups we've funded, and the problem they solved was an urgent one. If anyone could have sat back and waited for users, it was Stripe. But in fact they're famous within YC for aggressive early user acquisition.

Startups building things for other startups have a big pool of potential users in the other companies we've funded, and none took better advantage of it than Stripe. At YC we use the term "Collison installation" for the technique they invented. More diffident founders ask "Will you try our beta?" and if the answer is yes, they say "Great, we'll send you a link." But the Collison brothers weren't going to wait. When anyone agreed to try Stripe they'd say "Right then, give me your laptop" and set them up on the spot.

— Paul Graham, Do Things that Don't Scale (July 2013)

This agent automates that moment. Instead of sending a link to your docs and hoping developers figure it out, the Nia Onboarding Agent reads your documentation, understands your SDK, and performs a full integration into the user's codebase — right then and there.

How It Works

The agent is powered by Nia, the knowledge engine by Nozomio Labs. Here's the flow:

  1. Index — Nia indexes your SDK documentation, GitHub repository, and package registry
  2. Research — The agent retrieves concrete code snippets, API patterns, and install instructions
  3. Plan — A custom installation plan is generated based on the target project's framework and structure
  4. Execute — An agentic loop (Claude + Anthropic SDK) reads, writes, and edits files in the user's codebase
  5. Verify — The agent runs typechecks, linting, and smoke tests to confirm the integration works

All knowledge retrieval — doc search, repo search, semantic search — is handled by Nia's API. The execution engine uses Anthropic's Claude Agent SDK with the claude_code tool preset.

Usage

Prerequisites

You need two API keys set in your environment:

export NIA_COLLISON_NIA_API_KEY=nk_...      # Nia API key — get one at https://trynia.ai
export ANTHROPIC_API_KEY=sk-ant-api03-...    # Anthropic API key — https://console.anthropic.com

Then run:

npx nia-onboarding-agent \
  --work-email [email protected] \
  --product-name "Your Product" \
  --package-name @your-org/sdk \
  --docs-url https://docs.yourproduct.com

Or pass them inline:

NIA_COLLISON_NIA_API_KEY=nk_... ANTHROPIC_API_KEY=sk-ant-... npx nia-onboarding-agent \
  --work-email [email protected] \
  --product-name "Your Product" \
  --package-name @your-org/sdk \
  --docs-url https://docs.yourproduct.com

Options

| Option | Description | Type | Default | | ------------------- | -------------------------------------------------- | ------- | ------- | | --help | Show help | boolean | | | --version | Show version number | boolean | | | --debug | Enable verbose logging | boolean | false | | --ci | Enable CI mode (non-interactive) | boolean | false | | --execute | Execute generated plan immediately | boolean | false | | --dry-run | Preview changes without writing files | boolean | false | | --install-dir | Directory to apply integration changes | string | . | | --work-email | Owner email for the setup session | string | | | --product-name | Product name for generated assets | string | | | --package-name | SDK package name to install | string | | | --docs-url | Main docs entry URL for indexing | string | | | --repository | GitHub repo (owner/repo) for repo-aware planning | string | | | --organization-id | Organization id for multi-tenant context | string | | | --nia-base-url | Nia API base URL | string | apigcp.trynia.ai/v2 | | --nia-api-key | Nia API key | string | |

Environment Variables

| Variable | Description | Required | | ------------------------------ | ---------------------------------------- | -------- | | NIA_COLLISON_NIA_API_KEY | Nia API key for doc/repo indexing | Yes | | ANTHROPIC_API_KEY | Anthropic API key for the agent loops | Yes | | NIA_COLLISON_NIA_BASE_URL | Nia API base URL (override for dev) | No |

CLI flags follow the pattern NIA_COLLISON_<OPTION> and override env vars.

CI Mode

NIA_COLLISON_NIA_API_KEY=$NIA_KEY ANTHROPIC_API_KEY=$ANTHROPIC_KEY \
  npx nia-onboarding-agent \
  --ci \
  --execute \
  --work-email [email protected] \
  --product-name "Acme SDK" \
  --package-name @acme/sdk \
  --docs-url https://docs.acme.com \
  --install-dir .

In CI mode:

  • All prompts use provided flags (no interactive input)
  • --execute runs the plan automatically
  • --dry-run previews without writing

Architecture

bin.ts                        CLI entrypoint (yargs)
src/collison/
  cli.ts                      Interactive wizard flow
  service.ts                  Session prep → plan → execute pipeline
  research-agent.ts           Nia-powered doc/repo research
  agentic-runner.ts           Claude Agent SDK execution loop
  adaptive-retrieval.ts       Smart retrieval with fallback strategies
  question-engine.ts          Dynamic question generation
  source-lifecycle.ts         Doc/repo indexing orchestration
  nia-client.ts               Nia API client (v2)
  rollback.ts                 Rollback on failure
  types.ts                    Shared type definitions
  recipes/
    nextjs-app-router.ts      Next.js App Router recipe
apps/web/                     Dashboard web app (Next.js)

Execution Engine

The agent execution uses @anthropic-ai/claude-agent-sdk with the claude_code preset, which provides:

  • Read — Read files
  • Write — Write files
  • Edit — Patch files
  • Glob — File pattern matching
  • Grep — Text search
  • Bash — Command execution

In dry-run mode, only Read, Glob, and Grep are allowed.

Development

# Install dependencies
pnpm install

# Run locally against a target project
pnpm try --install-dir=/path/to/project \
  --work-email [email protected] \
  --product-name "Test" \
  --package-name @test/sdk \
  --docs-url https://docs.test.com

# Run tests
pnpm test

# Run the web dashboard
bun --cwd apps/web dev

Heritage

This project was originally forked from the PostHog Wizard, which pioneered the idea of using an AI agent to install an SDK into a user's codebase. The scaffolding for the agent execution loop and CLI structure draws from that work. Scaffolding credit also to the Sentry Wizard.

The Collison Installation Agent replaces the PostHog-specific MCP/skill system with Nia's general-purpose knowledge retrieval, making it work for any SDK — not just PostHog.

License

MIT — Nozomio Labs