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

@kuralle-agents/cli

v0.23.0

Published

Kuralle CLI — interactive TUI chat, adaptive send, and conversation simulation

Downloads

1,821

Readme

@kuralle-agents/cli

Kuralle's interactive chat, send, simulation, and trace inspection CLI.

Build immutable file agents

kuralle build --agent ./agent --target node \
  --default-model openai/gpt-5-mini --host ./deployment.node.ts
kuralle start --app .kuralle/node/server.mjs

kuralle build --agent ./agent --target cloudflare \
  --default-model openai/gpt-5-mini --host ./deployment.cloudflare.ts \
  --d1-id <database-id> --d1-name my-agent-control --r2-bucket my-agent-blobs
wrangler deploy --config .kuralle/cloudflare/wrangler.jsonc

The Node result is one server.mjs plus a non-root production Dockerfile. The Cloudflare result is one Worker module plus DO migration, D1, optional R2, compatibility flags, and observability config. Both contain the same canonical artifact, capability hashes, and content-addressed bytes. Host factories provide credentials, model instances, authentication, durable stores, and trusted runtime capabilities; those values are intentionally never serialized into the artifact.

See File-authored agent deployment.

Hosted runtimes (default after connect)

Connect once to a deployed Next.js/Hono/Worker HTTP endpoint. Subsequent chat and send commands execute in that hosted runtime, so the server—not the CLI process—owns conversation state, tools, credentials, and workspaces.

kuralle connect https://my-agent.vercel.app
kuralle send --session customer-42 "What is in my cart?"
kuralle chat --session customer-42

A Node server generated by kuralle build uses the version-pinned deployment route. Supply its agent entity id so the CLI sends turns to that route:

kuralle connect https://my-agent.example.com --agent-name support
kuralle chat --session customer-42

Cloudflare Agents can also use their native WebSocket protocol, including the standard /agents/{agent-name}/{instance-name} identity boundary:

kuralle connect https://my-agent.workers.dev \
  --transport cloudflare --agent-name pharmacy-agent
kuralle chat --session customer-42 --auto "hello|check amoxicillin 500 mg|what did I ask for?"

kuralle connection shows the saved non-secret connection and kuralle disconnect removes it. Use --local to opt into the in-process agent while a hosted server is connected. --server/KURALLE_SERVER provide a one-command override. Auth tokens are never saved in the connection file; provide KURALLE_TOKEN (preferred) or --token.

The HTTP transport first uses POST /api/chat with { sessionId, message } and falls back to Kuralle's Hono SSE endpoint at /api/chat/sse. The Cloudflare transport speaks the native Agents chat protocol, accepts its direct AI SDK JSON parts, and prefers a final persisted-message broadcast when the server sends one.

Local runtimes

kuralle chat --local --agent ./agent.ts --trace --store runs/demo.json
kuralle chat --agent ./agent.ts --auto "hello|yes, continue" --trace --store runs/demo.json
kuralle trace session-42
kuralle trace session-42 --last
kuralle trace session-42 --json
kuralle trace session-42 --web --port 4319

Chat prints TTFT and total duration after every turn. Its live trace panel and the terminal trace view show TTFT plus a span waterfall with durations and tool, handoff, and error markers. TTFT is measured from runtime trace creation to the first non-empty client text-delta; tool-only work before speech is included. --json returns the native AgentTrace JSON for agents and CI. --web starts a loopback-only read-only viewer backed by the runtime's configured native TraceStore; its JSON routes are /api/traces/:session and /api/trace/:id.

Custom agent modules may export an AgentConfig, a Runtime, or buildRuntime(sessionId?, sessionStore?, traceStore?). Pass --store to persist both session state and the native trace sidecar across separate CLI invocations.

To use Pi (the recommended application driver), export a Runtime or buildRuntime factory configured with HarnessConfig.driver: new PiDriver(...). The CLI preserves that runtime-level driver for chat, send, simulation, resumes, and tracing. A bare AgentConfig export deliberately uses Core's AI SDK fallback because it does not carry the Pi provider registry or credential resolver.