@envmanager-cli/cli

中文文档
0.8.1发布于 2026/11/13UNLICENSEDTypeScriptES Module近 30 天下载 2000

CLI for EnvManager - secure environment variable management

原始使用文档
文档目录14 节
  1. Installation
  2. Quick Start
  3. Commands
  4. Shell Completion
  5. Homebrew Users
  6. npm Users
  7. Using Friendly IDs
  8. Default Environment
  9. Multiple Organizations
  10. CI/CD Usage
  11. Telemetry
  12. Documentation
  13. Support
  14. License

@envmanager-cli/cli

Official CLI for EnvManager - secure environment variable management for development teams.

Installation

# npm
npm install -g @envmanager-cli/cli

# Homebrew (macOS/Linux)
brew install shintaii/tap/envmanager

Quick Start

# Login to EnvManager
envmanager login

# Pull environment variables
envmanager pull

# Push local changes
envmanager push

# Compare local vs remote
envmanager diff

Commands

CommandDescription
loginAuthenticate with EnvManager
logoutClear stored credentials
whoamiShow current user info
pullDownload variables to .env file
pushUpload variables from .env file
setSet one or more variables directly (KEY=VALUE)
diffCompare local and remote variables
listList projects, environments and variables
runRun a command with variables injected (values never printed)
serviceManage services (service create <name>)
configManage CLI configuration
devReal-time sync during development
templateManage .env templates
validateValidate against schema
completionGenerate shell completion script
debugCollect diagnostic info for troubleshooting

Shell Completion

Enable tab completion for commands, options, and your actual project/environment names.

Homebrew Users

If you installed via Homebrew and have shell completion configured, it works automatically.

npm Users

Add one of these to your shell config:

Bash (~/.bashrc or ~/.bash_profile):

eval "$(envmanager completion bash)"

Zsh (~/.zshrc):

eval "$(envmanager completion zsh)"

Fish:

envmanager completion fish > ~/.config/fish/completions/envmanager.fish

Then restart your shell or run source ~/.bashrc (or equivalent).

Using Friendly IDs

Projects and environments have friendly IDs (like #1, #2) that are easier to use than UUIDs.

# List projects to see their IDs
envmanager list projects
#  #1   my-api (My Organization)
#  #2   my-webapp (My Organization)

# Use friendly ID instead of UUID
envmanager pull --project 1 --environment development

# Also works with names
envmanager pull --project my-api --environment production

Default Environment

When -e / --environment is omitted, it defaults to development. You can override the default in envmanager.json:

{
  "environment": "staging"
}

Multiple Organizations

If you belong to multiple organizations, the CLI auto-detects the organization from your project when possible. Use --org to specify explicitly if needed:

envmanager pull --org "My Company" --project 1 --environment staging

Single-organization users don't need --org - it's auto-selected.

CI/CD Usage

Set ENVMANAGER_API_KEY environment variable for non-interactive authentication:

# GitHub Actions example
- name: Pull env vars
  env:
    ENVMANAGER_API_KEY: ${{ secrets.ENVMANAGER_API_KEY }}
  run: envmanager pull --org "My Company" --project 1 --env production

Note: When using API keys, --org must match the organization the API key was created for.

Telemetry

The CLI collects anonymous usage analytics so we can tell whether features actually work for people (e.g. whether a pull succeeds after install). We send command names, success/failure, error categories, counts and durations only.

We never send your variable names, values, file contents, file paths, or organization/project/environment names.

It is automatically disabled when you point the CLI at a self-hosted or local API endpoint. To opt out:

envmanager config telemetry off      # persist the choice
envmanager config telemetry status   # check current state

# or via environment variables
export ENVMANAGER_TELEMETRY=0
export DO_NOT_TRACK=1                 # honored too

Documentation

Full documentation available at envmanager.dev/docs/cli

Support

License

Proprietary - see LICENSE file. This software requires an active EnvManager subscription.

版本与发布记录

@envmanager-cli/cli 共发布 22 个版本,首次发布于 2026/02/06;过去 12 个月发布了 22 个版本。

版本发布日期距今
0.8.1latest2026/11/131 天前
0.8.02026/09/241 个月前
0.7.02026/08/252 个月前
0.6.02026/06/244 个月前
0.5.12026/06/194 个月前
0.5.02026/06/194 个月前

关于 @envmanager-cli/cli 的常见问题

@envmanager-cli/cli 是什么?

CLI for EnvManager - secure environment variable management

如何安装 @envmanager-cli/cli?

在项目目录运行 npm install @envmanager-cli/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 envmanager,可以用 npx envmanager 直接运行。

@envmanager-cli/cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@envmanager-cli/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@envmanager-cli/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@envmanager-cli/cli 可以商用吗?

@envmanager-cli/cli 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@envmanager-cli/cli 的下载量有多少?

根据 npm 官方下载统计,@envmanager-cli/cli 在 2026/10/14 – 2026/11/12 这 30 天内被下载 2,000 次,日均约 67 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@envmanager-cli/cli 还在维护吗?

最新版本 0.8.1 发布于 2026/11/13(1 天前);至今共发布 22 个版本,其中过去 12 个月发布了 22 个;首次发布于 2026/02/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。