open-index/open-npm huggingface dataset:
npm package: @linchkit/cap-adapter-mcp
Description: MCP (Model Context Protocol) adapter for LinchKit — exposes the Command Layer as MCP tools and resources, enabling AI agents to interact with LinchKit applications.
Latest version: 1.0.0

# @linchkit/cap-adapter-mcp

MCP (Model Context Protocol) adapter for LinchKit — exposes the Command Layer as MCP tools and resources, enabling AI agents to interact with LinchKit applications.

## Installation

```bash
bun add @linchkit/cap-adapter-mcp
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0

## Usage

### Create MCP Adapter

```ts
import { createCapAdapterMcp } from "@linchkit/cap-adapter-mcp";

const mcp = createCapAdapterMcp({
  runtimeContext: ctx,
});
```

### SSE Transport

```ts
import { createMcpSseServer } from "@linchkit/cap-adapter-mcp";

const sseServer = createMcpSseServer({
  runtimeContext: ctx,
  port: 3002,
});
```

### Tool Generation

```ts
import { generateActionTools, generateBuiltinTools } from "@linchkit/cap-adapter-mcp";

const tools = generateActionTools(actions, entities);
```

### MCP Client Registry

```ts
import { McpClientRegistry } from "@linchkit/cap-adapter-mcp";

const registry = new McpClientRegistry({ store: myStore });
```

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-adapter-server
Description: HTTP server adapter for LinchKit — built on Elysia and graphql-yoga. Provides REST endpoints, GraphQL schema generation, CRUD action generation, SSE subscriptions, and the runtime context.
Latest version: 1.0.0

# @linchkit/cap-adapter-server

HTTP server adapter for LinchKit — built on Elysia and graphql-yoga. Provides REST endpoints, GraphQL schema generation, CRUD action generation, SSE subscriptions, and the runtime context.

## Installation

```bash
bun add @linchkit/cap-adapter-server
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0

## Usage

```ts
import { createServer, createRuntimeContext } from "@linchkit/cap-adapter-server";

// Create runtime context with your capabilities
const ctx = createRuntimeContext({
  capabilities: [myCapability],
});

// Start the server
const server = createServer({
  runtimeContext: ctx,
  port: 3001,
});
```

### GraphQL Schema Generation

```ts
import { buildGraphQLSchema, generateCrudActions } from "@linchkit/cap-adapter-server";

const schema = buildGraphQLSchema({
  entities: ctx.entities,
  actions: ctx.actions,
});
```

### Use as a Capability

```ts
import { capAdapterServer } from "@linchkit/cap-adapter-server/capability";
```

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-adapter-ui
Description: Frontend UI adapter for LinchKit — React 19 + Shadcn + TanStack Router/Query/Table. Provides entity-driven UI components (AutoForm, AutoList), shell layout, i18n, and theme support.
Latest version: 1.0.0

# @linchkit/cap-adapter-ui

Frontend UI adapter for LinchKit — React 19 + Shadcn + TanStack Router/Query/Table. Provides entity-driven UI components (AutoForm, AutoList), shell layout, i18n, and theme support.

## Installation

```bash
bun add @linchkit/cap-adapter-ui
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0

## Usage

### Capability Registration

```ts
import { capAdapterUi } from "@linchkit/cap-adapter-ui";
```

### Components

```tsx
import { AutoForm } from "@linchkit/cap-adapter-ui";
import { AutoList } from "@linchkit/cap-adapter-ui";
import { ShellLayout } from "@linchkit/cap-adapter-ui";

// Entity-driven form
<AutoForm entity="order" mode="create" />

