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

coding-agent-account-manager

v1.2.0

Published

Manage multiple AI coding agent accounts, switching context based on current working directory

Readme

Coding Agent Account Manager (cam)

Automatically use the right coding agent account based on your current working directory. Insipired by NVM and Jean-Claude.

Simply place a .camrc file in a project and run cam in place of your normal coding agent launch comand. Coding Agent Account Manager automatically picks the right account and launches it for you.

Cam ships with built-in support for Claude Code and the GitHub Copilot CLI, and can be extended to support any other coding agent via cam agent add.

Installation

npm install -g coding-agent-account-manager

Quick Start

1. Create an account

cam add claude work

This creates an isolated profile directory (i.e. ~/.cam/claude/work/) for the account. At the end, cam will offer to drop a .camrc file in your current directory.

2. Add a .camrc to your project's directory (skip if you already did this above)

echo "claude work" > ~/work/my-project/.camrc

3. Launch

cd ~/work/my-project
cam

cam walks up the directory tree, finds the nearest .camrc file, and launches your coding agent with the desired account. No flags, no aliases — just cam.

Default account

A default account can be set by calling the default command and specifying the account you wish to make the default:

cam default claude work

When cam is run in a directory with no .camrc, it uses the default. If no default account is set, cam prompts you to pick from your configured accounts and offers to save the choice as the default.

To see the current default, call default with no account specified:

cam default

Account override

You can bypass the account specified in a .camrc with the use <agent> <name> command to launch with an account of your choosing:

cam use claude work

Pass --always to write a .camrc for the chosen account in the current directory, so future cam invocations resolve to it automatically:

cam use claude work --always

Launch parameters

You can save launch parameters for an account that will be passed to the agent every time that account is used. Specify them when creating the account:

cam add claude work --dangerously-skip-permissions

Or add/change them later with cam edit:

cam edit claude work

cam edit shows the current parameters, prompts for a new set, displays a before/after diff, and asks for confirmation before saving. Leave the input empty to remove all saved parameters.

Parameters that contain spaces must be quoted:

cam add claude work --system-prompt hello world     # wrong — hello and world are two separate params
cam add claude work "--system-prompt hello world"   # correct — one param

The same quoting rules apply inside cam edit. Saved parameters are always displayed with spaces-containing values already quoted, so you can copy, tweak, and paste them back in safely.

At launch time, saved parameters are prepended to any extra arguments you pass on the command line:

# claude/work has launchParams: ["--dangerously-skip-permissions"]
cam use claude work --verbose
# agent receives: --dangerously-skip-permissions --verbose

How It Works

Each account gets its own isolated profile directory (i.e. ~/.cam/claude/<name>/). When you run cam, it:

  1. Searches the current directory and all parents for a .camrc file
  2. If found, reads the account name from that file; otherwise falls back to the configured default
  3. Launches the agent pointing at the matching profile directory (i.e. the CLAUDE_CONFIG_DIR value for Claude Code)

Authentication state is kept separate per profile. Shared config (settings, hooks, skills, etc.) is symlinked from your agent's default directory so changes apply everywhere.

Shared entries by agent

When you create an account, cam symlinks a set of entries from the agent's default config directory into the new profile so that customizations are shared across accounts. The shared entries are defined per agent type and can be customised with cam agent edit <name> --shared <entries>.

Built-in defaults:

Claude — entries symlinked from ~/.claude/:

| Entry | Type | |---|---| | settings.json | file | | keybindings.json | file | | hooks | directory | | agents | directory | | skills | directory | | plugins | directory |

Copilot — entries symlinked from ~/.copilot/:

| Entry | Type | |---|---| | hooks | directory | | agents | directory | | skills | directory |

Anything not listed above (auth state, history, caches, MCP server registrations, etc.) is profile-local. Existing entries in the agent's default config dir are reused for every account — edit ~/.claude/settings.json once and every Claude profile sees the change.

Isolated profiles

Pass --isolated to cam add to skip the symlinks entirely. The new profile starts with no shared config and never picks up changes from the agent's default directory:

cam add claude sandbox --isolated

Use this when you want a fully standalone account — e.g. a sandbox profile that experiments with hooks or skills without affecting your other accounts, or a profile for a different agent persona that needs its own settings file.

Custom agent types

The cam agent subcommand group lets you view, register, and modify agent type definitions. Built-in definitions for Claude Code and the GitHub Copilot CLI are always available as a baseline.

Listing agent types

cam agent list

Shows every configured agent type. Each entry is tagged [default] (built-in, unmodified), [modified] (built-in with user changes), or [custom] (user-added).

Adding a new agent type

cam agent add cursor

Cam prompts for the binary name, config directory, environment variable, and shared entries. You can skip the prompt by passing all values as flags:

cam agent add cursor \
  --binary cursor \
  --config-dir ~/.cursor \
  --env-var CURSOR_CONFIG_DIR \
  --shared "hooks,agents"

Once registered, all account commands work with the new type:

cam add cursor work
cam use cursor work
cam remove cursor work

Editing an agent type

cam agent edit claude

Interactively updates any field. Pass flags to change specific fields without prompting:

