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

@optimalai/optibot

v0.1.5

Published

AI code review CLI powered by Optibot

Readme

@optibot CLI

CLI tool for running AI code reviews powered by Optibot.

Install

npm install -g @optimalai/optibot

Authentication

Optibot CLI supports two authentication methods:

1. Browser-Based OAuth (Recommended for Interactive Use)

Best for local development and interactive CLI usage:

optibot login

This will:

  • Open your browser for login
  • Automatically save your credentials
  • Token expires after 90 days

Use this when:

  • Setting up CLI on your local machine
  • You have browser access
  • Interactive development workflow

2. API Keys (For Automation & CI/CD)

Best for non-interactive environments:

  1. First, authenticate via the CLI:

    optibot login
  2. Create an API key:

    optibot apikey create ci-github-actions

    The output includes the key (starts with optk_). Copy it immediately — it is only shown once.

  3. Set the key as an environment variable:

    export OPTIBOT_API_KEY=optk_your_key_here

You can also list and delete your keys:

# List all API keys
optibot apikey list

# Delete a key by ID
optibot apikey delete KEY_ID

Use this when:

  • Running in CI/CD pipelines (GitHub Actions, GitLab CI, etc.)
  • Automated scripts or cron jobs
  • Docker containers or headless environments

Environment Variables

  • OPTIBOT_API_KEY — Your API token (for automation/CI/CD)
  • OPTIBOT_API_URL — Backend URL (defaults to https://agents.getoptimal.ai)

Usage

# Review local uncommitted changes
optibot review

# Review against the auto-detected base branch (origin/main, origin/master, or origin/develop)
optibot review -b

# Review changes against a specific branch
optibot review --branch origin/main

# Review an arbitrary diff file
optibot review --diff changes.patch

Branch Review

When using -b / --branch, the CLI will:

  1. Auto-detect the base branch if no branch name is provided. It checks for origin/main, origin/master, and origin/develop in that order.
  2. Check for merge conflicts before submitting the review. If conflicts are detected with the target branch, a warning is displayed. The review still proceeds, but results may not reflect the final merged state.
  3. Generate a diff and collect file contents for the review.

Review Output

After each review, the CLI displays:

  • Review Summary — general comments about the changes
  • File Comments — per-file feedback with line numbers
  • Rate limit info — reviews used, remaining quota, and time until reset. The display is color-coded:
    • Dim when usage is normal
    • Yellow when less than 10% of reviews remain
    • Red when the quota is exhausted

CI/CD Integration

Setup

  1. Generate an API key (see API Keys above)
  2. Add it as a repository secret (e.g., OPTIBOT_API_KEY in GitHub → Settings → Secrets)

GitHub Actions

name: Code Review
on: [pull_request]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Install Optibot CLI
        run: npm install -g @optimalai/optibot
      - name: Run code review
        env:
          OPTIBOT_API_KEY: ${{ secrets.OPTIBOT_API_KEY }}
        run: optibot review --branch origin/${{ github.base_ref }}

GitLab CI

code-review:
  image: node:18
  script:
    - npm install -g @optimalai/optibot
    - optibot review --branch origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
  variables:
    OPTIBOT_API_KEY: $OPTIBOT_API_KEY
  only:
    - merge_requests

Note: CI/CD requires API keys — OAuth login is not available in non-interactive environments.

Commands

| Command | Description | |---|---| | optibot login | Authenticate via browser (OAuth) | | optibot logout | Log out and remove saved credentials | | optibot review | Review local uncommitted changes | | optibot review -b | Review against auto-detected base branch | | optibot review -b <branch> | Review against a specific target branch | | optibot review -d <file> | Review a diff file | | optibot apikey create <name> | Create a new API key | | optibot apikey list | List all API keys | | optibot apikey delete <id> | Delete an API key |

Requirements

  • Node.js >= 18
  • Git

Links