claude-code-autoconfig 1.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.
@@ -0,0 +1,51 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Read(./**)",
5
+ "Edit(./**)",
6
+ "Write(./**)",
7
+ "WebSearch",
8
+ "WebFetch",
9
+ "Bash(npm run dev)",
10
+ "Bash(npm run build)",
11
+ "Bash(npm run lint)",
12
+ "Bash(npm run lint:fix)",
13
+ "Bash(npm run typecheck)",
14
+ "Bash(npm run test)",
15
+ "Bash(npm run test:*)",
16
+ "Bash(npm run validate)",
17
+ "Bash(git status)",
18
+ "Bash(git diff:*)",
19
+ "Bash(git add:*)",
20
+ "Bash(git commit:*)",
21
+ "Bash(git push:*)",
22
+ "Bash(git pull)",
23
+ "Bash(git checkout:*)",
24
+ "Bash(git branch:*)"
25
+ ],
26
+ "deny": [
27
+ "Read(./.env)",
28
+ "Read(./.env.*)",
29
+ "Read(./secrets/**)",
30
+ "Read(./**/credentials.*)",
31
+ "Read(./**/*.pem)",
32
+ "Read(./**/*.key)",
33
+ "Bash(rm -rf:*)",
34
+ "Bash(curl:*)",
35
+ "Bash(wget:*)"
36
+ ]
37
+ },
38
+ "hooks": {
39
+ "SessionStart": [
40
+ {
41
+ "matcher": "",
42
+ "hooks": [
43
+ {
44
+ "type": "command",
45
+ "command": "printf '\\033]0;claude\\007' || true"
46
+ }
47
+ ]
48
+ }
49
+ ]
50
+ }
51
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "WebSearch",
5
+ "Bash(cat:*)",
6
+ "Bash(rm:*)",
7
+ "Bash(del /q \"C:\\\\CODE\\\\claude-code-autoconfig\\\\.claude\\\\retro\\\\_TEMPLATE.md\")",
8
+ "Bash(git mv:*)",
9
+ "WebFetch(domain:github.com)",
10
+ "WebFetch(domain:agentskills.io)",
11
+ "Bash(npm link)",
12
+ "Bash(npm pack:*)",
13
+ "Bash(npm login)",
14
+ "Bash(npm login --auth-type=web)",
15
+ "Bash(npm publish:*)",
16
+ "Bash(npm config set:*)"
17
+ ]
18
+ }
19
+ }
package/CLAUDE.md ADDED
@@ -0,0 +1,7 @@
1
+ <!-- AUTO-GENERATED BY /autoconfig — Do not edit. Use .claude/feedback/ for corrections. -->
2
+
3
+ # Project Name
4
+
5
+ > Run `/autoconfig` to populate this based on your project.
6
+
7
+ <!-- END AUTO-GENERATED -->
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ADAC 1001
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,122 @@
1
+ # Claude Code Autoconfig
2
+
3
+ Intelligent, self-configuring setup for Claude Code. One command analyzes your project, configures Claude, and shows you what it did.
4
+
5
+ ## Quick Install
6
+
7
+ **macOS / Linux / WSL:**
8
+ ```bash
9
+ curl -fsSL https://raw.githubusercontent.com/design-and-deliver/claude-code-autoconfig/main/install.sh | bash
10
+ ```
11
+
12
+ **Windows (PowerShell):**
13
+ ```powershell
14
+ irm https://raw.githubusercontent.com/design-and-deliver/claude-code-autoconfig/main/install.ps1 | iex
15
+ ```
16
+
17
+ ## After Install
18
+
19
+ 1. **`/autoconfig`** — Claude analyzes your project and configures itself
20
+ 2. **`/show-guide`** — Opens an interactive guide showing what got set up
21
+
22
+ That's it. Your Claude Code environment is configured and ready.
23
+
24
+ ## What Gets Installed
25
+
26
+ ```
27
+ your-project/
28
+ ├── CLAUDE.md # Project context (auto-populated)
29
+ └── .claude/
30
+ ├── commands/ # Slash commands
31
+ │ ├── autoconfig.md # /autoconfig - self-configures
32
+ │ ├── commit-and-push.md # /commit-and-push - git workflow
33
+ │ ├── enable-retro.md # /enable-retro - opt-in tech debt tracking
34
+ │ ├── show-guide.md # /show-guide - interactive walkthrough
35
+ │ ├── sync-claude-md.md # /sync-claude-md - update CLAUDE.md
36
+ │ └── test.md # /test - run tests
37
+ ├── feedback/ # Team corrections for Claude
38
+ │ └── FEEDBACK.md # Add entries when Claude errs
39
+ ├── guide/ # Interactive walkthrough
40
+ │ └── autoconfig.guide.html # Open with /show-guide
41
+ ├── rules/ # Path-scoped context (empty)
42
+ ├── .mcp.json # MCP server configs (empty placeholder)
43
+ └── settings.json # Permissions & security
44
+ ```
45
+
46
+ ## How It Works
47
+
48
+ ### Self-Configuration
49
+
50
+ Most templates are static — copy, paste, manually fill in.
51
+
52
+ This one is **self-configuring**. Run `/autoconfig` and Claude:
53
+
54
+ 1. **Detects your environment** — Windows vs macOS/Linux for correct command syntax
55
+ 2. **Scans your project** — Package files, framework indicators, test setup
56
+ 3. **Populates CLAUDE.md** — Project name, tech stack, commands, conventions
57
+ 4. **Configures settings.json** — Permissions tuned to your ecosystem
58
+
59
+ You get a custom-fit configuration without the manual work.
60
+
61
+ ### Slash Commands
62
+
63
+ | Command | Description |
64
+ |---------|-------------|
65
+ | `/autoconfig` | Analyzes project and populates configuration |
66
+ | `/sync-claude-md` | Re-analyzes project and updates CLAUDE.md |
67
+ | `/show-guide` | Opens interactive guide in browser |
68
+ | `/test` | Runs your test suite (auto-detects framework) |
69
+ | `/commit-and-push` | Stages, commits with good message, and pushes |
70
+ | `/enable-retro` | (Experimental) Enable tech debt tracking |
71
+
72
+ ### Team Feedback
73
+
74
+ When Claude makes a mistake, add an entry to `.claude/feedback/FEEDBACK.md`:
75
+
76
+ ```markdown
77
+ ## 2026-01-07: Don't use deprecated API
78
+ Claude used `oldFunction()` instead of `newFunction()`.
79
+ Always use the v2 API for user endpoints.
80
+ ```
81
+
82
+ Claude reads this directory and learns for next time. Persists across `/autoconfig` runs.
83
+
84
+ ### Retro Items (Experimental)
85
+
86
+ Opt-in feature for tracking tech debt. Run `/enable-retro` to activate.
87
+
88
+ When enabled, Claude logs improvement opportunities as structured story files in `.claude/retro/`:
89
+ - Problem description
90
+ - Acceptance criteria
91
+ - Suggested approach
92
+ - Priority & effort sizing
93
+ - Files involved
94
+
95
+ Work through items anytime: *"Hey Claude, fix retro #001"*
96
+
97
+ ### Rules
98
+
99
+ The `rules/` directory is intentionally empty. Effective rules require understanding your codebase patterns, team conventions, and quality standards.
100
+
101
+ **Want optimized rules for your project?**
102
+ Reach out: [info@adac1001.com](mailto:info@adac1001.com)
103
+
104
+ ## Permissions & Security
105
+
106
+ The included `settings.json` provides sensible defaults that balance productivity with safety:
107
+
108
+ - **`allow`** — Auto-approved operations (file edits, tests, git commands)
109
+ - **`deny`** — Always blocked (secrets, destructive commands, network calls)
110
+
111
+ Review and adjust these for your team's needs. Run `/permissions` in Claude Code to inspect your current configuration.
112
+
113
+ See [Claude Code Security Docs](https://docs.anthropic.com/en/docs/claude-code/security) for best practices.
114
+
115
+ ## Links
116
+
117
+ - [Claude Code Docs](https://docs.anthropic.com/en/docs/claude-code/overview)
118
+ - [Slash Commands Reference](https://docs.anthropic.com/en/docs/claude-code/slash-commands)
119
+
120
+ ---
121
+
122
+ Built by [ADAC 1001](https://adac1001.com)
package/bin/cli.js ADDED
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const cwd = process.cwd();
7
+ const packageDir = path.dirname(__dirname);
8
+
9
+ console.log('\x1b[36m%s\x1b[0m', '🚀 Installing Claude Code Autoconfig...');
10
+ console.log();
11
+
12
+ // Files/dirs to skip during copy (project-specific, not for distribution)
13
+ const SKIP_FILES = ['settings.local.json', 'retro'];
14
+
15
+ // Helper to copy directory recursively
16
+ function copyDir(src, dest) {
17
+ fs.mkdirSync(dest, { recursive: true });
18
+ const entries = fs.readdirSync(src, { withFileTypes: true });
19
+
20
+ for (const entry of entries) {
21
+ if (SKIP_FILES.includes(entry.name)) continue;
22
+
23
+ const srcPath = path.join(src, entry.name);
24
+ const destPath = path.join(dest, entry.name);
25
+
26
+ if (entry.isDirectory()) {
27
+ copyDir(srcPath, destPath);
28
+ } else {
29
+ fs.copyFileSync(srcPath, destPath);
30
+ }
31
+ }
32
+ }
33
+
34
+ // Copy .claude directory
35
+ const claudeSrc = path.join(packageDir, '.claude');
36
+ const claudeDest = path.join(cwd, '.claude');
37
+
38
+ if (fs.existsSync(claudeSrc)) {
39
+ copyDir(claudeSrc, claudeDest);
40
+ console.log('\x1b[32m%s\x1b[0m', '✅ Created .claude/ directory structure');
41
+ } else {
42
+ console.log('\x1b[31m%s\x1b[0m', '❌ Error: .claude directory not found in package');
43
+ process.exit(1);
44
+ }
45
+
46
+ // Copy CLAUDE.md (don't overwrite if exists)
47
+ const claudeMdSrc = path.join(packageDir, 'CLAUDE.md');
48
+ const claudeMdDest = path.join(cwd, 'CLAUDE.md');
49
+
50
+ if (fs.existsSync(claudeMdDest)) {
51
+ console.log('\x1b[33m%s\x1b[0m', '⚠️ CLAUDE.md already exists, saving template as CLAUDE.md.template');
52
+ fs.copyFileSync(claudeMdSrc, path.join(cwd, 'CLAUDE.md.template'));
53
+ } else if (fs.existsSync(claudeMdSrc)) {
54
+ fs.copyFileSync(claudeMdSrc, claudeMdDest);
55
+ console.log('\x1b[32m%s\x1b[0m', '✅ Created CLAUDE.md');
56
+ }
57
+
58
+ console.log();
59
+ console.log('\x1b[36m%s\x1b[0m', '✨ Claude Code Autoconfig installed!');
60
+ console.log();
61
+ console.log('Once Claude Code is open:');
62
+ console.log(' 1. Run \x1b[33m/autoconfig\x1b[0m to configure for your project');
63
+ console.log(' 2. Run \x1b[33m/show-guide\x1b[0m to open the interactive guide');
64
+ console.log();
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "claude-code-autoconfig",
3
+ "version": "1.0.0",
4
+ "description": "Intelligent, self-configuring setup for Claude Code. One command analyzes your project, configures Claude, and shows you what it did.",
5
+ "author": "ADAC 1001 <info@adac1001.com>",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/design-and-deliver/claude-code-autoconfig.git"
10
+ },
11
+ "homepage": "https://github.com/design-and-deliver/claude-code-autoconfig#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/design-and-deliver/claude-code-autoconfig/issues"
14
+ },
15
+ "keywords": [
16
+ "claude",
17
+ "claude-code",
18
+ "anthropic",
19
+ "ai",
20
+ "autoconfig",
21
+ "configuration",
22
+ "cli"
23
+ ],
24
+ "bin": {
25
+ "claude-code-autoconfig": "./bin/cli.js"
26
+ },
27
+ "files": [
28
+ "bin",
29
+ ".claude",
30
+ "CLAUDE.md"
31
+ ],
32
+ "engines": {
33
+ "node": ">=16.0.0"
34
+ }
35
+ }