create-agent-config 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -79
- package/dist/index.cjs +350 -94
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +327 -95
- package/dist/index.js.map +1 -1
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -1,99 +1,89 @@
|
|
|
1
1
|
<h1 align="center">create-agent-config</h1>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<strong>Your AI agent starts every session blind. Fix that in
|
|
4
|
+
<strong>Your AI coding agent starts every session blind. Fix that in 30 seconds.</strong>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
One command. Detects your stack. Generates config files<br>
|
|
9
|
-
for Cursor, Claude Code, Copilot, Windsurf, Cline, and the AGENTS.md standard.
|
|
10
|
-
</p>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<a href="#quick-start"><img src="https://img.shields.io/badge/Try_It_Now-22c55e?style=for-the-badge&logoColor=white" alt="Try It Now" /></a>
|
|
14
|
-
|
|
15
|
-
<a href="#supported-formats"><img src="https://img.shields.io/badge/See_Formats-8b5cf6?style=for-the-badge&logoColor=white" alt="See Formats" /></a>
|
|
16
|
-
</p>
|
|
17
|
-
|
|
18
|
-
<p align="center">
|
|
19
|
-
<a href="https://github.com/ofershap/create-agent-config/stargazers"><img src="https://img.shields.io/github/stars/ofershap/create-agent-config?style=social" alt="GitHub stars" /></a>
|
|
20
|
-
|
|
21
8
|
<a href="https://www.npmjs.com/package/create-agent-config"><img src="https://img.shields.io/npm/v/create-agent-config.svg" alt="npm version" /></a>
|
|
22
9
|
<a href="https://www.npmjs.com/package/create-agent-config"><img src="https://img.shields.io/npm/dm/create-agent-config.svg" alt="npm downloads" /></a>
|
|
23
10
|
<a href="https://github.com/ofershap/create-agent-config/actions/workflows/ci.yml"><img src="https://github.com/ofershap/create-agent-config/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
|
|
24
11
|
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-strict-blue" alt="TypeScript" /></a>
|
|
25
12
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
|
|
26
|
-
<a href="https://makeapullrequest.com"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" /></a>
|
|
27
13
|
</p>
|
|
28
14
|
|
|
29
15
|
---
|
|
30
16
|
|
|
31
|
-
|
|
17
|
+
```bash
|
|
18
|
+
npm create agent-config
|
|
19
|
+
```
|
|
32
20
|
|
|
33
|
-
|
|
21
|
+
Scans your project, detects your stack, pulls community best practices from [cursor.directory](https://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.
|
|
34
22
|
|
|
35
|
-
|
|
23
|
+
## What exactly happens
|
|
36
24
|
|
|
37
|
-
|
|
25
|
+
1. **Scans** your project directory (package.json, tsconfig, lockfiles, config files)
|
|
26
|
+
2. **Detects** languages, frameworks, test runners, build tools, package manager
|
|
27
|
+
3. **Fetches** matching community rules from [cursor.directory](https://cursor.directory)'s open source repository (optional, skippable with `--offline`)
|
|
28
|
+
4. **Shows you** every file it plans to create and where
|
|
29
|
+
5. **Asks for confirmation** before writing anything
|
|
30
|
+
6. **Writes** the files you approved. Existing files are never overwritten.
|
|
38
31
|
|
|
39
|
-
|
|
32
|
+
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.
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
npm create agent-config
|
|
43
|
-
```
|
|
34
|
+
## What gets created and where
|
|
44
35
|
|
|
45
|
-
|
|
36
|
+
You choose which files to generate. Here's every possible output:
|
|
46
37
|
|
|
47
|
-
|
|
38
|
+
| File | Location | Used by |
|
|
39
|
+
| --------------------------------- | -------------------------- | ----------------------------------------- |
|
|
40
|
+
| `AGENTS.md` | project root | Codex, Devin, Jules, SWE-agent, 40+ tools |
|
|
41
|
+
| `CLAUDE.md` | project root | Claude Code |
|
|
42
|
+
| `.cursor/rules/project.mdc` | `.cursor/rules/` directory | Cursor IDE (modern .mdc format) |
|
|
43
|
+
| `.github/copilot-instructions.md` | `.github/` directory | GitHub Copilot |
|
|
44
|
+
| `.windsurfrules` | project root | Windsurf / Codeium |
|
|
45
|
+
| `.clinerules` | project root | Cline |
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
npx create-agent-config
|
|
51
|
-
```
|
|
47
|
+
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.
|
|
52
48
|
|
|
53
|
-
|
|
49
|
+
## Usage
|
|
54
50
|
|
|
55
51
|
```bash
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
# interactive mode (recommended)
|
|
53
|
+
npm create agent-config
|
|
58
54
|
|
|
59
|
-
|
|
55
|
+
# also works with npx
|
|
56
|
+
npx create-agent-config
|
|
60
57
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
3. Asks which config formats to generate
|
|
64
|
-
4. Writes best-practice config files with your detected stack baked in
|
|
58
|
+
# target a different directory
|
|
59
|
+
npx create-agent-config ./my-project
|
|
65
60
|
|
|
66
|
-
|
|
61
|
+
# skip network, use built-in templates only
|
|
62
|
+
npx create-agent-config --offline
|
|
63
|
+
```
|
|
67
64
|
|
|
68
|
-
##
|
|
65
|
+
## What gets detected
|
|
69
66
|
|
|
70
|
-
|
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
67
|
+
| Category | Examples |
|
|
68
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
69
|
+
| Languages | TypeScript, JavaScript, Python, Rust, Go |
|
|
70
|
+
| Frameworks | Next.js, React, Vue, Nuxt, Angular, Svelte, SvelteKit, Astro, Remix, NestJS, Express, Fastify, Hono, Electron, Django, Flask, FastAPI |
|
|
71
|
+
| Test runners | Vitest, Jest, Mocha, Playwright, Cypress, pytest |
|
|
72
|
+
| Build tools | tsup, esbuild, rollup, Vite, Webpack |
|
|
73
|
+
| Package managers | npm, pnpm, yarn, bun |
|
|
74
|
+
| Monorepo | Turborepo, Nx, Lerna, workspaces |
|
|
78
75
|
|
|
79
|
-
|
|
76
|
+
Detection reads config files and package.json. Nothing is executed.
|
|
80
77
|
|
|
81
|
-
##
|
|
78
|
+
## Community rules
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
|---|---|
|
|
85
|
-
| Languages | TypeScript, JavaScript, Python, Rust, Go |
|
|
86
|
-
| Frameworks | Next.js, React, Vue, Nuxt, Angular, Svelte, NestJS, Express, Fastify, Hono, Django, FastAPI |
|
|
87
|
-
| Test runners | Vitest, Jest, Mocha, Playwright, Cypress, pytest |
|
|
88
|
-
| Build tools | tsup, esbuild, rollup, Vite, Webpack |
|
|
89
|
-
| Package managers | npm, pnpm, yarn, bun |
|
|
90
|
-
| Monorepo tools | Turborepo, Nx, Lerna, workspaces |
|
|
80
|
+
When online, the tool fetches framework-specific best practices from [cursor.directory](https://cursor.directory)'s [open source repository](https://github.com/pontusab/cursor.directory) on GitHub. These are community-curated rules maintained by 160+ contributors covering React, Next.js, TypeScript, Python, Vue, Angular, Svelte, NestJS, and many more.
|
|
91
81
|
|
|
92
|
-
|
|
82
|
+
You're asked whether to include them. If you decline or the fetch fails, the tool falls back to built-in defaults.
|
|
93
83
|
|
|
94
|
-
##
|
|
84
|
+
## Example output
|
|
95
85
|
|
|
96
|
-
|
|
86
|
+
Running against a Next.js + TypeScript project generates an `AGENTS.md` like this:
|
|
97
87
|
|
|
98
88
|
```markdown
|
|
99
89
|
# my-app
|
|
@@ -120,6 +110,10 @@ Package manager: pnpm
|
|
|
120
110
|
- Functional components only, no class components
|
|
121
111
|
- Use hooks for state and side effects
|
|
122
112
|
|
|
113
|
+
## Best Practices
|
|
114
|
+
|
|
115
|
+
[community rules from cursor.directory for Next.js + React]
|
|
116
|
+
|
|
123
117
|
## Rules
|
|
124
118
|
|
|
125
119
|
- Do not modify generated files in `dist/` or `build/`
|
|
@@ -127,25 +121,11 @@ Package manager: pnpm
|
|
|
127
121
|
- Keep commits small and focused
|
|
128
122
|
```
|
|
129
123
|
|
|
130
|
-
The
|
|
131
|
-
|
|
132
|
-
## Existing Files Are Safe
|
|
133
|
-
|
|
134
|
-
If a config file already exists, it gets skipped. You won't lose anything.
|
|
135
|
-
|
|
136
|
-
## Tech Stack
|
|
137
|
-
|
|
138
|
-
| | |
|
|
139
|
-
|---|---|
|
|
140
|
-
| **Language** |  |
|
|
141
|
-
| **Testing** |  |
|
|
142
|
-
| **Bundler** |  |
|
|
143
|
-
| **CI** |  |
|
|
144
|
-
| **Dependencies** | Zero runtime deps |
|
|
124
|
+
The `.cursor/rules/project.mdc` version includes YAML frontmatter with `alwaysApply: true`.
|
|
145
125
|
|
|
146
126
|
## Contributing
|
|
147
127
|
|
|
148
|
-
Contributions welcome. See [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
128
|
+
Contributions welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
149
129
|
|
|
150
130
|
## Author
|
|
151
131
|
|
|
@@ -154,10 +134,6 @@ Contributions welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
154
134
|
[](https://linkedin.com/in/ofershap)
|
|
155
135
|
[](https://github.com/ofershap)
|
|
156
136
|
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
If this helped you, [star the repo](https://github.com/ofershap/create-agent-config), [open an issue](https://github.com/ofershap/create-agent-config/issues) if something breaks, or [start a discussion](https://github.com/ofershap/create-agent-config/discussions).
|
|
160
|
-
|
|
161
137
|
## License
|
|
162
138
|
|
|
163
139
|
[MIT](LICENSE) © [Ofer Shapira](https://github.com/ofershap)
|