GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mynameistito/codex-usage: CLI for inspecting Codex usage windows and reset credits

BranchesTags
Open more actions menu

Latest commit

 

History

150 Commits
150 Commits

Folders and files

NameName
Last commit message
Last commit date
.changeset
.changeset
 
 
.github
.github
 
 
.vscode
.vscode
 
 
.zed
.zed
 
 
__tests__
__tests__
 
 
scripts
scripts
 
 
src
src
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bun.lock
bun.lock
 
 
lefthook.yml
lefthook.yml
 
 
oxfmt.config.ts
oxfmt.config.ts
 
 
oxlint.config.ts
oxlint.config.ts
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tsdown.config.ts
tsdown.config.ts
 
 

Repository files navigation

@mynameistito/codex-usage

CLI for inspecting Codex usage windows and banked reset credits from ~/.codex/auth.json.

Usage

codex-usage
codex-usage status --json
codex-usage resets
codex-usage reset --confirm

reset is intentionally guarded. It will not call the reset redemption endpoint unless --confirm, -y, or --yes is provided. Calling applications should require the same kind of explicit user confirmation before using programmatic reset redemption.

Library usage

import {
  createCodexClient,
  formatUsage,
  readCodexAuth,
} from "@mynameistito/codex-usage";
import { Effect } from "effect";

const program = Effect.gen(function* () {
  const tokens = yield* readCodexAuth();
  const client = yield* createCodexClient(tokens);
  const usage = yield* client.fetchUsage();

  return formatUsage(usage);
});

const output = await Effect.runPromise(program);
process.stdout.write(output);

Development

bun install
bun run typecheck
bun test
bun run build
bun run check

About

CLI for inspecting Codex usage windows and reset credits

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.