{"_id":"@ecophase-ai/ecotoken","_rev":"4-bc4243579ec4ae0f0b8ebd2ee426c33b","name":"@ecophase-ai/ecotoken","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@ecophase-ai/ecotoken","version":"0.1.0","keywords":["ecotoken","claude-code","codex","opencode","hermes"],"license":"LGPL-3.0-only","_id":"@ecophase-ai/ecotoken@0.1.0","maintainers":[{"name":"daxing_asta","email":"daxingsixsix@gmail.com"}],"bin":{"ecotoken":"bin/ecotoken.js"},"dist":{"shasum":"4d82575f23d66d3b80151e954c37b1b10b601123","tarball":"https://registry.npmjs.org/@ecophase-ai/ecotoken/-/ecotoken-0.1.0.tgz","fileCount":11,"integrity":"sha512-0yY/ge+mY/EM23CIplF5GCWg3iK6l+Gw1oHo0wQ9ttUxrnM6vQr61XxTfuzuLoBng/e9O+jXdomzvfSi9OZ73g==","signatures":[{"sig":"MEUCIGd46RCDNDoUBYzrpy9blfHeq51Gy4FXI24l6w8yBvwcAiEA4wNCKTGu6K315XKz5k2nIvUw4RmB0jYBWaoprxexFSQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28087},"type":"module","engines":{"node":">=18.18"},"exports":{".":"./src/index.js"},"gitHead":"169788f3cf607b1e8a6788df043cc7567d2b75b0","scripts":{"test":"node --test","pack:check":"npm pack --dry-run"},"_npmUser":{"name":"daxing_asta","email":"daxingsixsix@gmail.com"},"_npmVersion":"11.17.0","description":"Configure popular AI coding agents to use EcoToken.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ecotoken_0.1.0_1786602968093_0.4010092515622268","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@ecophase-ai/ecotoken","version":"0.1.1","keywords":["ecotoken","claude-code","codex","opencode","hermes"],"license":"LGPL-3.0-only","_id":"@ecophase-ai/ecotoken@0.1.1","maintainers":[{"name":"daxing_asta","email":"daxingsixsix@gmail.com"}],"bin":{"ecotoken":"bin/ecotoken.js"},"dist":{"shasum":"605a0f562612d7781e6268c0e8222ba653ea425a","tarball":"https://registry.npmjs.org/@ecophase-ai/ecotoken/-/ecotoken-0.1.1.tgz","fileCount":11,"integrity":"sha512-8cEPaPvJCr8mEmsf62XYKh8oCyBPNnoa7RZRfxEcUUWPeX3l93QgMgk/7gEXElYoeYPuDR3xLxKyaYVlGNDohA==","signatures":[{"sig":"MEYCIQCg0Y5tdKwkynmytCpJ0TraoBQGWBlKO84X8KecjJNg3gIhAIhhqsePOzlWY+2RdTf9Ri05f6cdW8arExHA//RzidGM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28735},"type":"module","engines":{"node":">=18.18"},"exports":{".":"./src/index.js"},"gitHead":"400bb7391038ce9f7a4669e0e4af89849162e5c8","scripts":{"test":"node --test","pack:check":"npm pack --dry-run"},"_npmUser":{"name":"daxing_asta","email":"daxingsixsix@gmail.com"},"_npmVersion":"11.17.0","description":"Configure popular AI coding agents to use EcoToken.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ecotoken_0.1.1_1786604845069_0.4359636094372954","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@ecophase-ai/ecotoken","version":"0.1.2","keywords":["ecotoken","claude-code","codex","opencode","hermes"],"license":"LGPL-3.0-only","_id":"@ecophase-ai/ecotoken@0.1.2","maintainers":[{"name":"daxing_asta","email":"daxingsixsix@gmail.com"}],"bin":{"ecotoken":"bin/ecotoken.js"},"dist":{"shasum":"58bad0726e0ab0c8fb9e631d97fa2d6e46798bd7","tarball":"https://registry.npmjs.org/@ecophase-ai/ecotoken/-/ecotoken-0.1.2.tgz","fileCount":11,"integrity":"sha512-Q9MU73fVOM5AYBJ3NRWAu4j1VxWnz/AoqL9W80QoYyhhBpAxUUAaLWT+3L5eEu8IEp+Pw3fdGtwrsh1sgFCx4w==","signatures":[{"sig":"MEUCICFnsVamb45Qj6TVpnERfaT0e932yMJTJmuZykosJMKUAiEA4+oWjKUtYWD8z1p6PTpwt8EUiyQyb1slynbGT1Q2CBo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29657},"type":"module","engines":{"node":">=18.18"},"exports":{".":"./src/index.js"},"gitHead":"400bb7391038ce9f7a4669e0e4af89849162e5c8","scripts":{"test":"node --test","pack:check":"npm pack --dry-run"},"_npmUser":{"name":"daxing_asta","email":"daxingsixsix@gmail.com"},"_npmVersion":"11.17.0","description":"Configure popular AI coding agents to use EcoToken.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ecotoken_0.1.2_1786606821894_0.12161722928879803","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@ecophase-ai/ecotoken","version":"0.1.3","description":"Configure popular AI coding agents to use EcoToken.","type":"module","bin":{"ecotoken":"bin/ecotoken.js"},"exports":{".":"./src/index.js"},"scripts":{"test":"node --test","pack:check":"npm pack --dry-run"},"engines":{"node":">=18.18"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"keywords":["ecotoken","claude-code","codex","opencode","hermes"],"license":"LGPL-3.0-only","gitHead":"458aeeb3f67d4e699a48d195c1532cadb8e02827","_id":"@ecophase-ai/ecotoken@0.1.3","_nodeVersion":"24.18.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-sXu+7jwN6uvEsjiHrAZ3Dt2X8SGVna00HOMnDqNxMl60qYDZ/uWYLcpl2sopHtlkHFOK7K1kStsxprTTKRnhOg==","shasum":"b2506e37e066c4ee0bae8013fe170029b1aba012","tarball":"https://registry.npmjs.org/@ecophase-ai/ecotoken/-/ecotoken-0.1.3.tgz","fileCount":12,"unpackedSize":69002,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCm5nAxnFlE47Q17xG+6ZxlcQ3m4zGNPwMxsrptdZiG9wIhANZmPlVLMj/YtaUT1A3BMjT21xjpCRGAvF8Wn26RWemh"}]},"_npmUser":{"name":"daxing_asta","email":"daxingsixsix@gmail.com"},"directories":{},"maintainers":[{"name":"daxing_asta","email":"daxingsixsix@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ecotoken_0.1.3_1787144852826_0.28604983797038486"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T06:36:07.919Z","modified":"2026-08-19T13:07:33.190Z","0.1.0":"2026-08-13T06:36:08.230Z","0.1.1":"2026-08-13T07:07:25.218Z","0.1.2":"2026-08-13T07:40:22.031Z","0.1.3":"2026-08-19T13:07:32.977Z"},"license":"LGPL-3.0-only","keywords":["ecotoken","claude-code","codex","opencode","hermes"],"description":"Configure popular AI coding agents to use EcoToken.","maintainers":[{"name":"daxing_asta","email":"daxingsixsix@gmail.com"}],"readme":"# @ecophase-ai/ecotoken\r\n\r\n将 Claude Code、Codex CLI、OpenCode 和 Hermes Agent 快速接入 EcoToken。\r\n\r\n## 安装\r\n\r\n```bash\r\nnpm install -g @ecophase-ai/ecotoken\r\n```\r\n\r\n## 使用\r\n\r\n打开交互菜单：\r\n\r\n```bash\r\necotoken\r\n```\r\n\r\n也可以一条命令完成配置：\r\n\r\n```bash\r\necotoken cc -k YOUR_API_KEY -u https://ecotoken.ecophase-ai.com/v1 -m deepseek-v4-flash-0731\r\necotoken codex -k YOUR_API_KEY -u https://ecotoken.ecophase-ai.com/v1 -m deepseek-v4-flash-0731\r\necotoken opencode -k YOUR_API_KEY -u https://ecotoken.ecophase-ai.com/v1 -m deepseek-v4-flash-0731\r\necotoken hermes -k YOUR_API_KEY -u https://ecotoken.ecophase-ai.com/v1 -m deepseek-v4-flash-0731\r\n```\r\n\r\n为避免 API Key 出现在 shell 历史中，推荐使用交互菜单，或先设置 `ECOTOKEN_API_KEY`：\r\n\r\n```bash\r\nexport ECOTOKEN_API_KEY=\"YOUR_API_KEY\"\r\necotoken codex -u https://ecotoken.ecophase-ai.com/v1 -m deepseek-v4-flash-0731\r\n```\r\n\r\n## 配置安全\r\n\r\n- 修改前会把原文件备份为同目录下的 `.ecotoken.bak`，每次覆盖同一个备份，不会无限占用磁盘。\r\n- 配置通过临时文件原子替换，避免中途写坏。\r\n- 配置和凭据文件权限设置为仅当前用户可读写（`0600`，平台支持时）。\r\n- `--dry-run` 只展示目标文件和脱敏后的密钥，不落盘。\r\n- Codex 按实测配置同时写入 `~/.codex/config.toml` 与 `~/.codex/models.json`，使用 Responses API 调用当前模型 `deepseek-v4-flash-0731`。\r\n- Codex 的 API Key 会写入本机 `config.toml` 的 `experimental_bearer_token`；工具会把文件权限设置为仅当前用户可读写（平台支持时），请勿把该文件提交到版本库。\r\n- 配置路径遵循 Agent 官方环境变量：`CLAUDE_CONFIG_DIR`、`CODEX_HOME`、`OPENCODE_CONFIG`、`HERMES_HOME` 和 `XDG_CONFIG_HOME`。\r\n- Windows 原生 Hermes 默认写入 `%LOCALAPPDATA%\\hermes\\config.yaml`；WSL、macOS 和 Linux 默认写入 `~/.hermes/config.yaml`。\r\n\r\n## 发布（维护者）\r\n\r\n```bash\r\nnpm login\r\nnpm whoami\r\nnpm pack --dry-run\r\nnpm publish --access public\r\n```\r\n\r\n首次发布前请确认 npm 账号属于 `ecophase-ai` 组织，并具有发布 `@ecophase-ai/ecotoken` 的权限。\r\n","readmeFilename":"README.md"}