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

@lkangd/cc-env

v1.4.0

Published

Manage runtime environment variables for Claude Code

Readme


概述

cc-env 是一个 CLI 工具,让你可以为 Claude Code 定义、切换和恢复环境变量配置——支持按项目配置或使用可复用的预设。不再需要手动编辑 settings.json 或在不同工作区之间切换 .env 文件。

别名: ccenv 可以作为 cc-env 的简写使用(例如 ccenv runccenv create)。

安装

通过 npm

npm install -g @lkangd/cc-env

需要 Node.js >=20.19.2

通过 Homebrew

brew tap lkangd/tap
brew install cc-env

快速开始

# 1. 在项目中初始化 cc-env
cc-env init

# 2. 创建一个包含环境变量的预设
cc-env create

# 3. 使用预设运行 Claude Code
cc-env run

命令

| 命令 | 说明 | |---|---| | cc-env init | 为当前项目初始化 cc-env | | cc-env run [args...] | 使用合并后的环境变量运行 Claude Code | | cc-env restore | 从之前的快照恢复环境变量 | | cc-env show | 列出并查看所有保存的预设 | | cc-env create | 创建新的环境变量预设 | | cc-env edit <name> | 编辑现有预设 | | cc-env rename <from> <to> | 重命名预设 | | cc-env delete | 删除保存的预设 | | cc-env doctor | 检查系统健康状况和配置 | | cc-env completion | 生成 shell 补全脚本 |

全局选项

--verbose        启用详细输出
--quiet          抑制非必要输出
--no-interactive 禁用交互式提示(等同于 -y)

Shell 补全

补全脚本同时支持 cc-envccenv

# bash
cc-env completion bash >> ~/.bashrc

# zsh
cc-env completion zsh >> ~/.zshrc

# fish
cc-env completion fish >> ~/.config/fish/completions/cc-env.fish

开发

# 安装依赖
npm install

# 开发模式运行
npm run dev

# 构建
npm run build

# 运行测试
npm test

# 运行测试并生成覆盖率报告
npm run test:coverage

许可证

ISC © lkangd