// Entity-driven list with search, filters, and toolbar
<AutoList entity="order" />
```

### Hooks and Utilities

```ts
import { useBreadcrumb } from "@linchkit/cap-adapter-ui";
import { useEntityLabel } from "@linchkit/cap-adapter-ui";
import { changeLanguage, supportedLanguages } from "@linchkit/cap-adapter-ui";
```

### Sub-entry Points

| Path | Description |
|------|-------------|
| `@linchkit/cap-adapter-ui` | Main entry — components, hooks, i18n |
| `@linchkit/cap-adapter-ui/panel-registry` | Record detail panel registration |
| `@linchkit/cap-adapter-ui/route-registry` | Admin route registration |
| `@linchkit/cap-adapter-ui/hooks/use-subscription` | SSE subscription hook |
| `@linchkit/cap-adapter-ui/lib/api` | API client utilities |

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-ai-provider
Description: AI provider capability for LinchKit — Vercel AI SDK-based implementations with Anthropic (Claude) and OpenAI support. Provides cost estimation, response caching, fallback chains, and model routing.
Latest version: 1.0.0

# @linchkit/cap-ai-provider

AI provider capability for LinchKit — Vercel AI SDK-based implementations with Anthropic (Claude) and OpenAI support. Provides cost estimation, response caching, fallback chains, and model routing.

## Installation

```bash
bun add @linchkit/cap-ai-provider
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0

## Usage

### Create AI Service

```ts
import { createAIService } from "@linchkit/cap-ai-provider";

const ai = createAIService({
  providers: {
    anthropic: { apiKey: process.env.ANTHROPIC_API_KEY! },
    openai: { apiKey: process.env.OPENAI_API_KEY! },
  },
  defaultModel: "anthropic:claude-sonnet-4-20250514",
});
```

### Cost Estimation

```ts
import { CostEstimator } from "@linchkit/cap-ai-provider";

const estimator = new CostEstimator();
const cost = estimator.estimate({ model: "claude-sonnet-4-20250514", inputTokens: 1000, outputTokens: 500 });
```

### Response Caching

```ts
import { AIResponseCache } from "@linchkit/cap-ai-provider";

const cache = new AIResponseCache();
```

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-auth
Description: Authentication capability for LinchKit — provides the auth contract layer including schemas, actions (login, register, logout, refresh, API keys), middleware, and the `AuthProvider` interface. Concrete implementations are supplied by provider packages lik
Latest version: 1.0.0

# @linchkit/cap-auth

Authentication capability for LinchKit — provides the auth contract layer including schemas, actions (login, register, logout, refresh, API keys), middleware, and the `AuthProvider` interface. Concrete implementations are supplied by provider packages like `@linchkit/cap-auth-better-auth`.

## Installation

```bash
bun add @linchkit/cap-auth
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0

## Usage

```ts
import { createCapAuth } from "@linchkit/cap-auth";
import { createBetterAuthProvider } from "@linchkit/cap-auth-better-auth";

const capAuth = createCapAuth({
  provider: createBetterAuthProvider({ database: db }),
});
```

### Auth Middleware

```ts
import { createAuthMiddleware } from "@linchkit/cap-auth";

const middleware = createAuthMiddleware({
  // options
});
```

### Schemas

```ts
import { userSchema, sessionSchema, tokenSchema, apiKeySchema } from "@linchkit/cap-auth";
```

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-auth-better-auth
Description: Better Auth provider for LinchKit authentication — concrete `AuthProvider` implementation using [better-auth](https://www.better-auth.com/) as the authentication engine. Recommended for production use.
Latest version: 1.0.0

# @linchkit/cap-auth-better-auth

Better Auth provider for LinchKit authentication — concrete `AuthProvider` implementation using [better-auth](https://www.better-auth.com/) as the authentication engine. Recommended for production use.

## Installation

```bash
bun add @linchkit/cap-auth-better-auth
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0
- `@linchkit/cap-auth` ^0.1.0
- `drizzle-orm` >=0.41.0

## Usage

```ts
import { createCapAuth } from "@linchkit/cap-auth";
import { createBetterAuthProvider } from "@linchkit/cap-auth-better-auth";
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";

const db = drizzle(postgres(process.env.DATABASE_URL!));

const capAuth = createCapAuth({
  provider: createBetterAuthProvider({ database: db }),
});
```

### Seed System Admin

```ts
import { seedSystemAdmin } from "@linchkit/cap-auth-better-auth";

await seedSystemAdmin({
  email: "admin@example.com",
  password: "secure-password",
});
```

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-chatter
Description: Record timeline capability for LinchKit — provides messages, audit logging, and GraphQL integration for entity-level discussions and activity tracking.
Latest version: 1.0.0

