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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@chittyos/context

v1.0.0

Published

Universal multi-account and persona management for ChittyOS platform. Manage Cloudflare, GitHub, Google, Neon, and 1Password secrets with context switching and automatic distribution.

Readme

ChittyContext

Universal multi-account and persona management for developers working with multiple cloud services, organizations, and workflows.

npm version License: MIT

Features

🔐 Secrets Management

  • Create and manage 1Password vaults per context
  • Store secrets securely in 1Password
  • Automatically distribute secrets to:
    • Cloudflare Workers (via wrangler secret put)
    • GitHub repositories (via gh secret set)
    • Neon projects
  • Rotate secrets with automatic distribution
  • Sync all secrets with one command

☁️ Multi-Account Management

  • Cloudflare: Multiple accounts with seamless switching
  • GitHub: Organizations and personal accounts
  • Google: Multiple workspace identities
  • Notion: Workspace switching
  • Neon: Database project management
  • AI Services: OpenAI, Anthropic API keys

🔄 Context Switching

  • Create named contexts (work, personal, litigation, etc.)
  • Switch between contexts instantly
  • Clone contexts to create variations
  • Each context maintains its own account mappings

🌐 ChittyOS Integration

  • Auto-registers with ChittyRegistry
  • Service discovery from registry
  • Pull service configurations automatically
  • Governance integration (ChittyGov)

Installation

Global Installation (Recommended)

npm install -g @chittyos/context

Local Installation

npm install @chittyos/context

Quick Start

# Initialize
chittycontext init

# Create a work context
chittycontext create work

# Add Cloudflare account
chittycontext cf add chittyos \
  --account-id your-account-id \
  --token-from-1password "op://ChittyOS/Cloudflare/token"

# Switch to work context
chittycontext use work

# Export environment variables
eval $(chittycontext env)

# Verify
wrangler whoami

Commands

Context Management

chittycontext init                       # Initialize configuration
chittycontext create <name>              # Create new context
chittycontext create <name> --from work  # Clone from existing
chittycontext use <context>              # Switch context
chittycontext list                       # List all contexts
chittycontext status                     # Show current status
chittycontext delete <name>              # Delete context

Cloudflare

chittycontext cf add <name> --account-id <id> --token <token>
chittycontext cf add <name> --token-from-1password "op://..."
chittycontext cf use <account>
chittycontext cf list

GitHub

chittycontext gh add <name> --token <token>
chittycontext gh add <name> --token-from-1password "op://..."
chittycontext gh use <account>

Google

chittycontext google add <email> --credentials <path>
chittycontext google use <email>

Secrets & Vault Management

# Create vault for context
chittycontext vault create work

# List all vaults
chittycontext vault list

# Store secret in 1Password
chittycontext vault store ChittyContext-work my-cf-token \
  --cloudflare-account-id abc123 \
  --cloudflare-token mytoken

# Configure secret distribution
chittycontext secrets configure work cloudflare \
  --worker chittyos-platform-prod \
  --secret-name API_TOKEN \
  --vault-item my-cf-token \
  --vault-field token

# Sync all secrets to services
chittycontext secrets sync work

ChittyRegistry Integration

chittycontext registry sync              # Check registration
chittycontext registry discover          # Discover services
chittycontext registry pull chittyauth   # Pull service config
chittycontext env-services               # Export with service URLs

Environment Export

# Bash/Zsh
eval $(chittycontext env)

# Fish
chittycontext env --shell fish | source

# See what would be exported
chittycontext env

Use Cases

Multi-Account Cloudflare Development

# Work on ChittyOS production
ctx use work
wrangler deploy --env production

# Switch to personal projects
ctx use personal
wrangler deploy

Legal Case Management

# Create litigation context
ctx create litigation
ctx use litigation
ctx cf use chittyos-legal
ctx google use [email protected]

# All commands now use litigation accounts

Secret Rotation

# Update token in 1Password, then sync
ctx secrets sync work

# Distributes to:
# - Cloudflare Workers
# - GitHub repositories
# - Neon projects

Team Collaboration

# Share context structure (not secrets)
ctx create team-shared

# Each team member adds their own credentials
ctx cf add shared-account --token-from-1password "op://..."

Configuration

Configuration stored in: ~/.config/chittycontext/config.json

{
  "current": "work",
  "contexts": {
    "work": {
      "cloudflare": "chittyos",
      "github": "chittycorp",
      "google": "[email protected]"
    }
  },
  "accounts": {
    "cloudflare": {
      "chittyos": {
        "account_id": "abc123...",
        "token": "...",
        "token_source": "1password:op://..."
      }
    }
  },
  "secrets": {
    "work": {
      "cloudflare": [
        {
          "worker": "chittyos-platform-prod",
          "name": "API_TOKEN",
          "item": "my-cf-token",
          "field": "token"
        }
      ]
    }
  }
}

Shell Integration

Add to ~/.zshrc or ~/.bashrc:

# Auto-load context on shell start
eval $(chittycontext env 2>/dev/null || true)

# Aliases
alias ctx='chittycontext'
alias ctx-work='chittycontext use work && eval $(chittycontext env)'
alias ctx-personal='chittycontext use personal && eval $(chittycontext env)'

Requirements

  • Node.js: >= 18.0.0
  • 1Password CLI: Required for vault management (Install)
  • Wrangler: Optional, for Cloudflare secret distribution
  • GitHub CLI: Optional, for GitHub secret distribution

Security

  • Tokens stored in ~/.config/chittycontext/config.json (mode 600)
  • 1Password CLI integration for secure secret management
  • Never logs or displays full tokens
  • Config file excluded from git by default
  • ChittyRegistry operations require valid CHITTY_ID_TOKEN

Environment Variables

# Required for ChittyRegistry integration
CHITTY_ID_TOKEN=your_token_here
CHITTY_ID_SERVICE=https://id.chitty.cc
REGISTRY_SERVICE=https://registry.chitty.cc

Troubleshooting

Token not applied

# Check current context
chittycontext status

# Ensure environment is loaded
eval $(chittycontext env)

# Verify Cloudflare auth
wrangler whoami

1Password fetch fails

# Ensure 1Password CLI is installed
op --version

# Sign in to 1Password
op signin

# Test fetch
op read "op://ChittyOS/item/field"

Secret distribution fails

# Check wrangler is configured
wrangler whoami

# Check GitHub CLI
gh auth status

# Verify 1Password connectivity
op vault list

Contributing

Contributions welcome! Please read our Contributing Guide first.

License

MIT © ChittyOS

Links

Alias

Short alias available: ctx

ctx use work
ctx status
ctx cf list

Built with ❤️ for the ChittyOS ecosystem