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

@agentproto/providers-store

v0.3.7

Published

@agentproto/providers-store — the `~/.agentproto/providers.json` LLM provider API-key store (mode 0600) and the `injectProviderKeysIntoEnv` helper that lets any process (daemon or standalone gateway) boot with keys set via `agentproto auth provider set`,

Readme

@agentproto/providers-store

The ~/.agentproto/providers.json LLM provider API-key store (mode 0600), written by agentproto auth provider set, and the injectProviderKeysIntoEnv helper that lets a process boot with those keys in its environment.

Before this store existed, the only way to give a process a provider key was an ambient export FOO_API_KEY=… in whatever shell launched it — invisible, easy to forget, per-shell. Set once via the CLI, every process that calls injectProviderKeysIntoEnv at boot picks it up.

This package is a leaf: node builtins + @agentproto/model-catalog only, so any standalone process (not just the @agentproto/runtime daemon) can depend on it without dragging in a full gateway.

Usage

import { injectProviderKeysIntoEnv } from "@agentproto/providers-store"

// Call once at process boot, before anything reads provider env vars.
// Explicit env always wins — a var already set is never overwritten.
const injected = await injectProviderKeysIntoEnv(process.env)
if (injected.length > 0) {
  console.error(`loaded ${injected.length} provider key(s) from store: ${injected.join(", ")}`)
}

Keys never leave the store except into the caller's own process env; they are never logged — only provider names, never values, should reach output.

API

  • loadProviders() / setProviderKey(provider, apiKey, baseUrl?) / removeProviderKey(provider) / getProviderKey(provider) — read/write providers.json.
  • injectProviderKeysIntoEnv(env?) — injects stored keys into env (default process.env), skipping any name already set. Returns the list of provider names actually injected.
  • providerEnvVar(provider) / PROVIDER_ENV_VARS — canonical provider → env-var-name mapping (derived from @agentproto/model-catalog's PROVIDER_KEY_ENV, plus the non-catalog gateway providers this store also fronts).
  • providersPath() — resolves ~/.agentproto/providers.json.

@agentproto/runtime re-exports this package's surface unchanged (including the @agentproto/runtime/providers-store subpath) for existing consumers.

License

Apache-2.0