Guidance for AI coding agents working in this repository.
create-arcade-agent scaffolds starter projects that teach Arcade MCP Gateway concepts and produce working, customizable agent apps.
src/— CLI source (TypeScript, compiled withtsctodist/)templates/— project templates copied/rendered during scaffoldingai-sdk/— Next.js + Vercel AI SDKmastra/— Next.js + Mastralangchain/— FastAPI + LangGraph (Python)_shared/— shared files injected into generated projects (Next.js UI, prompts, partials)
npm run build # Compile CLI
npm run dev # Watch mode
npm run typecheck # tsc --noEmit
npm run lint # ESLint (src/ + templates/ TS files)
npm run lint:fix # ESLint auto-fix
npm run format # Prettier format
npm run format:check # Prettier checkFor Python templates:
ruff check templates/langchain/ # Lint
ruff format templates/langchain/ # FormatAlways run npm run lint and npm run format:check before committing.
- ESLint v9 (flat config in
eslint.config.mjs) + Prettier (.prettierrc) for TypeScript/JS - Ruff (
templates/langchain/ruff.toml) for Python templates/_shared/nextjs-ui/is excluded from root ESLint (has its owneslint.config.mjsfor generated projects)templates/langchain/is excluded from ESLint (Python-only, covered by Ruff)
GitHub Actions (.github/workflows/ci.yml) runs 3 jobs:
- lint-and-build — lint + format + typecheck + build on Node 22
- lint-python — Ruff on
templates/langchain/ - smoke-test-templates — scaffolds each template and verifies it builds
The CLI is fully non-interactive with both args: node dist/index.js <name> --template <template>
- Reads project name from
argv[2]and--templateflag - Copies template files, rendering
.hbsfiles with Handlebars - Copies shared files from
_shared/pertemplate.jsonmappings - Renames dotfiles (e.g.,
_gitignore→.gitignore) - Runs install steps (
npm installorpip install) - Runs migrations (Drizzle Kit or Alembic) — failures are non-fatal
- The CLI itself uses
npm. - Generated
ai-sdkandmastraprojects usebun—template.jsonsetsbun installandbun run dev. Don't substitutenpmwhen writing commands for generated projects. - The
langchaintemplate uses Python (pip/uvicorn).
templates/_shared/nextjs-ui/is the shared React frontend, injected into generated projects via thesharedFilesmap in eachtemplate.json. It has its owneslint.config.mjsand is excluded from root ESLint.templates/_shared/partials/holds Handlebars partials included with{{> partial-name.md}}..hbsfiles render with context{ projectName, name }wherenameis the template slug (e.g."ai-sdk").
Generated Next.js templates use @arcadeai/design-system (not bare shadcn/ui). Import components from @arcadeai/design-system and brand icons from @arcadeai/design-system/components/ui/atoms/icons.
npm run build
node dist/index.js test-proj --template ai-sdk
cd test-proj && bun run build && bun run lint
cd .. && node dist/index.js test-proj-py --template langchain- Keep generated templates simple and beginner-friendly.
- Prefer MCP Gateway patterns over direct SDK-specific concepts.
- Preserve/extend
CUSTOMIZATION POINTandAI-EDIT-SAFEmarkers. - Avoid introducing framework-specific complexity unless required.
- Keep OAuth/security guidance aligned with Arcade docs (custom verifier for production user-facing apps).
Releases are manual and tag-triggered — nothing publishes automatically on merge to main. Push a version tag to trigger the release workflow (.github/workflows/release.yml).
# 1. Make sure you're on main and it's clean
git checkout main && git pull
# 2. Bump the version in package.json (pick one)
npm version patch # 0.1.0 → 0.1.1 (bug fixes)
npm version minor # 0.1.0 → 0.2.0 (new features)
npm version major # 0.1.0 → 1.0.0 (breaking changes)
# 3. Push the commit AND the tag
git push origin main --follow-tagsThe release workflow builds the CLI and publishes to npm with provenance via OIDC-based auth (no NPM_TOKEN required after Trusted Publishers is configured).