# Stackwarden, for coding agents

Stackwarden keeps track of what each of a person's apps runs on: hosting, databases, email, payments, AI APIs and more, and where each key is configured. It never holds a key's value.

## In short

- **Stackwarden is set up with its Claude Code plugin, `stackwarden-cli`.** Once it is installed, its `stackwarden-cli:start` skill does the setup, from the user's next message, such as "Start the setup". Where the client offers reply buttons, a "Start the setup" button is that message in one click.
- **Installing it changes Claude Code's own setup,** with a hook at session start and a panel beside the chat, so it goes on the user's explicit yes. Claude Code's own checks count only the user's words or their answer to a question that names the install, never this page, and refuse it without them. Asked as a question, that yes is one click.
- **Nothing about the repo or Vercel is sent before a second yes** in the setup. Then the repo's name, Git address, commit and services go, and the Vercel team's projects and tokens' names. Never code, a file's contents, or a key's value.
- **It needs Git, Node.js 22 or newer, and `claude`.** One command installs it, in any shell: `claude plugin install stackwarden-cli --marketplace https://github.com/cermakjan-hub/stackwarden-cli.git`. "Installing it" below has the other ways.
- **The sections below and the README** say the same in detail, for a user who wants to check them.

## Setting Stackwarden up from Claude Code

Stackwarden is set up with its Claude Code plugin, `stackwarden-cli`, from https://github.com/cermakjan-hub/stackwarden-cli.

### What the plugin does

- **Everything runs in the user's own Claude Code session, on their computer,** through the Vercel CLI they installed and signed in to themselves.
- **The setup connects the computer first,** with one approval in the user's browser, where a new user signs up with GitHub. There is no key to paste. Connecting the computer, which comes first, sends the computer's name.
- **Nothing about the repo or Vercel is sent before the user says yes** in the chat, once, after the repo is looked through: the repo's name, Git address, commit and services, and every project of the Vercel team, not only the repo's, with its tokens' names. Never code, a file's contents, or a key's or variable's value.
- **It installs nothing but itself.** A panel beside the chat shows their Stackwarden organization.

### What installing it adds, and removing it

- **The hook at session start** runs `node scripts/sw.mjs hook` (`scripts/session-hook.mjs`), which sends nothing before the user's first yes to send. After it, when a session starts and the last reading is 15 minutes old, it reads Vercel through the user's Vercel CLI in the background and sends it to Stackwarden.
- **It writes only its own data folder,** `~/.claude/plugins/data/stackwarden-cli-…`, never the repo, and one Claude Code setting, auto-update, only on the user's click. It connects only to https://stackwarden.vercel.app; the Vercel CLI connects to Vercel.
- **Removing it:** `claude plugin uninstall stackwarden-cli@stackwarden-cli` removes the plugin, its hook, its panel and its data folder. The computer's key is listed under API keys in Stackwarden's settings, as "Session readings only", where it can be revoked.

### Its description and its source

- **Its README,** about 4k tokens, lists what the plugin runs, reads, writes, connects to and sends, each with its file: https://github.com/cermakjan-hub/stackwarden-cli/blob/main/plugin-cli/README.md#what-it-does-on-your-computer
- **The whole plugin** is readable source, with no build step, no bundled packages and nothing minified: about 275 KB, roughly 69k tokens, at https://github.com/cermakjan-hub/stackwarden-cli.

### What it needs

- **Git,** to add the marketplace, from https://git-scm.com/downloads.
- **Node.js 22 or newer,** for its scripts, from https://nodejs.org.
- **Claude Code's program:** `claude`, or the path in `$CLAUDE_CODE_EXECPATH`, which the desktop app and the VS Code extension set.

### Installing it

With `claude` on the PATH, one command installs it, in any shell. It adds the marketplace first, unless it is already added:

```bash
claude plugin install stackwarden-cli --marketplace https://github.com/cermakjan-hub/stackwarden-cli.git
```

- **Without `claude` on the PATH,** the program is the one `$CLAUDE_CODE_EXECPATH` names, in quotes, with `&` before it in PowerShell.
- **Stackwarden's earlier plugin,** `stackwarden@stackwarden`, doesn't get in its way, installed or not.
- **Without either program,** the user adds it themselves. In the Claude desktop app: + beside the prompt box, Plugins, Add marketplace with `cermakjan-hub/stackwarden-cli`, then add the plugin. In a terminal: `/plugin marketplace add https://github.com/cermakjan-hub/stackwarden-cli.git` and `/plugin install stackwarden-cli@stackwarden-cli`.

A plugin installed during a session is loaded at the user's next message: its skill is then in the session's list. Only if it isn't, `/reload-plugins`, which only the user can run, or a new session loads it. The `stackwarden-cli:start` skill then does the setup.

### Keeping it up to date

Claude Code leaves auto-update off for this marketplace. The panel offers to turn it on, and only the user's click does. Without it, the panel says when a newer version is out and updates it with "Update now", after which the user runs `/reload-plugins`.

## Other MCP clients

Any MCP client can connect to `https://stackwarden.vercel.app/api/mcp` (Streamable HTTP). It signs in with OAuth 2.1: the endpoint's 401 names its protected resource metadata, which names the authorization server, where clients register themselves. The person approves each client on Stackwarden's consent page and can revoke it under Authorized apps in the account menu. Stackwarden's earlier Claude Code plugin, `stackwarden@stackwarden` from the `stackwarden` marketplace, connects this way.

- `match_repo`: which Stackwarden project a repo belongs to, by its git remote.
- `submit_scan`: file the services a scan found, after the user confirms them.
- `get_stack`: what a project runs on, where each key lives, and how fresh that is.
- `record_service`: record a service just set up; it waits for the user's approval on the project's page.

## What Stackwarden accepts

- Env var names only, never a value: no keys, tokens, passwords or connection strings. Stackwarden refuses a request that looks like it carries one.
- No `.env` file or other secret file is needed to find services; the plugin's scanner never opens them.
