Skip to content
PluginStats

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

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

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

View on npm Fresh · Oct 18, 2026

ai-sdk-provider-codex-cli has 17,829 recorded weekly downloads on npm, a decrease of 39.6% over the past 30 days, ranking #815 of 2,322 tracked listings.

Weekly downloads
17,829
Official API · Oct 18, 2026
7-day growth
-29.4%
-7.4K weekly downloads
30-day growth
-39.6%
-11.7K weekly downloads
90-day growth
-90.6%
-172.2K weekly downloads
Rank
#815
Among tracked npm listings

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: 17,829 weekly downloads as of Oct 18, 2026, -90.6% over 90 days.ai-sdk-provider-codex-cliWeekly downloads on npm · Last 90 days17,829downloads / week-90.6% over 90 days020K40K60K80K100K120K140KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
ai-sdk-provider-codex-cli weekly downloads on npm, last 90 days: 17,829 weekly downloads as of Oct 18, 2026, -90.6% over 90 days.

7/30/90-day growth

ai-sdk-provider-codex-cli weekly downloads growth on npm: -29.4% over 7 days, -39.6% over 30 days, -90.6% over 90 days.ai-sdk-provider-codex-cliWeekly downloads growth on npm17,829downloads / week now7-day growth-7,440 weekly downloads-29.4%30-day growth-11,677 weekly downloads-39.6%90-day growth-172,181 weekly downloads-90.6%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
ai-sdk-provider-codex-cli weekly downloads growth on npm: -29.4% over 7 days, -39.6% over 30 days, -90.6% over 90 days.

Ranking history

ai-sdk-provider-codex-cli npm ranking history: currently #815 (by weekly downloads).ai-sdk-provider-codex-clinpm ranking · by weekly downloads · Last 90 days#815current rank#810#815#820#825#830#835#840#845#850Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
ai-sdk-provider-codex-cli npm ranking history: currently #815 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,162 shown · page 41, #16 (overall #816)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs259 listings · 13 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 (122)
Recent weekly downloads observations for ai-sdk-provider-codex-cli
Date (UTC)Weekly downloadsChange vs. previous
17,829+4.8K
13,047-3.2K
16,225+915
15,310-5K
20,298-4.8K
25,1290
25,129-140
25,269-2K
27,256-1.3K
28,566-2.4K
30,989-1.7K
32,648-1.8K
34,472-6.8K
41,229—

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 Oct 20, 2026. See the methodology.