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

raiken

v0.5.1

Published

AI-powered E2E test generation, execution, and repair CLI

Readme

Raiken

AI-powered E2E test generation, execution, and repair.

Raiken is a developer-centric CLI tool that uses AI to automatically generate, run, and fix Playwright end-to-end tests. It understands your codebase through semantic analysis and generates tests with accurate selectors from your live application.

npm version License: MIT


Features

  • Natural Language Test Generation — Describe what you want to test, get working Playwright code
  • Smart Codebase Understanding — AST parsing + embeddings understand your app structure
  • Live DOM Capture — Captures real page elements for accurate, stable selectors
  • Visual Dashboard — Modern UI for generating, viewing, and managing tests
  • Self-Monitoring Tests — Automatically detects stale tests and suggests repairs

Installation

npm install -g raiken

Requires Node.js 18+


Quick Start

1. Initialize in your project

cd your-project
raiken init

This creates a raiken.config.json and sets up the test directory.

2. Set your API key

Raiken uses OpenRouter to access AI models (Claude, GPT-4, etc.).

export OPENROUTER_API_KEY=your_api_key_here

Or add it to a .env file in your project root:

OPENROUTER_API_KEY=sk-or-v1-your-key-here

Get a free API key at openrouter.ai/keys

3. Start the dashboard

raiken start

Open http://localhost:7101 in your browser.

4. Generate your first test

In the dashboard chat, describe what you want to test:

"Test the login flow at localhost:3000 - enter email and password, click submit, verify redirect to dashboard"

Raiken will:

  1. Analyze your codebase for context
  2. Capture the live DOM from your running app
  3. Generate a Playwright test with real selectors
  4. Save it to your test directory

Commands

| Command | Description | |---------|-------------| | raiken init | Initialize Raiken in your project | | raiken start | Start the server and dashboard on port 7101 | | raiken start -p 8080 | Start on a custom port |


Configuration

Create raiken.config.json in your project root:

{
  "testDirectory": "e2e",
  "baseUrl": "http://localhost:3000",
  "ai": {
    "model": "anthropic/claude-sonnet-4.5"
  }
}

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | testDirectory | string | "e2e" | Where to save generated tests | | baseUrl | string | "http://localhost:3000" | Your app's development URL | | ai.model | string | "anthropic/claude-sonnet-4.5" | OpenRouter model to use |

Supported AI Models

Any model available on OpenRouter, including:

  • anthropic/claude-sonnet-4.5 (recommended)
  • anthropic/claude-opus-4
  • openai/gpt-4o
  • google/gemini-2.0-flash
  • meta-llama/llama-3.3-70b

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | OPENROUTER_API_KEY | Yes | Your OpenRouter API key | | OPENROUTER_MODEL | No | Override the AI model | | OPENROUTER_BASE_URL | No | Custom API endpoint |


How It Works

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  Your Codebase  │────▶│  Raiken Analyzer │────▶│  Code Graph DB  │
└─────────────────┘     └──────────────────┘     └─────────────────┘
                                                         │
┌─────────────────┐     ┌──────────────────┐             │
│  Your Running   │────▶│  DOM Capture     │             │
│  Application    │     │  (Playwright)    │             │
└─────────────────┘     └──────────────────┘             │
                                │                        │
                                ▼                        ▼
                       ┌──────────────────────────────────┐
                       │         AI Test Generator        │
                       │    (Claude/GPT-4 via OpenRouter) │
                       └──────────────────────────────────┘
                                        │
                                        ▼
                       ┌──────────────────────────────────┐
                       │     Generated Playwright Test    │
                       │         saved to e2e/            │
                       └──────────────────────────────────┘
  1. Codebase Analysis — Raiken parses your source files, extracts functions, components, and routes, then creates embeddings for semantic search.

  2. DOM Capture — When you describe a test, Raiken launches a headless browser, navigates to your app, and captures all interactive elements with their selectors.

  3. Context Assembly — Relevant code snippets + live DOM elements are assembled into a rich context for the AI.

  4. Test Generation — The AI generates a Playwright test using real selectors from your application.

  5. Test Execution — Run generated tests with Playwright:

    npx playwright test

Project Structure

After initialization, Raiken creates:

your-project/
├── raiken.config.json    # Configuration
├── .raiken/
│   └── raiken.db         # Local SQLite database (code graph, embeddings)
└── e2e/                  # Generated tests (configurable)
    └── login.spec.ts

Running Generated Tests

Raiken generates standard Playwright tests. Run them with:

# Run all tests
npx playwright test

# Run specific test
npx playwright test e2e/login.spec.ts

# Run with UI
npx playwright test --ui

If you don't have Playwright installed:

npm init playwright@latest

Troubleshooting

"OPENROUTER_API_KEY not configured"

Set your API key:

export OPENROUTER_API_KEY=sk-or-v1-xxxxx

Or add it to .env in your project root:

OPENROUTER_API_KEY=sk-or-v1-xxxxx

Dashboard not loading

Make sure port 7101 is available, or use a different port:

raiken start -p 8080

DOM capture fails

Ensure your application is running at the URL you specify in your test prompt (e.g., "test login at localhost:3000").


License

MIT © Raiken Foundation


Links