# @linchkit/cap-chatter

Record timeline capability for LinchKit — provides messages, audit logging, and GraphQL integration for entity-level discussions and activity tracking.

## Installation

```bash
bun add @linchkit/cap-chatter
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0
- `drizzle-orm` ^0.45.1
- `graphql` ^16.13.1

## Usage

### Register the Capability

```ts
import { createCapChatter } from "@linchkit/cap-chatter";

const chatter = createCapChatter({
  // options
});
```

### Auto-log Events

```ts
import { createChatterAutoLog } from "@linchkit/cap-chatter";

const autoLog = createChatterAutoLog();
```

### Service Layer

```ts
import { DrizzleChatterService, InMemoryChatterService } from "@linchkit/cap-chatter";

// With PostgreSQL
const service = new DrizzleChatterService(db);

// Without database
const service = new InMemoryChatterService();
```

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-chatter-ui
Description: React UI panel for the LinchKit Chatter capability — provides a record-detail tab for displaying messages and activity timelines. Auto-installs when `@linchkit/cap-adapter-ui` and `@linchkit/cap-chatter` are present.
Latest version: 1.0.0

# @linchkit/cap-chatter-ui

React UI panel for the LinchKit Chatter capability — provides a record-detail tab for displaying messages and activity timelines. Auto-installs when `@linchkit/cap-adapter-ui` and `@linchkit/cap-chatter` are present.

## Installation

```bash
bun add @linchkit/cap-chatter-ui
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0
- `@linchkit/cap-adapter-ui` ^0.1.0
- `@linchkit/ui-kit` ^0.1.0
- `react` ^19.0.0

## Usage

```ts
import { capChatterUi } from "@linchkit/cap-chatter-ui";

// Register in your capability list — the panel auto-registers
// via the record panel registry on import.
```

