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

@orcalang/orca-lang

v0.1.30

Published

Orca (Orchestrated State Machine Language) - an LLM-native code generation target

Readme

Orca

Orca (Orchestrated State Machine Language) — an LLM-native code generation target that separates program topology (the state machine structure) from computation (individual action functions).

The core insight: LLMs generate flat transition tables reliably, and Orca's topology verifier ensures structural correctness that LLMs struggle to guarantee on their own.

Quick Start

# Parse and verify a machine
npx tsx src/index.ts verify examples/simple-toggle.orca.md

# Compile to XState v5
npx tsx src/index.ts compile xstate examples/payment-processor.orca.md

# Compile to Mermaid diagram
npx tsx src/index.ts compile mermaid examples/text-adventure.orca.md

# Visualize (output Mermaid for rendering)
npx tsx src/index.ts visualize examples/simple-toggle.orca.md

Installation

npm install
npm run build

CLI Skills

Orca's CLI exposes structured skills designed for LLM consumption:

orca /verify-orca examples/payment-processor.orca.md
orca /compile-orca xstate examples/payment-processor.orca.md
orca /generate-actions examples/payment-processor.orca.md typescript

Architecture

Source (.orca.md) → Markdown Parser → AST → Verifier → Compiler → Output (XState/Mermaid)
  • src/parser/ — Two-phase markdown parser (structural → semantic)
  • src/verifier/ — Topology checks (reachability, deadlock, completeness, determinism)
  • src/compiler/ — XState v5 and Mermaid compilation targets
  • src/llm/ — LLM provider abstraction (Anthropic, OpenAI, Grok, Ollama)
  • src/generators/ — Code generator registry for action implementations

LLM Integration

Orca uses its own LLM configuration, separate from the ambient context.

Setup

  1. Copy the example env file:

    cp .env.example .env
  2. Add your API key to .env:

    ANTHROPIC_API_KEY=sk-ant-...
  3. Configure in orca.yaml:

    provider: anthropic
    model: claude-sonnet-4-6
    code_generator: typescript

Supported Providers

| Provider | Environment Variable | Notes | |----------|-------------------|-------| | Anthropic | ANTHROPIC_API_KEY | Default | | OpenAI | OPENAI_API_KEY | | | xAI (Grok) | XAI_API_KEY | | | Ollama | — | Set base_url: http://localhost:11434 |

Authentication

Orca supports two authentication methods:

1. API Key (simple)

cp .env.example .env
# Edit .env and add your API key

2. OAuth (for organization/team billing)

# Login with OAuth (supports Anthropic, MiniMax)
orca login --provider anthropic

# Check auth status
orca auth

# Logout
orca logout

Credentials are stored in ~/.orca/auth_profiles.json.

Generate Action Implementations

# Without LLM (template-based, no API key needed)
orca actions examples/payment-processor.orca.md

# With LLM (requires API key)
orca /generate-actions --use-llm examples/payment-processor.orca.md typescript

# Output to directory (one file per action)
orca /generate-actions --use-llm examples/payment-processor.orca.md --output ./actions/

# Output to single file (all actions combined)
orca /generate-actions --use-llm examples/payment-processor.orca.md --output ./actions.ts

See docs/orca-proposal.md for the full design specification.

License

Apache License 2.0 — see LICENSE