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

create-octoflow-app

v1.1.0

Published

Scaffold a working OctoFlow agent project in one command: npx create-octoflow-app

Readme


Quick start

npx create-octoflow-app my-agent
cd my-agent
npm install
npx tsx agent.ts

You need one LLM backend ready: set ANTHROPIC_API_KEY (or OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY), or run a local Ollama.

What you get

A tiny, heavily commented standalone TypeScript project built on octoflow-core:

my-agent/
├── agent.ts          ← the agent — discover backend → send → print (commented)
├── agent.test.ts     ← a vitest unit test (no network)
├── package.json      ← octoflow-core pinned to a real version; lean scripts
├── tsconfig.json
├── vitest.config.ts
├── .gitignore
└── README.md

The stack is the lean "fast combo" for a Node agent app — no bundler:

| Concern | Tool | |---------|------| | Run | tsx (npm run dev) | | Type-check | tsc --noEmit (npm run typecheck) | | Test | vitest (npm test) | | Format | prettier (npm run format) |

Why no Vite/esbuild? Vite is a frontend bundler and a poor fit for a Node/CLI agent; an agent app doesn't need bundling at all. Add a bundler only if you later ship a built artifact.

Usage

npx create-octoflow-app [directory] [--force] [--core-version=<version>] [--sandbox] [--integrate=<target>]
  • directory — where to scaffold (default my-octoflow-agent).
  • --force — scaffold into a non-empty directory (with --integrate, overwrite existing wiring files).
  • --core-version — pin a specific octoflow-core version instead of resolving the latest.
  • --sandbox — generate an agent whose tool/code execution runs in a hardened Docker container (createDockerEnvironment: all capabilities dropped, no network, capped memory). Adds the dockerode dependency; needs a running Docker daemon.
  • --integrate=<target> — add OctoFlow's wiring to an existing React app instead of scaffolding a new one. Targets: next, electron, react-native (see below).

Non-interactive by design, so it works cleanly from scripts and agents.

Adding OctoFlow to an existing app — --integrate

The agent is a server-tier component: it holds your LLM key and must never ship to a browser or mobile bundle. So rather than fork-and-maintain a template per UI framework, create-octoflow-app delegates the app skeleton to that framework's own create-* tool and adds only the OctoFlow wiring — the astro add model.

Every target uses the same two layers: octoflow-react (OctoFlowProvider + useOctoFlowChat) on the client, and OctoFlow's AG-UI gateway (octoflow-core) on the server.

| Target | Skeleton (delegate to) | Where the agent runs | Adds | |--------|------------------------|----------------------|------| | next (fullstack) | create-next-app | Route handler (app/api/octoflow/agui/run) | octoflow-core + octoflow-react | | electron (desktop) | @quick-start/electron | Main process (gateway on loopback, IPC to renderer) | octoflow-core + octoflow-react | | react-native (mobile) | create-expo-app | A remote backend the app calls (e.g. the next target) | octoflow-react only |

npx create-next-app@latest my-app        # delegate the skeleton to the official tool
cd my-app
npx create-octoflow-app . --integrate=next

Each target writes its wiring files (server tier + an octoflow-react client screen), a .env.example, and an OCTOFLOW.md with the exact setup steps, then merges the right deps into your package.json.

Two caveats are documented in the generated OCTOFLOW.md:

  • Electron — the renderer and the loopback gateway are different origins, so you must add a CORS step (or proxy over IPC). The octoflow-* wiring is type-checked; that last hop is yours to enable.
  • React Native — AG-UI streaming needs a fetch with a readable body, which RN lacks by default; install a streaming-fetch polyfill (commands in OCTOFLOW.md).

How it pins octoflow-core

It resolves the latest published octoflow-core at scaffold time and writes it as a caret range (e.g. ^1.1.0) — you get "latest" without the non-reproducible builds and supply-chain risk of a literal "latest" dependency.

Relationship to octoflow-agent-factory-cli

Two complementary front doors:

  • create-octoflow-app (this) — deterministic, zero-LLM: an instant, reproducible starter repo.
  • octoflow-agent-factory-cli — LLM-driven: describe an agent in English and it generates + runs it.

Next steps after scaffolding

Add tools, memory, RAG, or multi-agent topologies — see the OctoFlow docs and the feature catalog.