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

cognito-cli-bridge

v0.1.5

Published

Local bridge server connecting CLI coding agents (Gemini CLI, Claude Code, Codex CLI) to Cognito Chrome extension tools

Downloads

485

Readme

@cognito/cli-bridge

Local bridge server for Code Mode in the Cognito Chrome extension. This server enables the extension to communicate with local CLI coding agents (Gemini CLI, Claude Code, Codex CLI) via ACP (Agent Communication Protocol).

Overview

Chrome extensions cannot spawn local processes directly. This bridge server runs on localhost and:

  • Spawns local agent CLIs via ACP
  • Streams responses back to the extension via SSE
  • Manages patch proposals and applies them via git apply
  • Handles secure pairing with the extension

Usage

Development

# From monorepo root
pnpm dev:bridge

# With options
pnpm dev:bridge -- --port 9000 --cwd /path/to/project

CLI Options

--port <number>   Port to listen on (default: 8787)
--host <string>   Host to bind to (default: 127.0.0.1)
--cwd <path>      Working directory for file operations (default: current directory)
--help, -h        Show help message

API Endpoints

Health Check

GET /health
Response: { ok: true, version: "0.0.1", cwd: "/path/to/project" }

Pairing

POST /pair/start
Response: { code: "123-456", expiresAt: 1234567890 }

POST /pair/confirm
Body: { code: "123-456" }
Response: { token: "..." }

Agents

GET /agents
Response: { agents: [{ name, command, args, available, envHints }] }

Chat (requires auth)

POST /code/chat
Headers: Authorization: Bearer <token>
Body: { messages, elementContext?, agent, sessionId? }
Response: SSE stream with events: text, patch_proposal, tool_call, tool_result, error, done

Apply Patch (requires auth)

POST /code/patch/apply
Headers: Authorization: Bearer <token>
Body: { patchId: "..." }
Response: { applied: true, filesChanged: ["file1.ts", "file2.ts"] }

Security

  • Binds to 127.0.0.1 only (localhost)
  • Requires pairing code exchange before use
  • All authenticated endpoints require Bearer token
  • Tokens stored hashed in ~/.cognito/bridge/tokens.json
  • Patches validated for path traversal before apply

Supported Agents

| Agent | Command | Required Env | |-------|---------|--------------| | Gemini CLI | gemini --experimental-acp | GEMINI_API_KEY | | Claude Code | claude --acp | ANTHROPIC_API_KEY | | Codex CLI | codex --acp | OPENAI_API_KEY |