The chatter panel automatically registers itself as a "Chatter" tab in entity record detail views.

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-flow-restate
Description: Restate durable flow engine for LinchKit — provides durable workflow execution backed by [Restate](https://restate.dev/). Includes flow compilation, endpoint management, and health checks.
Latest version: 1.0.0

# @linchkit/cap-flow-restate

Restate durable flow engine for LinchKit — provides durable workflow execution backed by [Restate](https://restate.dev/). Includes flow compilation, endpoint management, and health checks.

## Installation

```bash
bun add @linchkit/cap-flow-restate
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0

## Usage

### Create Flow Engine

```ts
import { createRestateFlowEngine } from "@linchkit/cap-flow-restate";

const flowEngine = createRestateFlowEngine({
  restateUrl: "http://localhost:8080",
  endpointPort: 9080,
});
```

### Setup Restate Endpoint

```ts
import { setupRestateEndpoint, registerDeployment } from "@linchkit/cap-flow-restate";

const endpoint = setupRestateEndpoint({ port: 9080 });
await registerDeployment({ restateUrl: "http://localhost:8080", endpointUrl: "http://localhost:9080" });
```

### Compile a Flow

```ts
import { compileFlow } from "@linchkit/cap-flow-restate";

const compiled = compileFlow(myFlowDefinition);
```

### Health Check

```ts
import { checkRestateHealth } from "@linchkit/cap-flow-restate";

const healthy = await checkRestateHealth("http://localhost:8080");
```

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-migration
Description: Data migration capability for LinchKit — version compatibility checking, schema migration transforms, Drizzle DB migration runner, legacy data import (CSV/JSON), and entity field mapping.
Latest version: 1.0.0

# @linchkit/cap-migration

Data migration capability for LinchKit — version compatibility checking, schema migration transforms, Drizzle DB migration runner, legacy data import (CSV/JSON), and entity field mapping.

## Installation

```bash
bun add @linchkit/cap-migration
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0
- `drizzle-orm` *

## Usage

### Version Compatibility

```ts
import { analyzeCompatibility, classifyRelease } from "@linchkit/cap-migration";

const result = analyzeCompatibility(oldEntities, newEntities);
const releaseType = classifyRelease(result); // "major" | "minor" | "patch"
```

### Run Database Migrations

```ts
import { runMigrations } from "@linchkit/cap-migration";

await runMigrations({
  migrationsFolder: "./drizzle/migrations",
  database: db,
});
```

### Import Legacy Data

```ts
import { DataImporter, CSVImportSource } from "@linchkit/cap-migration";

const source = new CSVImportSource({ filePath: "./data.csv" });
const importer = new DataImporter({ source, entity: "order", dataProvider });
const result = await importer.run();
```

### Entity Field Mapping

```ts
import { SchemaMapper } from "@linchkit/cap-migration";

const mapper = new SchemaMapper(fieldMappings);
const mapped = mapper.map(record);
```

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cap-permission
Description: Permission management capability for LinchKit — RBAC-based permission groups, user-to-group assignments, and Command Layer permission slot middleware.
Latest version: 1.0.0

# @linchkit/cap-permission

Permission management capability for LinchKit — RBAC-based permission groups, user-to-group assignments, and Command Layer permission slot middleware.

## Installation

```bash
bun add @linchkit/cap-permission
```

## Peer Dependencies

- `@linchkit/core` ^0.1.0

## Usage

### Register the Capability

```ts
import { createCapPermission } from "@linchkit/cap-permission";

const permission = createCapPermission({
  // options
});
```

### Permission Middleware

```ts
import { createPermissionMiddleware } from "@linchkit/cap-permission";

const middleware = createPermissionMiddleware({
  // options
});
```

### Schemas

```ts
import { permissionGroupSchema, permissionAssignmentSchema } from "@linchkit/cap-permission";
```

### Actions

Built-in actions: `createGroupAction`, `assignUserAction`, `revokeUserAction`, `updatePermissionsAction`.

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/cli
Description: CLI tool for LinchKit — project scaffolding, database management, capability management, and development utilities.
Latest version: 0.2.0

# @linchkit/cli

CLI tool for LinchKit — project scaffolding, database management, capability management, and development utilities.

## Installation

```bash
bun add -g @linchkit/cli
```

## Usage

```bash
# Initialize a new project
linch init

# Start development server
linch dev

# Database management
linch db generate    # Generate migration SQL from schema changes
linch db migrate     # Apply pending migrations
linch db studio      # Open Drizzle Studio GUI

# Capability management
linch create         # Scaffold a new capability
linch install        # Install a capability
linch search         # Search capabilities
linch validate       # Run comprehensive validation

# Documentation and quality
linch docs           # Generate documentation
linch check          # Run code quality checks
linch doctor         # Run project health checks
linch agents-md      # Generate AGENTS.md from project ontology

# MCP development
linch mcp-dev        # Start MCP server for AI coding tools

# Overlay management
linch overlay        # Manage runtime overlay fields

# Registry
linch registry       # Capability registry management
```

Capabilities can register additional CLI commands via the `extensions.commands` extension point, which are automatically discovered from `linchkit.config.ts`.

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/core
Description: Core runtime for LinchKit — an AI-Native Software Capability Runtime. Provides types, engines, pipeline, define functions, and the meta-model primitives (Entity, Action, Rule, State, Event, EventHandler, View, Flow, Relation).
Latest version: 0.2.0

# @linchkit/core

Core runtime for LinchKit — an AI-Native Software Capability Runtime. Provides types, engines, pipeline, define functions, and the meta-model primitives (Entity, Action, Rule, State, Event, EventHandler, View, Flow, Relation).

## Installation

```bash
bun add @linchkit/core
```

## Usage

### Define an Entity

```ts
import { defineEntity } from "@linchkit/core";

const order = defineEntity({
  name: "order",
  fields: [
    { name: "title", type: "string", required: true },
    { name: "amount", type: "number" },
    { name: "status", type: "string" },
  ],
});
```

### Define an Action

```ts
import { defineAction } from "@linchkit/core";

const submitOrder = defineAction({
  name: "submit_order",
  entity: "order",
  input: [{ name: "title", type: "string", required: true }],
  handler: async ({ input, data }) => {
    return data.create("order", input);
  },
});
```

### Define a Capability

```ts
import { defineCapability } from "@linchkit/core";

const myCapability = defineCapability({
  name: "my-capability",
  entities: [order],
  actions: [submitOrder],
});
```

## Entry Points

| Path | Description |
|------|-------------|
| `@linchkit/core` | Browser-safe: types, define functions, errors, config |
| `@linchkit/core/server` | Server-only: engines, database, event bus, flow |
| `@linchkit/core/types` | Type-only exports |
| `@linchkit/core/define` | Define functions + errors + Zod generator |
| `@linchkit/core/config` | Configuration registry |
| `@linchkit/core/ai` | AI boundary and security layer |

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/devtools
Description: Testing utilities and development tools for LinchKit — rule testing, state machine testing, capability validation, documentation generation, and code quality checks.
Latest version: 0.2.0

# @linchkit/devtools

Testing utilities and development tools for LinchKit — rule testing, state machine testing, capability validation, documentation generation, and code quality checks.

## Installation

```bash
bun add -D @linchkit/devtools
```

## Usage

### Test a Rule

```ts
import { testRule } from "@linchkit/devtools";

const result = testRule({
  rule: myRule,
  input: { entity: "order", data: { amount: 100 } },
});
```

### Test a State Machine

```ts
import { testStateMachine, getAvailableTransitions } from "@linchkit/devtools";

const result = testStateMachine({
  state: orderState,
  currentState: "draft",
  event: "submit",
});

const transitions = getAvailableTransitions({
  state: orderState,
  currentState: "draft",
});
```

### Validate a Capability

```ts
import { validateCapability } from "@linchkit/devtools";

const result = validateCapability(myCapability);
```

### Create a Test Runtime

```ts
import { createTestRuntime } from "@linchkit/devtools";

const runtime = createTestRuntime({
  capabilities: [myCapability],
});
```

## Sub-entry Points

| Path | Description |
|------|-------------|
| `@linchkit/devtools` | Test utilities, validation |
| `@linchkit/devtools/documentation` | API doc generation, OpenAPI, Markdown |
| `@linchkit/devtools/methodology` | Code quality, naming convention checks |
| `@linchkit/devtools/governance` | Doc completeness, spec tracking, changelog |

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linchkit/ui-kit
Description: Shadcn-based UI component library for LinchKit — pre-configured with Radix, Lucide icons, and Tailwind CSS. Provides foundational UI primitives used by `@linchkit/cap-adapter-ui`.
Latest version: 0.2.0

# @linchkit/ui-kit

Shadcn-based UI component library for LinchKit — pre-configured with Radix, Lucide icons, and Tailwind CSS. Provides foundational UI primitives used by `@linchkit/cap-adapter-ui`.

## Installation

```bash
bun add @linchkit/ui-kit
```

## Peer Dependencies

- `react` ^19.0.0
- `react-dom` ^19.0.0

## Usage

```tsx
import { Button, Card, CardHeader, CardTitle, CardContent } from "@linchkit/ui-kit/components";
import { cn } from "@linchkit/ui-kit/lib/utils";
import { useTheme } from "@linchkit/ui-kit/hooks";
import "@linchkit/ui-kit/styles.css";
```

### Available Components

Alert, AlertDialog, Avatar, Badge, Breadcrumb, Button, Calendar, Card, Checkbox, Collapsible, Command, Dialog, DropdownMenu, Input, InputGroup, Label, Popover, Select, Separator, Sheet, Sidebar, Skeleton, Slider, Sonner (Toast), Switch, Table, Tabs, Textarea, Tooltip.

### Hooks

- `useIsMobile` — responsive breakpoint detection
- `useTheme` — theme state management

## Links

- [Repository](https://github.com/laofahai/linchkit)
npm package: @linclark/github-pages-deploy
Description: [Building a simple command line tool with npm](http://blog.npmjs.org/post/118810260230/building-a-simple-command-line-tool-with-npm)
Latest version: 2.0.0

## Read the article

[Building a simple command line tool with npm](http://blog.npmjs.org/post/118810260230/building-a-simple-command-line-tool-with-npm)

## Run the example

1. In your project, run `npm install --save @linclark/github-pages-deploy`
1. In your project's `package.json` file, add a scripts key

```
"scripts": {
  "deploy": "github-pages-deploy"
},
```