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

@sematico/flue-codex

v0.2.0

Published

Register subscription-backed OpenAI Codex models with Flue using local Codex CLI auth.

Downloads

71

Readme

@sematico/flue-codex

Use local Codex CLI subscription auth as a Flue provider. This lets Flue agents call Codex models without an OpenAI API key.

Install

pnpm add @sematico/flue-codex @flue/runtime

Log in with Codex first:

codex login

@sematico/flue-codex reads ~/.codex/auth.json, refreshes stale OAuth tokens using metadata from the current Codex login, discovers the account's available Codex models using the installed Codex runtime metadata, and registers them with Flue as openai-codex/*.

The package does not ship an OpenAI OAuth client ID or Codex backend version. It infers the OAuth client_id from the logged-in access token, discovers the token endpoint from that token's issuer, reads the Codex client version from the local model cache or installed codex --version, and resolves the ChatGPT backend URL from Codex runtime configuration.

Usage

import { defineAgent } from '@flue/runtime';
import { registerCodexProvider } from '@sematico/flue-codex';

const provider = await registerCodexProvider();

export default defineAgent(() => ({
  model: provider.defaultModelId,
  instructions: 'Help with the task.',
}));

Provider options are grouped by concern:

await registerCodexProvider({
  auth: { path: '/path/to/auth.json' },
  runtime: { baseUrl: 'https://chatgpt.com/backend-api', clientVersion: '0.203.4' },
  timeouts: { fetchMs: 30_000 },
});

Diagnostics

pnpm exec flue-codex-doctor
pnpm exec flue-codex-doctor --live

--live sends a tiny real prompt through Flue and Codex.

API

  • @sematico/flue-codex exports registerCodexProvider(options?), safe provider result/types, and FlueCodexError.
  • @sematico/flue-codex/provider exports createCodexProviderDefinition(options?) for advanced provider composition. The returned registration contains the Codex access token.
  • @sematico/flue-codex/diagnostics exports doctorCodexProvider(options?) and runCodexLiveSmoke(options).
  • @sematico/flue-codex/auth exports credential and auth-file resolvers.
  • @sematico/flue-codex/runtime exports Codex runtime metadata resolvers.
  • @sematico/flue-codex/models exports Codex model discovery.

License

MIT. See LICENSE.