cam agent edit claude --binary claude-dev

Removing an agent type

cam agent remove cursor       # removes a custom type
cam agent remove claude       # resets a built-in type to its defaults

For built-in agents (claude, copilot), remove resets the definition to its built-in defaults rather than deleting it entirely. Pass -f / --force to skip the confirmation prompt.

.camrc Format

A .camrc file contains the agent type and account name, separated by whitespace:

claude work

Comments are supported:

# Use the work account for this project
claude work

.camrc files are inherited — a file in a parent directory applies to all subdirectories unless a closer .camrc overrides it. This means you can place one .camrc in ~/work/ and all projects under it will use that account automatically.

Legacy format: a .camrc containing just the account name (no agent prefix) is still supported and resolves to the claude agent.

Commands

| Command | Description | |---|---| | cam | Launch using the account from .camrc, default, or prompt | | cam use <agent> <name> [--always] [params...] | Launch with a specific account, bypassing .camrc. --always writes a .camrc for the account in the current directory | | cam add <agent> <name> [--isolated] [params...] | Create a new account; optional params are saved as launch parameters. --isolated skips symlinking the agent's default config (settings, hooks, agents, skills, etc.) so the profile starts empty. Prompts at the end to drop a .camrc in the current directory | | cam edit <agent> <name> | Interactively edit an account's saved launch parameters | | cam default [agent] [name] | Set or show the default account | | cam list | List all configured accounts | | cam whoami | Show which account resolves for the current directory | | cam remove <agent> <name> | Remove an account and delete its profile directory | | cam config | Open ~/.cam/accounts.json in $VISUAL / $EDITOR (falls back to open) | | cam help [command] | Show help for cam or a specific command | | Agent type management | | | cam agent list | List all configured agent types with their status tags | | cam agent add <name> [flags] | Register a new agent type (--binary, --config-dir, --env-var, --shared) | | cam agent edit <name> [flags] | Update fields on an existing agent type | | cam agent remove <name> [-f] | Remove a custom agent type, or reset a built-in to its defaults |

Configuration file

Cam keeps everything under ~/.cam/:

~/.cam/
  accounts.json         # account registry
  agents.json           # agent type definitions (auto-created from built-in defaults)
  update-check.json     # tracks the last GitHub release check (see below)
  <agent>/<name>/       # per-account profile directories

accounts.json is plain JSON and looks like this:

{
  "version": 2,
  "default": { "agent": "claude", "name": "work" },
  "accounts": {
    "claude": {
      "personal": {
        "profileDir": "~/.cam/claude/personal",
        "createdAt": "2026-01-01T00:00:00.000Z"
      },
      "work": {
        "profileDir": "~/.cam/claude/work",
        "createdAt": "2026-01-01T00:00:00.000Z",
        "launchParams": ["--dangerously-skip-permissions"]
      }
    },
    "copilot": {
      "work": {
        "profileDir": "~/.cam/copilot/work",
        "createdAt": "2026-01-02T00:00:00.000Z"
      }
    }
  }
}

| Field | Description | |---|---| | version | Schema version, currently 2 | | default | { agent, name } of the default account (set by cam default) | | accounts.<agent>.<name>.profileDir | Path to the isolated profile directory | | accounts.<agent>.<name>.createdAt | ISO 8601 timestamp of when the account was created | | accounts.<agent>.<name>.launchParams | Optional array of arguments prepended at launch |

The file is managed by cam commands — direct edits are supported but not required.

Update notifications

On each invocation, cam checks the GitHub releases API for a newer version, at most once per 24 hours. The last check timestamp and most recently observed release are recorded in ~/.cam/update-check.json so repeated commands within the window don't hit the network.

When a newer release is available, cam prints a notice and blocks on a single keypress before continuing, so an agent that clears the screen on launch can't hide it:

⚠ A new version of cam is available: 1.2.0 (current: 1.0.0)
ℹ Update with: npm install -g coding-agent-account-manager

  Press any key to continue...

If stdin isn't a TTY (e.g. cam's output is piped), the notice still prints but the wait is skipped so scripts don't hang. Network errors and HTTP failures are swallowed silently and never block a cam command from running.

Migrating from v1.0.0

Earlier versions of cam stored accounts.json at ~/.config/cam/accounts.json and per-agent profile directories at ~/.claude-<name>/ and ~/.copilot-<name>/. On the first invocation after upgrading, cam automatically moves the profile directories under ~/.cam/, rewrites the paths in accounts.json, and removes the legacy ~/.config/cam/ location. The migration is keyed off the version field and aborts up front with a clear error if any destination directory already exists.

Example Setup

~/.camrc (or ~/personal/.camrc)   →  claude personal
~/work/.camrc                     →  claude work
~/work/client-a/.camrc            →  claude client-a
cam add claude personal
cam add claude work
cam add claude client-a

cd ~/personal/my-blog
cam whoami   # claude personal
cam          # launches with the claude/personal account

cd ~/work/my-app
cam whoami   # claude work
cam          # launches with the claude/work account

cd ~/work/client-a/project
cam whoami   # claude client-a
cam          # launches with the claude/client-a account