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

@grafana/sigil-pi

v0.16.0

Published

Pi agent extension for Grafana Sigil AI telemetry

Readme

@grafana/sigil-pi

Pi agent extension that sends LLM generations to Grafana AI Observability.

By default only metadata is sent (token counts, cost, model, tool names, durations). Set SIGIL_CONTENT_CAPTURE_MODE to full, no_tool_content, metadata_only, or full_with_metadata_spans to control what is sent. default is accepted as an alias for metadata_only. See Content Capture Modes for the full reference.

1. Install and launch

brew install grafana/grafana/sigil
sigil pi

sigil pi installs the @grafana/sigil-pi extension on first run, prompts for missing Grafana Cloud credentials, writes ~/.config/sigil/config.env, and then launches pi.

pi install npm:@grafana/sigil-pi
sigil login

The extension reads the same ~/.config/sigil/config.env file whether you start pi with sigil pi or plain pi.

2. Credentials

When sigil pi or sigil login prompts, copy values from https://<your-grafana>.grafana.net/plugins/grafana-sigil-app. Make sure AI Observability is enabled on your stack — an administrator opens Observability → AI Observability once and accepts the terms.

You need values from three Grafana Cloud pages:

  1. AI Observability → Configuration

    • API URLSIGIL_ENDPOINT
    • Instance IDSIGIL_AUTH_TENANT_ID
  2. Administration → Users and access → Cloud access policies

    • Create a policy with scopes sigil:write, metrics:write, traces:write.
    • Add a token. The glc_… value is shown once → SIGIL_AUTH_TOKEN.
  3. Grafana Cloud Portal → your stack → OpenTelemetry card

    • OTLP endpoint URLSIGIL_OTEL_EXPORTER_OTLP_ENDPOINT

Run sigil login later to update saved credentials.

Create or update ~/.config/sigil/config.env:

SIGIL_ENDPOINT=https://sigil-prod-<region>.grafana.net
SIGIL_AUTH_TENANT_ID=<instance-id>
SIGIL_AUTH_TOKEN=glc_...
SIGIL_OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp-gateway-prod-<region>.grafana.net/otlp

When SIGIL_AUTH_TENANT_ID and SIGIL_AUTH_TOKEN are set, the extension uses them for Sigil and OTLP auth. If the OpenTelemetry card shows a different Instance ID, set OTEL_EXPORTER_OTLP_HEADERS=Authorization=Basic <base64(otlp-id:glc_token)>.

To include conversation text (with automatic secret redaction), add this to ~/.config/sigil/config.env:

SIGIL_CONTENT_CAPTURE_MODE=full

3. Verify

Run one pi turn, then open AI Observability → Conversations in Grafana Cloud. A new generation should appear within a few seconds.

If nothing shows up, set SIGIL_DEBUG=true in ~/.config/sigil/config.env, run another turn, and check the debug log at ~/.local/state/sigil/logs/sigil.log (honors XDG_STATE_HOME).

Redaction

Before any generation leaves the process, the SDK scrubs known token formats, PEM private keys, database URLs, KEY=value pairs, bearer tokens, and email addresses. Matches become [REDACTED:<id>]. User input messages are redacted by default; set SIGIL_REDACT_INPUT_MESSAGES=false to leave them unchanged.

Guards

Guards block tool calls before they execute (e.g. refuse a bash invocation matching a deny rule). They're off by default:

SIGIL_GUARDS_ENABLED=true sigil pi

By default, transport errors and timeouts let the tool through. Set SIGIL_GUARDS_FAIL_OPEN=false to block on errors instead. Raise or lower SIGIL_GUARDS_TIMEOUT_MS (default 1500) to trade latency against tolerance for slow evaluators.

The same three variables are honored by the Claude Code plugin; both plugins read them from ~/.config/sigil/config.env.

All options

~/.config/sigil/config.env is the only configuration file. Every option is set via env var.

| Variable | Default | Description | |----------|---------|-------------| | SIGIL_ENDPOINT | — | Sigil URL (find it at /plugins/grafana-sigil-app) | | SIGIL_AUTH_TENANT_ID | — | Grafana Cloud instance ID. Combined with SIGIL_AUTH_TOKEN becomes Basic auth for Sigil and OTLP. | | SIGIL_AUTH_TOKEN | — | Cloud access policy token (glc_…). | | SIGIL_AGENT_NAME | pi | Agent name reported to Sigil. | | SIGIL_AGENT_VERSION | — | Optional version string reported with the agent. | | SIGIL_CONTENT_CAPTURE_MODE | metadata_only | One of full, no_tool_content, metadata_only, or full_with_metadata_spans. default is accepted as an alias for metadata_only. | | SIGIL_DEBUG | false | Write lifecycle events to ~/.local/state/sigil/logs/sigil.log (honors XDG_STATE_HOME). Never written to the terminal, to avoid corrupting pi's TUI. | | SIGIL_REDACT_INPUT_MESSAGES | true | Redact known secret patterns in user input messages before export. | | SIGIL_OTEL_EXPORTER_OTLP_ENDPOINT | — | OTLP HTTP endpoint. Falls back to OTEL_EXPORTER_OTLP_ENDPOINT. | | SIGIL_OTEL_AUTH_TOKEN | SIGIL_AUTH_TOKEN | Override the OTLP password. | | SIGIL_GUARDS_ENABLED | false | Evaluate tool_call requests against Sigil policy. | | SIGIL_GUARDS_TIMEOUT_MS | 1500 | Per-call timeout for guard requests, in milliseconds. | | SIGIL_GUARDS_FAIL_OPEN | true | Allow tools through when the guard call fails. Set false for strict mode. |

File format: one KEY=value per line, # line comments, optional export prefix, optional matching single or double quotes around the value. Only the following keys are honoured — anything else (including stray PATH=… lines) is ignored: any SIGIL_* key plus OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_INSECURE, and OTEL_SERVICE_NAME.

A non-empty OS env value always wins over the file; an empty or whitespace-only OS value is treated as unset and gets filled from config.env. Missing files are silent.