create-agent-config
v2.0.0
Published
Scaffold AI agent config files for any project. Detects your stack, pulls community rules from cursor.directory, writes configs for Cursor, Claude Code, Copilot, Windsurf, Cline, and AGENTS.md.
Maintainers
Readme
npm create agent-configScans your project, detects your stack, pulls community best practices from cursor.directory, and writes config files for every major AI coding tool. You pick which files to create, review what will be written, and confirm before anything touches disk.
What exactly happens
- Scans your project directory (package.json, tsconfig, lockfiles, config files)
- Detects languages, frameworks, test runners, build tools, package manager
- Fetches matching community rules from cursor.directory's open source repository (optional, skippable with
--offline) - Shows you every file it plans to create and where
- Asks for confirmation before writing anything
- Writes the files you approved. Existing files are never overwritten.
Nothing is executed, uploaded, or sent to any API. The only network call is a GET request to raw.githubusercontent.com to fetch community rules. Pass --offline to skip it entirely.
What gets created and where
You choose which files to generate. Here's every possible output:
| File | Location | Used by |
| --------------------------------- | -------------------------- | ----------------------------------------- |
| AGENTS.md | project root | Codex, Devin, Jules, SWE-agent, 40+ tools |
| CLAUDE.md | project root | Claude Code |
| .cursor/rules/project.mdc | .cursor/rules/ directory | Cursor IDE (modern .mdc format) |
| .github/copilot-instructions.md | .github/ directory | GitHub Copilot |
| .windsurfrules | project root | Windsurf / Codeium |
| .clinerules | project root | Cline |
Each file contains your detected stack info (languages, frameworks, commands, conventions) plus community best practices if you opted in. The content is project-specific, not generic boilerplate.
Usage
# interactive mode (recommended)
npm create agent-config
# also works with npx
npx create-agent-config
# target a different directory
npx create-agent-config ./my-project
# skip network, use built-in templates only
npx create-agent-config --offlineWhat gets detected
| Category | Examples | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | Languages | TypeScript, JavaScript, Python, Rust, Go | | Frameworks | Next.js, React, Vue, Nuxt, Angular, Svelte, SvelteKit, Astro, Remix, NestJS, Express, Fastify, Hono, Electron, Django, Flask, FastAPI | | Test runners | Vitest, Jest, Mocha, Playwright, Cypress, pytest | | Build tools | tsup, esbuild, rollup, Vite, Webpack | | Package managers | npm, pnpm, yarn, bun | | Monorepo | Turborepo, Nx, Lerna, workspaces |
Detection reads config files and package.json. Nothing is executed.
Community rules
When online, the tool fetches framework-specific best practices from cursor.directory's open source repository on GitHub. These are community-curated rules maintained by 160+ contributors covering React, Next.js, TypeScript, Python, Vue, Angular, Svelte, NestJS, and many more.
You're asked whether to include them. If you decline or the fetch fails, the tool falls back to built-in defaults.
Example output
Running against a Next.js + TypeScript project generates an AGENTS.md like this:
# my-app
## Project
Languages: TypeScript
Frameworks: Next.js, React
Testing: Vitest
Package manager: pnpm
## Commands
- Dev server: `pnpm dev`
- Build: `pnpm build`
- Test: `pnpm test`
- Lint: `pnpm lint`
## Conventions
- Use TypeScript strict mode
- Prefer `const` over `let`, avoid `any`
- Use explicit return types on exported functions
- Functional components only, no class components
- Use hooks for state and side effects
## Best Practices
[community rules from cursor.directory for Next.js + React]
## Rules
- Do not modify generated files in `dist/` or `build/`
- Run tests before committing
- Keep commits small and focusedThe .cursor/rules/project.mdc version includes YAML frontmatter with alwaysApply: true.
Contributing
Contributions welcome. See CONTRIBUTING.md.
