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

@lvmk/claude-alias

v1.0.4

Published

Manage Claude Code with custom AI API providers. Secure API key storage in macOS Keychain or Linux secret-tool.

Readme

claude-alias

Manage Claude Code with custom AI API providers using secure credential storage.

npm version License: MIT

claude-alias creates shell aliases that let you run Claude Code with different AI providers like DeepSeek, OpenRouter, Z.AI, and more. Each alias has its own API key stored securely in your system's credential manager.

Features

  • 🔐 Secure API key storage - macOS Keychain or Linux secret-tool/encrypted file
  • 🎯 Multiple provider presets - DeepSeek, OpenRouter, Z.AI, OpenAI, Anthropic, Groq, and more
  • 🤖 Model configuration - Set opus/sonnet/haiku/subagent models per alias
  • 📋 LiteLLM integration - Search 100+ models from the LiteLLM registry
  • 🐚 Shell integration - Auto-adds aliases to .zshrc or .bashrc
  • 🔧 MCP support - Symlinks global settings for MCP servers

Requirements

  • Node.js 18+
  • Claude Code installed (claude command available)
  • macOS or Linux

Linux Only

# Recommended: Install libsecret-tools for secure storage
sudo apt install libsecret-tools  # Ubuntu/Debian
sudo dnf install libsecret        # Fedora/RHEL

Installation

# Install globally
npm install -g @lvmk/claude-alias

# Or use directly with npx
npx @lvmk/claude-alias

Quick Start

# Run interactive mode
claude-alias

# Or use commands directly
claude-alias add      # Add/edit an alias
claude-alias remove   # Remove aliases  
claude-alias list     # List all aliases

Usage

Adding an Alias

claude-alias add

You'll be guided through:

  1. Alias name - e.g., ccd for DeepSeek, ccz for Z.AI
  2. Provider - Select from presets or enter custom
  3. API key - Stored securely in Keychain/secret-tool
  4. Base URL - Auto-filled for preset providers
  5. Model configuration - Optional opus/sonnet/haiku/subagent models
  6. Max output tokens - Optional limit

Example: DeepSeek Setup

$ claude-alias add
? Enter alias name: ccd
? Select provider: DeepSeek
? Enter API key: ****
? Token type: ANTHROPIC_AUTH_TOKEN
? Opus Model: deepseek-chat
✅ Alias 'ccd' created successfully!

# Now use it
$ source ~/.zshrc
$ ccd

Z.AI Quick Setup

Z.AI comes pre-configured with optimal models:

$ claude-alias add
? Enter alias name: ccz
? Select provider: Z.AI (GLM Models)
? Enter API key: ****
# Models auto-configured: glm-4.7 (opus/sonnet), glm-4.5-air (haiku)
✅ Alias 'ccz' created!

How It Works

  1. Profile scripts are created in ~/.local/bin/claude-{alias}
  2. Shell aliases are added to your .zshrc or .bashrc
  3. API keys are stored in macOS Keychain or Linux secret storage
  4. Each alias gets its own config directory (~/.claude-{alias})
  5. MCP settings are symlinked from ~/.claude/settings.json

Provider Presets

| Provider | Base URL | |----------|----------| | Z.AI | https://api.z.ai/api/anthropic | | DeepSeek | https://api.deepseek.com | | OpenRouter | https://openrouter.ai/api/v1 | | OpenAI | https://api.openai.com/v1 | | Anthropic | https://api.anthropic.com | | Google AI | https://generativelanguage.googleapis.com/v1beta | | Mistral | https://api.mistral.ai/v1 | | Groq | https://api.groq.com/openai/v1 | | Together AI | https://api.together.xyz/v1 | | Fireworks AI | https://api.fireworks.ai/inference/v1 | | Perplexity | https://api.perplexity.ai |

Model Environment Variables

| Variable | Description | |----------|-------------| | ANTHROPIC_DEFAULT_OPUS_MODEL | Primary model for complex tasks/Plan Mode | | ANTHROPIC_DEFAULT_SONNET_MODEL | Default model for normal operation | | ANTHROPIC_DEFAULT_HAIKU_MODEL | Fast model for background tasks | | CLAUDE_CODE_SUBAGENT_MODEL | Model for subagent operations |

Troubleshooting

API key not found

# Re-add the alias to store the key again
claude-alias add
# Enter the same alias name to reconfigure

MCP servers not showing

# Symlink is created automatically, but you can force it:
ln -sf ~/.claude/settings.json ~/.claude-{alias}/settings.json

Command not found after adding alias

# Source your shell profile
source ~/.zshrc  # or ~/.bashrc
# Or open a new terminal

Security

  • macOS: API keys stored in Keychain (secure enclave)
  • Linux with secret-tool: Stored in GNOME Keyring/KDE Wallet
  • Linux fallback: AES-256 encrypted file (~/.config/claude-alias/secrets.enc)

Disclaimer

This project is an independent, community-developed tool and is not affiliated with, endorsed by, or sponsored by Anthropic, PBC.

  • Claude and Claude Code are trademarks of Anthropic, PBC.
  • This tool is a third-party utility that helps manage environment configurations for Claude Code.
  • Use of Claude Code is subject to Anthropic's Terms of Service.
  • Provider names mentioned (DeepSeek, OpenRouter, OpenAI, Google, etc.) are trademarks of their respective owners.

This software is provided "as is" without warranty of any kind. The authors are not responsible for any issues arising from the use of this tool with Claude Code or any third-party API providers.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT © 2024


This project is not affiliated with Anthropic. Claude and Claude Code are trademarks of Anthropic, PBC.