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

triagent

v0.1.0-beta2

Published

AI-powered Kubernetes debugging agent with terminal UI

Readme

Triagent

AI-powered Kubernetes debugging agent with terminal UI.

Installation

# bun
bun install -g triagent

# npm
npm install -g triagent

# yarn
yarn global add triagent

# pnpm
pnpm add -g triagent

Usage

# Run interactive TUI
triagent

# Run webhook server only
triagent --webhook-only

# Direct incident investigation
triagent --incident "API gateway returning 503 errors"

Execution Modes

Triagent supports three execution modes for running commands:

Sandbox Mode (Default)

Commands run inside a Docker container via Bashlet. This provides isolation and safety - the agent cannot accidentally modify your host system.

triagent

Codebases are mounted at /workspace/<name> and kubeconfig at /root/.kube.

Host Mode

Commands run directly on your local machine. Use this when you need access to tools not available in the sandbox.

triagent --host

Remote Mode

Commands run on a remote server via SSH. This is useful for connecting to a Docker container or VM with pre-installed debugging tools.

triagent --remote user@host
triagent -r [email protected]

On startup, triagent creates a session workspace on the remote:

🌐 Running in remote mode: [email protected]
   Workspace: /tmp/triagent-a3b4c5d6 (session: a3b4c5d6)

Requirements:

  • SSH key-based authentication (no password prompts)
  • The remote must have the necessary CLI tools (kubectl, etc.)

Example: Debug container setup

# Run a container with SSH and debugging tools
docker run -d --name debug-tools \
  -p 2222:22 \
  -v ~/.kube:/root/.kube:ro \
  your-debug-image:latest

# Add to ~/.ssh/config for easy access
# Host debug-tools
#   HostName localhost
#   Port 2222
#   User root

# Connect triagent to it
triagent --remote debug-tools

Configuration

Configuration can be set via CLI commands or environment variables. CLI config takes precedence over environment variables.

CLI Config

# Set configuration values
triagent config set <key> <value>

# Get a configuration value
triagent config get <key>

# List all configuration values
triagent config list

# Show config file path
triagent config path

Config Keys

| Key | Description | Default | |-----|-------------|---------| | aiProvider | AI provider (openai, anthropic, google) | anthropic | | aiModel | Model ID (e.g., gpt-4o, claude-sonnet-4-20250514) | Provider default | | apiKey | API key for the provider | - | | baseUrl | Custom API base URL (for proxies or local models) | - | | webhookPort | Webhook server port | 3000 | | codebasePath | Path to single codebase (legacy) | ./ | | kubeConfigPath | Kubernetes config path | ~/.kube |

Multiple Codebases

For applications spanning multiple repositories, configure codebasePaths in ~/.config/triagent/config.json:

{
  "codebasePaths": [
    { "name": "frontend", "path": "/path/to/frontend-repo" },
    { "name": "backend", "path": "/path/to/backend-repo" },
    { "name": "infra", "path": "/path/to/infrastructure" }
  ]
}

Each codebase is mounted at /workspace/<name> in the sandbox. The model can access any codebase as needed during investigation.

Custom Instructions (TRIAGENT.md)

Create ~/.config/triagent/TRIAGENT.md to provide custom instructions to the model. These instructions are prepended to the default system prompt.

Example TRIAGENT.md:

## Project Context

This is a microservices e-commerce platform with the following services:
- frontend: Next.js app in /workspace/frontend
- api: Go backend in /workspace/backend
- infra: Terraform configs in /workspace/infra

## Investigation Priorities

1. Always check the api service logs first for 5xx errors
2. The frontend service talks to api via internal DNS: api.default.svc.cluster.local
3. Common issues: Redis connection timeouts, PostgreSQL connection pool exhaustion

Environment Variables

| Variable | Description | |----------|-------------| | AI_PROVIDER | AI provider (openai, anthropic, google) | | AI_MODEL | Model ID | | AI_BASE_URL | Custom API base URL | | OPENAI_API_KEY | OpenAI API key | | ANTHROPIC_API_KEY | Anthropic API key | | GOOGLE_GENERATIVE_AI_API_KEY | Google AI API key | | WEBHOOK_PORT | Webhook server port | | CODEBASE_PATH | Path to codebase | | KUBE_CONFIG_PATH | Kubernetes config path |

Examples

# Configure with Anthropic (default)
triagent config set apiKey sk-ant-...

# Configure with OpenAI
triagent config set aiProvider openai
triagent config set apiKey sk-proj-...

# Use a custom API endpoint (e.g., proxy or local model)
triagent config set baseUrl https://your-proxy.example.com/v1

Development

# Install dependencies
bun install

# Run in development mode
bun run dev

# Build
bun run build

# Type check
bun run typecheck

License

MIT