@codeworksh/aikit weekly downloads statistics
By codeworksh (3 listings) · npm · AI SDKs
TypeScript SDK that provides a unified API for working with multiple LLM providers, automatic model discovery, and more.
@codeworksh/aikit has 4,142 recorded weekly downloads on npm, a decrease of 33.5% over the past 30 days, ranking #1599 of 3,247 tracked listings.
About @codeworksh/aikit
@codeworksh/aikit
aikit is the model layer of CodeWork: one message and event shape over many LLM providers, a model catalog with pricing, and cost tracking per message. The CodeWork harness makes every model call through it, and you can use it on its own when you want streaming primitives and to run the loop yourself.
pnpm add @codeworksh/aikit
Node 22 or later is required.
Quick Start
import { llm, Message, stream } from "@codeworksh/aikit";
const model = await llm("anthropic", "claude-haiku-4-5");
if (!model) throw new Error("Model not in the catalog");
const context: Message.Context = {
systemPrompt: "You are a helpful coding assistant.",
messages: [
Message.createUserMessage({
role: "user",
time: { created: Date.now() },
parts: [{ type: "text", text: "Write a loop in TypeScript." }],
}),
],
};
// The key is read from ANTHROPIC_API_KEY unless you pass { apiKey }.
const s = stream(model, context);
for await (const event of s) {
if (event.type === "text.delta") process.stdout.write(event.delta);
}
const message = await s.result();
console.log(message.stopReason, message.usage.cost.total);
A failed request does not throw. The stream ends with an error event, and the final message has stopReason: "error" and an errorMessage. stream.complete(model, context) skips the events and resolves the final message.
What It Owns
aikit owns the wire shape (Message, Event), the provider adapters, the catalog format, error normalization and cost. Protocols: anthropic, openai, openai-codex, github-copilot, openrouter, google, google-vertex, google-vertex-anthropic, xai and openai-compatible. The transport underneath is the AI SDK.
It depends on no other CodeWork package and does not use Effect. The harness depends on it, never the reverse, so aikit stays a plain library anyone can embed. Where credentials live, how fresh the catalog is, and retries belong to the embedder.
A session can switch models between turns. aikit replays signatures and reasoning only to the provider that produced them, so one vendor's opaque state never reaches another.
The Model Catalog
llm(provider, model) looks a model up in ./models.gen.json, or the file CODEWORK_MODELS_FILE names. A bundled baseline covers anthropic, openai and openrouter, so a first run works with no file at all. llm.providers() and llm.models(provider) list what the catalog has.
The package ships an aikit binary:
aikit modelgen [path] # build the catalog from models.dev and OpenRouter's listing
aikit auth --openai-codex # OAuth login; --device for a device code, --status, --refresh, --logout
aikit auth --github-copilot # device flow; --enterprise <domain> for GitHub Enterprise
Code Map
src/index.ts: the public exports.src/stream.ts:streamandstream.complete.src/llm.ts: model lookup over the catalog.src/message/message.ts:Context, messages, tools and usage.src/event/event.ts: the stream's events.src/llm/: protocol registry, provider options, cross-model replay (transform.ts) and failures.src/model/: catalog loading and the bundled baseline.src/providers/: theopenai-codexandgithub-copilotproviders.src/oauth/andsrc/cli/: logins and theaikitbinary.
Working Locally
From packages/aikit:
pnpm test # unit tests
pnpm test:e2e # also runs test/e2e, which calls live providers
pnpm typecheck
pnpm build # vp pack
pnpm cli modelgen
For the rules on credentials, catalog publishing and adding a protocol, see docs/internals/03_models.md.
Description from the npm listing.
- agent
- ai
- ai-sdk
- anthropic
- grok
- harness
- llm
- node
- openai
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
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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)Similar npm AI SDKs plugins
All 20 @codeworksh/aikit alternativesData 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/@codeworksh/aikit. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.