npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@interactkit/cli

v0.3.0

Published

CLI for InteractKit — codegen, scaffolding, build, and dev server

Readme

@interactkit/cli

CLI for InteractKit projects. Compiles XML entity graphs into fully typed TypeScript, then builds and runs your app.

Install

npm install -D @interactkit/cli

Or globally:

npm install -g @interactkit/cli

Commands

init

Scaffold a new project:

interactkit init my-app
interactkit init my-app --llm    # include an LLM entity

Creates:

my-app/
  interactkit/
    entities.xml           # entity graph
    tools/hello.ts         # sample tool handler
  src/
    app.ts                 # boot + serve
  package.json
  tsconfig.json

compile

Compile entities.xml into typed TypeScript:

interactkit compile
interactkit compile -o ./interactkit/.generated    # custom output dir

Reads all .xml files from interactkit/ and generates:

| File | Contents | |------|----------| | types.ts | Entity state interfaces, input/output types, proxy types | | tree.ts | Entity tree structure (the runtime's source of truth) | | registry.ts | Zod validators, entity metadata | | graph.ts | Typed InteractKitRuntime subclass with proxy getters | | handlers.ts | Auto-imports all src tool handler files |

build

Compile + type-check:

interactkit build

Runs compile then npx tsc --noEmit to verify everything type-checks.

dev

Compile + run + watch:

interactkit dev
interactkit dev -e ./src/app.ts    # custom entry file

Watches interactkit/ and src/ for changes. On any change, recompiles and restarts the app.

start

Run the app:

interactkit start
interactkit start -e ./src/app.ts    # custom entry file

Runs npx tsx src/app.ts.

Command Reference

| Command | Options | Description | |---------|---------|-------------| | init <name> | --llm | Scaffold a new project | | compile | -o, --outDir | Compile XML to typed TypeScript | | build | -o, --outDir | Compile + type-check | | dev | -o, --outDir, -e, --entry | Compile + run + watch | | start | -e, --entry | Run the app |

How Compilation Works

  1. Parse XML -- reads interactkit/entities.xml into an intermediate representation
  2. Validate -- checks component references, ref targets, LLM config
  3. Expand autotools -- generates CRUD method metadata from <autotool> elements
  4. Infer refs -- LLM entities auto-get refs to all peer components
  5. Fetch remote schemas -- if any entity has remote="http://...", fetches /schema at compile time
  6. Generate TypeScript -- emits fully typed interfaces, tree, registry, graph class, and handler imports

Generated Types

For each entity, the compiler generates:

// State interface
interface AgentState { count: number; }

// Input types (per tool)
interface AgentAskInput { question: string; }

// Entity type (what tool handlers receive)
interface AgentEntity extends Entity {
  state: AgentState;
  components: { brain: BrainProxy; memory: MemoryProxy; };
}

// Proxy type (what app code uses)
interface AgentProxy {
  ask(input: AgentAskInput): Promise<string>;
  brain: BrainProxy;
  memory: MemoryProxy;
}

Tool handlers get full type safety:

// interactkit/tools/ask.ts
import type { AgentEntity, AgentAskInput } from '../.generated/types.js';

export default async (entity: AgentEntity, input: AgentAskInput): Promise<string> => {
  entity.state.count++;
  return entity.components.brain.think({ query: input.question });
};

Project Structure

The CLI expects this layout:

your-project/
  interactkit/
    entities.xml               # entity graph (required)
    tools/                     # tool handler files (referenced by src="tools/foo.ts")
    .generated/                # output (gitignored)
  src/
    app.ts                     # your app entry point