
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
opencode-usage-plugin
Advanced tools
OpenCode plugin to display subscription usages for OpenAI, Google, and z.ai
OpenCode plugin that fetches subscription usage for OpenAI, Google, and z.ai.
/usage command for all providers/usage <provider> for a single providerCreate or edit ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-usage-plugin@0.0.1"]
}
For local development, use a relative path:
{
"plugin": ["./path/to/opencode-usage-plugin"]
}
opencode-openai-codex-auth plugin, or ensure openai auth exists in
~/.local/share/opencode/auth.json (aliases: codex, chatgpt).~/.opencode/auth/openai.json as a fallback.opencode-antigravity-auth) or ensure
google auth exists in ~/.local/share/opencode/auth.json (alias: antigravity).~/.config/opencode/antigravity-accounts.json.activeIndex account is used for usage checks (falls back to the first account).zai-coding-plan entry in ~/.local/share/opencode/auth.json with the API key
(aliases: zai, z.ai), or set ZAI_API_KEY./usage
/usage openai
/usage google
/usage zai-coding-plan
usage tool returns a JSON array (string) of provider usage resultscommand/usage.md formats a human-readable summarynpm install
mise run build
npm test
mise run lint
Tests use vitest with a provider-specific auth configuration system.
Run all tests (mocks only, default):
npm test
Run tests with real auth:
# Edit .env.test and set desired provider(s) to 1
TEST_REAL_OPENAI_AUTH=1
TEST_REAL_GOOGLE_AUTH=1
TEST_REAL_ZAI_CODING_PLAN_AUTH=1
npm test
Run specific provider tests:
npm test -- src/providers/openai/fetch.test.ts
npm test -- src/providers/google/fetch.test.ts
npm test -- src/providers/zai-coding-plan/fetch.test.ts
Test structure:
src/providers/common/test-helpers.ts - Shared test utilities and fixturessrc/providers/*/*.test.ts - Provider-specific tests with mocks and real auth.env.test - Auth configuration flags (committed to repo)vitest.config.ts - Test configurationTests are organized into two categories per provider:
.env.test flagsAdding new providers:
src/providers/TEST_REAL_NEWPROVIDER_AUTH=0 to .env.testsrc/providers/newprovider.test.ts following existing patternssrc/test-helpers.ts if neededNelson Pires nelsonpires.sn@gmail.com
https://github.com/nelsonPires5/opencode-usage-plugin
MIT License. See the LICENSE file for details.
FAQs
OpenCode plugin to display subscription usages for OpenAI, Google, and z.ai
The npm package opencode-usage-plugin receives a total of 50 weekly downloads. As such, opencode-usage-plugin popularity was classified as not popular.
We found that opencode-usage-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.