Skip to content
PluginStats

logic-sdk weekly downloads statistics

By fprl · npm · AI SDKs

Queries, mutations, actions and events for TypeScript apps. Transactions, after-commit events and scopes, on any runtime.

View on npm Fresh · Dec 6, 2026

logic-sdk has 2,061 recorded weekly downloads on npm, a change of +10.7% over the past 7 days, ranking #1869 of 3,247 tracked listings.

Weekly downloads
2,061
Official API · Dec 5, 2026
7-day growth
+10.7%
+200 weekly downloads
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#1869
Among tracked npm listings

About logic-sdk

Logic SDK

Write your logic once. Run it anywhere. One function for your API, your AI agent and your jobs, on Node, Cloudflare Workers or Vercel. Transactions, events after commit, retries and policies are built in. Your database stays yours.

npm License: MIT

Install

npm install logic-sdk zod

Requires Node.js 24+ (also runs on Bun and Cloudflare Workers). Mutations need Postgres or SQLite, through Drizzle or any ORM that runs SQL in a transaction. Zod is optional: any Standard Schema library works, such as Valibot or ArkType.

Quick start

A mutation that emits an event, and a listener that reacts to it:

import { init } from "logic-sdk";
import { z } from "zod";

type Scope = { user: { id: string } | null };
export const { mutation, event, listener, createRegistry } = init<{ scope: Scope }>();

export const orderPlaced = event({ payload: z.object({ orderId: z.string() }) });

export const placeOrder = mutation({
  input: z.object({ items: z.array(Item).min(1) }),
  authorize: (scope) => scope.user !== null,

  async handler(ctx, { items }) {
    const [order] = await ctx.db.insert(orders).values({ items }).returning();
    ctx.emit(orderPlaced, { orderId: order.id }); // delivered after the commit
    return order;
  },
});

export const sendReceipt = listener({
  event: () => orderPlaced,
  attempts: 3, // tried again if the mailer fails
  async handler(ctx, { orderId }) {
    await ctx.services.mailer.send({ orderId });
  },
});

Register the module, then run the function from a route, an AI agent, a job, a script or a test:

import { drizzleAdapter } from "logic-sdk/drizzle/pg";

const registry = createRegistry({
  modules: { orders },
  database: { adapter: drizzleAdapter(db) },
  services: { mailer },
});

const caller = registry.as({ user: { id: "ana" } });
await caller.run(orders.placeOrder, { items });

Change the entry file to change platforms. Your modules stay the same: see one app on Node, Workers and Next.js.

What you get

  • One transaction across modules. A failure anywhere rolls back everything.
  • Events after commit. Listeners run as jobs, with retries, only after the data is saved.
  • Policies on every call. authorize runs for a route, an AI agent, a job and a nested call alike.
  • Typed errors. Declare each error once. Callers switch on its code.
  • Any schema library. Zod, Valibot, ArkType or any other Standard Schema library types the inputs, outputs and events.
  • Tests without mocks. Each test runs on a real database, in a transaction that rolls back.
  • Zero runtime dependencies. The one dependency, @standard-schema/spec, ships types only. The AI, oRPC and Drizzle integrations use the copies you already have, as optional peers.
  • No magic. No decorators, classes, codegen or build step.

Adapters

ImportFor
logic-sdk/drizzle/pg, logic-sdk/drizzle/sqliteThe database, and jobs in a table
logic-sdk/postgres, logic-sdk/sqliteJobs in a table, with any ORM
logic-sdk/cloudflareCloudflare Queues and Cron Triggers
logic-sdk/nodework(registry): jobs and crons in a long-running process
logic-sdk/aiYour functions as AI SDK tools
logic-sdk/orpcYour functions as oRPC procedures
logic-sdk/fetchAn error as an HTTP response
logic-sdk/testingTests that roll back, with a fixed clock

CLI

npx logic-sdk list               # every function, its kind and policy
npx logic-sdk show orders.place  # what one function takes, runs, emits and fails with
npx logic-sdk graph              # which module runs what, and who listens to each event

Skill for coding agents

The package ships a skill for coding agents: node_modules/logic-sdk/skills/logic-sdk/SKILL.md. It tells the agent where each piece goes.

Docs

logic-sdk.dev has the quickstart, the concepts, the guides and the reference. Two example apps are in examples.

License

MIT

Description from the npm listing.

  • actions
  • agents
  • ai-agents
  • ai-sdk
  • business-logic
  • cloudflare-workers
  • drizzle
  • events
  • mutations
  • queries
  • tools
  • transactions
  • typescript

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

logic-sdk weekly downloads on npm, last 90 days: 2,061 weekly downloads as of Dec 5, 2026.logic-sdkWeekly downloads on npm · Last 90 days2,061downloads / week05001K1.5K2K2.5K3KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
logic-sdk weekly downloads on npm, last 90 days: 2,061 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

logic-sdk weekly downloads growth on npm: +10.7% over 7 days, 30-day growth unavailable, 90-day growth unavailable.logic-sdkWeekly downloads growth on npm2,061downloads / week now7-day growth+200 weekly downloads+10.7%30-day growth+2,061 weekly downloadsInsufficient history90-day growth+2,061 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
logic-sdk weekly downloads growth on npm: +10.7% over 7 days, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

logic-sdk npm ranking history: currently #1869 (by weekly downloads).logic-sdknpm ranking · by weekly downloads · Last 90 days#1869current rank#1400#1500#1600#1700#1800#1900Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankDec 2, 2026 – Dec 6, 2026 · 5 observations · Updated Dec 5, 2026pluginstats.com
logic-sdk npm ranking history: currently #1869 (by weekly downloads).

Listing placement

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

Listing placement

AI SDKs378 listings · 19 pages · page 9, #15 (overall #175)
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 (121)
Recent weekly downloads observations for logic-sdk
Date (UTC)Weekly downloadsChange vs. previous
2,061+71
1,990-303
2,293-135
2,428-143
2,571-356
2,927+715
2,212+351
1,861+28
1,833+148
1,685-344
2,029+349
1,680+647
1,033+182
851—

Similar npm AI SDKs plugins

All 20 logic-sdk alternatives

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/logic-sdk. First seen Dec 2, 2026; last successful collection Dec 6, 2026. See the methodology.