{"_id":"@bell_008/create-agent-app","name":"@bell_008/create-agent-app","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@bell_008/create-agent-app","version":"0.1.0","description":"Start with a minimal TypeScript LangChain CLI agent, then grow it into an API or chat app.","type":"module","bin":{"create-agent-app":"dist/src/cli.js"},"scripts":{"dev":"tsx src/cli.ts","build":"tsc -p tsconfig.json","start":"node dist/src/cli.js","pack:check":"pnpm run test:generated && npm pack --dry-run","prepublishOnly":"pnpm run typecheck && pnpm test && pnpm run test:generated","typecheck":"tsc --noEmit -p tsconfig.json","test":"vitest run","test:generated":"pnpm run build && node scripts/verify-generated.mjs","test:watch":"vitest"},"keywords":["agents","agent","langchain","langsmith","rag","typescript","nextjs","scaffold","starter","chatbot"],"engines":{"node":">=20"},"author":"","license":"MIT","packageManager":"pnpm@10.15.1","dependencies":{"prompts":"^2.4.2"},"devDependencies":{"@types/node":"^26.1.0","@types/prompts":"^2.4.9","tsx":"^4.21.0","typescript":"^6.0.2","vitest":"^4.0.18"},"_id":"@bell_008/create-agent-app@0.1.0","gitHead":"6285eadc48c4bfe51a997fe83a30b5b7f36621d6","_nodeVersion":"20.19.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-XqrVxo/wk6xGAAruIqxtql4a91zNQRq/k6Oq0tApP2cm7lG4un6S4Qx5MDysLCYAU0jsF3yJP6X2h1uDogIEww==","shasum":"962493bd860a2f9c01109c10d2950e640ad608ab","tarball":"https://registry.npmjs.org/@bell_008/create-agent-app/-/create-agent-app-0.1.0.tgz","fileCount":80,"unpackedSize":80544,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBD6LxCfhp8VjB35oR28GWcbb5ob7jxuYhlCPaZAD+oaAiEAqogxtT5omtQDFBG3qKPmVYE0xvpWfQWthQ8Lq689tBk="}]},"_npmUser":{"name":"bell_008","email":"shiqiharbin@163.com"},"directories":{},"maintainers":[{"name":"bell_008","email":"shiqiharbin@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/create-agent-app_0.1.0_1784281696390_0.6543788765717791"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-17T09:48:16.223Z","0.1.0":"2026-07-17T09:48:16.511Z","modified":"2026-07-17T09:48:16.755Z"},"maintainers":[{"name":"bell_008","email":"shiqiharbin@163.com"}],"description":"Start with a minimal TypeScript LangChain CLI agent, then grow it into an API or chat app.","keywords":["agents","agent","langchain","langsmith","rag","typescript","nextjs","scaffold","starter","chatbot"],"license":"MIT","readme":"# create-agent-app\n\nStart with a minimal TypeScript LangChain CLI agent, then grow it into an API or chat app.\n\n```bash\npnpm dlx @bell_008/create-agent-app my-agent\n```\n\n## Quick Start\n\n```bash\npnpm dlx @bell_008/create-agent-app my-agent\ncd my-agent\ncp .env.example .env\npnpm install\npnpm run typecheck\npnpm run test\npnpm run dev \"What's the weather in San Francisco?\"\n```\n\nSet `OPENAI_API_KEY` in `.env` before running the agent.\n\n## Why\n\nLangChain and LangGraph already provide strong TypeScript SDKs, examples, and a LangGraph Server template via `npm create langgraph`.\n\n`create-agent-app` focuses on a different path: app-first TypeScript agent projects. Start with a minimal CLI `createAgent` core, then choose whether you want an HTTP API, a Next.js chat shell, or a deployable single-user product shell.\n\nUse `npm create langgraph` when you want a LangGraph Server project first. Use `create-agent-app` when you want a TypeScript agent app that can start small and grow into a product shape.\n\n## Want A Web App?\n\nGenerate a deployable single-user chat product shell with local Markdown RAG:\n\n```bash\npnpm dlx @bell_008/create-agent-app my-chat \\\n  --template agent-chat-product \\\n  --capability rag \\\n  --provider openai \\\n  --package-manager pnpm \\\n  --yes\ncd my-chat\ncp .env.example .env\npnpm install\npnpm run ingest\npnpm run dev\n```\n\nOpen http://localhost:3000. The generated project includes `data/company-handbook.md`, a `search_knowledge_base` tool, and Sources in the Web UI when the agent uses retrieved context.\n\n## Templates\n\n| Template | Shape | Use it for |\n| --- | --- | --- |\n| `basic-agent` | CLI agent core | Learning `createAgent`, typed tools, env setup, tests |\n| `api-agent` | HTTP API | Calling the agent from an existing frontend or backend |\n| `web-chat-agent` | Next.js chat app | Teaching, demos, and lightweight prototypes |\n| `agent-chat-product` | Next.js product shell | A deployable single-user chat app starting point |\n\n## Capabilities\n\nCapabilities add agent behavior without changing the product shell.\n\n| Capability | What it adds |\n| --- | --- |\n| `rag` | Local Markdown knowledge base, sample handbook, `search_knowledge_base` tool, and `pnpm run ingest` |\n\nExample:\n\n```bash\npnpm dlx @bell_008/create-agent-app my-agent --template agent-chat-product --capability rag --provider openai --package-manager pnpm --yes\n```\n\n## Product Chat Example\n\n```bash\npnpm dlx @bell_008/create-agent-app my-chat --template agent-chat-product --provider openai --package-manager pnpm --yes\ncd my-chat\ncp .env.example .env\npnpm install\npnpm run dev\n```\n\nOpen http://localhost:3000.\n\nThe product shell includes:\n\n- Next.js app router\n- Streaming `/api/chat` route\n- Browser message history\n- Loading, error, clear, and abort states\n- Vercel deployment notes\n- LangSmith-ready env variables\n\nIt intentionally does not include auth, billing, a database, or multi-user conversation persistence.\n\n## RAG Example\n\n```bash\npnpm dlx @bell_008/create-agent-app my-rag-chat --template agent-chat-product --capability rag --provider openai --package-manager pnpm --yes\ncd my-rag-chat\ncp .env.example .env\npnpm install\npnpm run ingest\npnpm run dev\n```\n\nReplace `src/rag/retrieve.ts` when you are ready to use pgvector, Pinecone, Supabase, or another vector store.\n\n## Non-Interactive Usage\n\n```bash\npnpm dlx @bell_008/create-agent-app my-agent \\\n  --template web-chat-agent \\\n  --capability rag \\\n  --provider openai \\\n  --package-manager pnpm \\\n  --yes\n```\n\n## Template Internals\n\nThe generator composes templates from reusable parts:\n\n```txt\ntemplates/parts/agent-core\ntemplates/parts/cli-shell\ntemplates/parts/api-shell\ntemplates/parts/next-chat-shell\ntemplates/parts/product-chat-shell\ntemplates/capabilities/rag\n```\n\nThis keeps every template on the same agent core while allowing different product shells.\n\n## Development\n\n```bash\npnpm install\npnpm run typecheck\npnpm test\npnpm run test:generated\n```\n\n`test:generated` builds the CLI and verifies that every public template can generate the expected files. To also install and test each generated project, run:\n\n```bash\nVERIFY_GENERATED_INSTALL=1 pnpm run test:generated\n```\n\n## Publish Check\n\n```bash\nnpm_config_cache=/private/tmp/create-agent-app-npm-cache pnpm run pack:check\n```\n\nThe temporary npm cache avoids local npm cache permission issues.\n\n## Package Name\n\nThis package is published as `@bell_008/create-agent-app`.\n\nThe unscoped npm package name `create-agent-app` is already published by another owner, so the README uses `pnpm dlx @bell_008/create-agent-app` as the stable invocation.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-af9eca57e39cd6a8db90e4dfe93b885c"}