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

@parajulisandip0000/agent-gate

v1.0.3

Published

> **A Firewall & Telemetry Proxy for Coding Agents**

Readme

🛡️ Agent-Gate

A Firewall & Telemetry Proxy for Coding Agents

License: MIT TypeScript Node.js

Agent-Gate is a lightweight, local proxy and CLI that sits between autonomous AI coding agents (like Claude Code, Cursor, Codex, OpenDevin, and Continue) and your system. It acts as an interactive guardrail, intercepting terminal executions, file changes, and outbound network requests to keep your machine safe.

Developers and enterprises are terrified of AI agents running a rogue rm -rf, leaking API keys, or fetching malicious dependencies. Agent-Gate solves this by enforcing human-in-the-loop approvals for sensitive operations and tracking exactly what the agent is doing.


Key Features

  • Interactive Guardrails: A beautiful Terminal UI (TUI) that asks for your explicit approval when an agent attempts a sensitive command (e.g., git push, npm install, rm).
  • Agent Telemetry: Logs exactly what the agent did in a clean, readable Markdown format and local SQLite database for later auditing.
  • Cost & Token Tracker: Intercepts API requests to track exactly how many tokens the local or API-based agent is burning per task, giving you a real-time view of your costs.
  • Universal Compatibility: Works with any agent that uses standard system commands and HTTP APIs.
  • Zero-Config Setup: Easy to install and run locally via npm.

Architecture

Agent-Gate operates using three main components:

  1. The Gate (Network Proxy): Intercepts LLM API requests to track tokens, estimate costs, and log the agent's prompts/responses.
  2. The Guard (Command Interceptor): A smart PATH shim system that wraps common risky commands. When an agent attempts a command, the shim sends an IPC message to the Agent-Gate process and pauses execution.
  3. The Watchtower (Interactive TUI): The developer interface where you approve, deny, or modify command executions in real-time.

📁 File Structure

agent-gate/
├── bin/
│   └── agent-gate.js         # CLI entry point
├── shims/                    # Shim scripts for command interception (generated dynamically)
├── src/
│   ├── cli/                  # Command Line Interface & TUI
│   ├── proxy/                # HTTP/HTTPS Proxy for API interception
│   ├── guard/                # Command interception & IPC communication
│   ├── telemetry/            # Logging, SQLite DB, token tracking
│   ├── config/               # Configuration management (rule sets)
│   └── index.ts              # Core application logic
├── docs/                     # Detailed documentation
└── tests/                    # Unit and integration tests

Getting Started

Installation

Agent-Gate is now available on the global NPM registry! You can install it globally via npm:

npm install -g @parajulisandip0000/agent-gate

Usage

To start Agent-Gate and run an agent through it, simply prefix the agent's command with agent-gate:

agent-gate run -- claude-code

This will:

  1. Start the Agent-Gate TUI and telemetry engine.
  2. Inject the command shims into the agent's environment.
  3. Proxy API requests to track token usage.

Telemetry Dashboard

To view a summary of your recent interceptions, API costs, and tokens burned, open a new terminal and run:

agent-gate logs

This will launch The Watchtower TUI dashboard showing a full timeline of the agent's actions.

IDE & Extension Monitoring (VS Code, Cursor, Codex)

Because extensions run inside your editor rather than as standalone terminal scripts, you need to configure them slightly differently:

1. Intercepting Commands

To force VS Code extensions (like GitHub Copilot or Continue) to use your guardrails, launch VS Code itself through Agent-Gate from your terminal:

agent-gate run -- code .

Every extension inside that VS Code window will now inherit your protected PATH. If an extension tries to run a background npm install, your terminal will prompt you for approval.

2. Tracking API Costs

To track the tokens and costs of an AI extension, open the extension's settings inside your IDE and change its API Base URL to point to your local Agent-Gate proxy: http://localhost:8080/v1

As soon as you do this, every line of code generated will be logged in your agent-gate logs dashboard with its exact token cost!

Configuration

Agent-Gate is highly configurable. You can define rules for which commands require approval, which are auto-approved, and which are strictly denied.

Create an agent-gate.config.json in your project root or ~/.agent-gate/:

{
  "guardrails": {
    "requireApproval": ["git push", "npm install", "rm", "curl"],
    "autoApprove": ["git status", "ls", "cat"],
    "deny": ["rm -rf /"]
  },
  "proxy": {
    "port": 8080,
    "trackTokens": true
  }
}

Contributing

We welcome contributions! Whether it's adding support for new agents, improving the TUI, or refining the token tracking algorithms, your help is appreciated.

Please see our CONTRIBUTING.md for details on how to get started.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.