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

contextvault-cli

v0.1.0

Published

CLI for Context Vault — login, file ops, agent registration, local file tracking.

Readme

contextvault-cli

The Context Vault CLI — login, file operations, agent registration, and local file tracking.

Install

npm install -g contextvault-cli

Binary: cv. Node ≥ 20 required.

Quickstart

Run cv with no arguments to open the interactive menu — arrow keys to navigate, no subcommand syntax to memorize:

$ cv

────────────────────────────────────────────────────────────────
  ██████╗   ██████╗ ███╗   ██╗████████╗███████╗██╗  ██╗████████╗
 ██╔════╝  ██╔═══██╗████╗  ██║╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝
 ██║       ██║   ██║██╔██╗ ██║   ██║   █████╗   ╚███╔╝    ██║
 ██║       ██║   ██║██║╚██╗██║   ██║   ██╔══╝   ██╔██╗    ██║
 ╚██████╗  ╚██████╔╝██║ ╚████║   ██║   ███████╗██╔╝ ██╗   ██║
  ╚═════╝   ╚═════╝ ╚═╝  ╚═══╝   ╚═╝   ╚══════╝╚═╝  ╚═╝   ╚═╝
          ██╗   ██╗ █████╗ ██╗   ██╗██╗  ████████╗
          ╚████╔╝   ██║  ██║ ╚████╔╝╚████████║
            ╚═╝     ╚═╝  ╚═╝  ╚═══╝  ╚══════╝
────────────────────────────────────────────────────────────────
  the context platform for the agent-native enterprise
  cli v0.1.0

  Active workspace: Helios Robotics  (ws-mngwr1n8-uhqfgq)

? What would you like to do?
❯ Browse vault            (cv ls)
  Read artifact           (cv cat)
  Push a file             (cv push)
  Push a folder           (cv push-folder)
  Watch a folder          (cv watch)
  Register an agent       (cv agent register)
  …

For scripting and power-users, every menu item is also available as a subcommand:

# Authorize this device against a workspace. Opens a browser flow.
cv login

# Verify your token and see which workspace you're in.
cv whoami

# List the catalog (workspace → departments).
cv ls

# Drill into a department or folder.
cv ls engineering
cv ls engineering/architecture

# Read an artifact's contents.
cv cat engineering/architecture/auth-design-doc

# Upload a single file.
cv push ./README.md engineering/docs/

# Recursive upload (one-shot).
cv push-folder ./my-docs --to engineering/imports

# Live sync — every change to a local directory mirrors into the vault.
cv watch ./my-docs --to engineering/local

Switching workspaces

The CLI stores credentials per-workspace at ~/.contextvault/credentials.json.

cv workspaces            # list workspaces this CLI has credentials for
cv use ws-abc123         # set the active workspace
cv logout                # remove the active workspace's credentials
cv logout --all          # remove everything

To add a new workspace, run cv login while signed into that workspace's account.

Registering an agent

Agents authenticate with API tokens (the cv_* format). The CLI mints them in one step and writes the raw token to ~/.contextvault/agents/<actor_id>.token.

# Read-only agent that watches engineering/
cv agent register weekly-digest \
  --type operator \
  --grants 'r:engineering/**'

# Read+write across the whole workspace
cv agent register importer \
  --type agent \
  --grants 'r:**,w:engineering/**'

# Inspect what's registered
cv agent list

Use the saved token from your agent process:

TOKEN=$(cat ~/.contextvault/agents/weekly-digest.token)
curl http://localhost:3010/api/cv/catalog \
  -H "Authorization: Bearer $TOKEN"

Live file tracking

cv watch follows a local directory and pushes changes as new artifact versions. Useful for keeping draft documents in sync with the vault while you edit them locally.

cv watch ./design-docs --to engineering/architecture
  • Pushes are concurrency-4.
  • State persists at ~/.contextvault/watch/<workspace>/<hash>.state.json so restarts skip unchanged files.
  • Hidden files and common build dirs (node_modules, .git, .next, dist, etc.) are skipped.
  • Use --once to do a single pass and exit.
  • Use --dry-run to log what would be pushed without uploading.

Configuration

| Env var | Default | Description | |---|---|---| | CONTEXTVAULT_API_BASE | http://localhost:3010 | Override the API base URL (e.g. https://contextvault.metisos.co). |

Files

| Path | Purpose | |---|---| | ~/.contextvault/credentials.json | Per-workspace bearer tokens. Chmod 600. | | ~/.contextvault/agents/*.token | Agent API tokens, one per actor_id. | | ~/.contextvault/watch/{org}/{hash}.state.json | Per-watch state (last-pushed mtimes). |

Using the CLI from an agent

Shell-running agents (Claude Code, Codex, Devin, custom orchestrators) can use the same CLI. We publish a portable agent skill that documents the commands, auth flow, error handling, and idiomatic patterns:

  • Skill URL: https://contextvault.metisos.co/skills/contextvault-cli.md
  • In-repo: skills/contextvault-cli/SKILL.md

Have your agent fetch it once at session start and prepend it to its system prompt, or drop it into ~/.claude/skills/ for Claude Code to discover automatically. The user mints a scoped token with cv agent register; the agent reads the skill and starts working.

License

Apache-2.0