Skip to content
PluginStats

ai-sdk-provider-codex-cli weekly downloads statistics

By ben-vargas (4 listings) · npm · AI SDKs

AI SDK v7 provider for OpenAI Codex CLI (use ChatGPT Plus/Pro subscription)

View on npm Fresh · Dec 6, 2026

ai-sdk-provider-codex-cli has 51,957 recorded weekly downloads on npm, an increase of 30.6% over the past 30 days, ranking #770 of 3,247 tracked listings.

Weekly downloads
51,957
Official API · Dec 5, 2026
7-day growth
+13.0%
+6K weekly downloads
30-day growth
+30.6%
+12.2K weekly downloads
90-day growth
+84.3%
+23.8K weekly downloads
Rank
#770
▲ 11 in 7 days

About ai-sdk-provider-codex-cli

AI SDK Provider for Codex CLI

npm version npm downloads License: MIT Node >= 22 AI SDK v7 Modules: ESM only TypeScript PRs welcome Latest Release

A community provider for Vercel AI SDK v7 that integrates OpenAI's Codex CLI (for example gpt-6-astra) using your ChatGPT Plus/Pro subscription. Available model slugs follow whatever your installed Codex CLI exposes — use listModels() / provider.listModels() to discover them.

This package ships two provider modes:

  • codexExec: non-interactive codex exec (spawn a new process per call)

  • codexAppServer: persistent codex app-server JSON-RPC client (shared process, true delta streaming, optional stateful threads)

  • Works with generateText, streamText, and generateObject

  • Uses ChatGPT OAuth from codex login (tokens in ~/.codex/auth.json) or OPENAI_API_KEY

  • Node-only (spawns a local process); supports CI and local dev

  • Requires Node.js >= 22; published as an ESM-only package

  • v2.0.0: AI SDK v7 migration with the native LanguageModelV4 provider spec (package line 2.x)

  • v1.0.0: AI SDK v6 migration with the LanguageModelV3 interface (now on the ai-sdk-v6 tag)

Version Compatibility

Package lineAI SDKnpm tagGit branchStatus
2.xv7latest, ai-sdk-v7mainActive development
1.xv6ai-sdk-v6ai-sdk-v6Maintenance
0.7.xv5ai-sdk-v5ai-sdk-v5Maintenance / critical fixes
0.1.0-ai-sdk-v4v4ai-sdk-v4ai-sdk-v4Frozen

Installation

For AI SDK v7 (default)
  1. Install and authenticate Codex CLI
npm i -g @openai/codex
codex login   # or set OPENAI_API_KEY
  1. Install provider and AI SDK v7
npm i ai ai-sdk-provider-codex-cli

Requirements: Node.js >= 22. This package is ESM-only (no CommonJS build); load it with import (or dynamic import() from CJS).

For AI SDK v6
npm i ai@^6 ai-sdk-provider-codex-cli@ai-sdk-v6
For AI SDK v5
npm i ai@^5.0.0 ai-sdk-provider-codex-cli@ai-sdk-v5

⚠️ Codex CLI Version: Requires the current stable Codex CLI 0.156.x for full support of both provider modes (codexExec and codexAppServer). This package pins its optional @openai/codex dependency to ^0.156.1, the latest non-alpha release line validated for this release line. gpt-6-sol (used by the examples) is rejected by older CLIs (< 0.155.0) with "model is not supported when using Codex with a ChatGPT account". If you supply your own Codex CLI (global install or custom codexPath), check it with codex --version and upgrade if needed.

npm i -g @openai/codex@latest

Quick Start

Exec provider (codexExec) — process-per-call
import { generateText } from 'ai';
import { codexExec } from 'ai-sdk-provider-codex-cli';

const model = codexExec('gpt-6-astra', {
  allowNpx: true,
  skipGitRepoCheck: true,
  approvalMode: 'on-request',
  sandboxMode: 'workspace-write',
});

const { text } = await generateText({
  model,
  prompt: 'Reply with a single word: hello.',
});
console.log(text);
App-server provider (createCodexAppServer) — persistent process
import { streamText } from 'ai';
import { createCodexAppServer } from 'ai-sdk-provider-codex-cli';

const provider = createCodexAppServer({
  defaultSettings: {
    minCodexVersion: '0.156.0',
    autoApprove: false,
    personality: 'pragmatic',
  },
});

const { textStream } = await streamText({
  model: provider('gpt-6-astra'),
  prompt: 'Write two short lines of encouragement.',
});
for await (const chunk of textStream) process.stdout.write(chunk);

await provider.close();
App-server stateful threads (optional)

By default, codexAppServer is stateless (new ephemeral thread per call). To continue a prior conversation across calls, start a persistent thread and then pass its threadId in providerOptions['codex-app-server'].

import { generateText } from 'ai';
import { createCodexAppServer } from 'ai-sdk-provider-codex-cli';

const provider = createCodexAppServer();

const first = await generateText({
  model: provider('gpt-6-astra'),
  prompt: 'Start a migration checklist.',
  providerOptions: {
    'codex-app-server': { threadMode: 'persistent' },
  },
});

const threadId = first.finalStep.providerMetadata?.['codex-app-server']?.threadId;

const second = await generateText({
  model: provider('gpt-6-astra'),
  prompt: 'Continue from step 2.',
  providerOptions: {
    'codex-app-server': { threadId },
  },
});

await provider.close();
Object generation (Zod)
import { generateObject } from 'ai';
import { z } from 'zod';
import { codexExec } from 'ai-sdk-provider-codex-cli';…

Description from the npm listing.

  • ai-sdk
  • codex
  • openai
  • cli
  • language-model
  • gpt-6-sol
  • gpt-6-astra
  • provider

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

ai-sdk-provider-codex-cli weekly downloads on npm, last 90 days: 51,957 weekly downloads as of Dec 5, 2026, +84.3% over 90 days.ai-sdk-provider-codex-cliWeekly downloads on npm · Last 90 days51,957downloads / week+84.3% over 90 days010K20K30K40K50K60KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
ai-sdk-provider-codex-cli weekly downloads on npm, last 90 days: 51,957 weekly downloads as of Dec 5, 2026, +84.3% over 90 days.

7/30/90-day growth

ai-sdk-provider-codex-cli weekly downloads growth on npm: +13.0% over 7 days, +30.6% over 30 days, +84.3% over 90 days.ai-sdk-provider-codex-cliWeekly downloads growth on npm51,957downloads / week now7-day growth+5,978 weekly downloads+13.0%30-day growth+12,183 weekly downloads+30.6%90-day growth+23,758 weekly downloads+84.3%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
ai-sdk-provider-codex-cli weekly downloads growth on npm: +13.0% over 7 days, +30.6% over 30 days, +84.3% over 90 days.

Ranking history

ai-sdk-provider-codex-cli npm ranking history: currently #770 (by weekly downloads).ai-sdk-provider-codex-clinpm ranking · by weekly downloads · Last 90 days#770current rank#720#740#760#780#800#820#840#860#880Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
ai-sdk-provider-codex-cli npm ranking history: currently #770 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 39, #10 (overall #770)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 3, #10 (overall #50)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for ai-sdk-provider-codex-cli
Date (UTC)Weekly downloadsChange vs. previous
51,957+588
51,369+1.2K
50,218+472
49,746+5.1K
44,644+1K
43,613-3.5K
47,115+1.1K
45,979-558
46,537-5.9K
52,481-1.9K
54,342-836
55,178-1K
56,191+5.3K
50,873—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/ai-sdk-provider-codex-cli. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.