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

@peezy.tech/codex-flows

v0.132.4

Published

Codex app-server clients, flow runtime, workspace backend helpers, and runnable local backend bins.

Readme

@peezy.tech/codex-flows

Codex app-server client APIs, workspace backend helpers, flow tooling, and runnable local backend CLIs.

pnpm add @peezy.tech/codex-flows

or:

npm install @peezy.tech/codex-flows

Full documentation lives in the repo docs site:

Exports

| Export | Purpose | |--------|---------| | @peezy.tech/codex-flows | Node app-server client, event emitter base, stdio/WebSocket transports, JSON-RPC helpers, auth helpers. | | @peezy.tech/codex-flows/browser | Browser-safe app-server client and WebSocket transport. | | @peezy.tech/codex-flows/flows | Helpers for starting Codex-backed flow work. | | @peezy.tech/codex-flows/auth | Privacy-preserving Codex account login, status, and usage helpers. | | @peezy.tech/codex-flows/workbench | Transport-neutral thread UX reducers and app-server request descriptors. | | @peezy.tech/codex-flows/threads | Raw Codex rollout locate, inspect, install, and transplant helpers. | | @peezy.tech/codex-flows/workspace-backend | Workspace backend protocol server/client helpers and capability primitives. | | @peezy.tech/codex-flows/flow-runtime | Flow package discovery, trigger matching, local execution, and flow result helpers. | | @peezy.tech/codex-flows/flow-runtime/* | Flow runtime client, local-client, backend-client, Node helper, and runner subpaths. | | @peezy.tech/codex-flows/rpc | JSON-RPC message types and parsing helpers. | | @peezy.tech/codex-flows/generated | Generated Codex app-server protocol types. | | @peezy.tech/codex-flows/generated/* | Generated per-type modules. |

App-Server Client

import { CodexAppServerClient } from "@peezy.tech/codex-flows";

const client = new CodexAppServerClient();
await client.connect();

const threads = await client.listThreads({});

client.close();

CodexAppServerClient defaults to a stdio transport that starts codex app-server. Set CODEX_APP_SERVER_CODEX_COMMAND or pass transportOptions.codexCommand when a specific binary should be used.

Browser entry:

import { CodexAppServerClient } from "@peezy.tech/codex-flows/browser";

const client = new CodexAppServerClient({
	webSocketTransportOptions: { url: "ws://127.0.0.1:3585" },
});
await client.connect();

Flow Helpers

import { createCodexFlowClient } from "@peezy.tech/codex-flows/flows";

const codex = createCodexFlowClient({
	appServerUrl: "ws://127.0.0.1:3585",
});

const result = await codex.startFlow({
	cwd: "/path/to/app",
	prompt: "Run the app-specific Codex workflow.",
	approvalPolicy: "never",
	sandbox: "danger-full-access",
	wait: false,
});

console.log(result.threadId, result.turnId);

Auth Helpers

import {
	CodexAppServerClient,
	createCodexAuthClient,
} from "@peezy.tech/codex-flows";

const client = new CodexAppServerClient();
await client.connect();

const auth = createCodexAuthClient(client);
const state = await auth.getState();

if (state.status !== "authenticated") {
	const login = await auth.startChatGptLogin();
	console.log(login.authUrl);
}

The high-level auth state intentionally omits email addresses and stable account identifiers. It exposes anonymous auth mode, plan, and usage data by default.

Workbench Boundary

@peezy.tech/codex-flows/workbench does not execute app-server requests. It derives reusable UX state from app-server notifications and completed turns, and returns request descriptors for actions:

import { threadGoalSetDescriptor } from "@peezy.tech/codex-flows/workbench";

const action = threadGoalSetDescriptor({
	threadId,
	objective: "Finish the release checks.",
	status: "active",
	tokenBudget: 8000,
});

await client.request(action.method, action.params);

The app-server protocol remains the source of truth for thread commands.

CLI

The package publishes the codex-flows binary and runnable process bins for the local backend and utility CLIs:

codex-flows fetch
codex-flows app thread/list '{"limit":20,"sourceKinds":[]}'
codex-flows workspace app thread/list '{"limit":20,"sourceKinds":[]}'
codex-flows workspace doctor
codex-flows workspace tick --mode local
codex-flows memories transplant global-to-workspace
codex-flows threads transplant <thread-id> --from-codex-home ~/.codex --to-codex-home ./.codex
codex-flows pack inspect owner/repo
codex-flows pack add ./engineering-capabilities --apply
codex-flows flow events --limit 20

codex-app thread/list '{"limit":20,"sourceKinds":[]}'
codex-flow-runner list
codex-workspace-backend-local serve --local-app-server

See docs/pages/reference/cli.md for the full command surface.

Gateway packages, such as Discord text or voice integrations, should depend on this package and consume @peezy.tech/codex-flows/workspace-backend instead of being bundled into the core package.

Development Scripts

vp run --filter @peezy.tech/codex-flows build
vp run --filter @peezy.tech/codex-flows check:types
vp run --filter @peezy.tech/codex-flows test
vp run --filter @peezy.tech/codex-flows pack:dry-run
vp run --filter @peezy.tech/codex-flows release:check

build emits ESM JavaScript, source maps, and declaration files into dist. release:check runs tests, type checking, a clean build, export smoke tests, and npm pack --dry-run.

Generated protocol files live in src/app-server/generated. Keep handwritten client and transport code outside that generated tree.