aiblueprint-cli 1.1.4 → 1.1.8
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 +496 -41
- package/claude-code-config/agents/action.md +36 -0
- package/claude-code-config/agents/explore-codebase.md +6 -0
- package/claude-code-config/agents/explore-docs.md +88 -0
- package/claude-code-config/agents/fix-grammar.md +49 -0
- package/claude-code-config/agents/snipper.md +2 -0
- package/claude-code-config/agents/websearch.md +1 -0
- package/claude-code-config/commands/commit.md +1 -1
- package/claude-code-config/commands/debug.md +91 -0
- package/claude-code-config/commands/epct/code.md +171 -0
- package/claude-code-config/commands/epct/deploy.md +116 -0
- package/claude-code-config/commands/epct/explore.md +97 -0
- package/claude-code-config/commands/epct/plan.md +132 -0
- package/claude-code-config/commands/epct/tasks.md +206 -0
- package/claude-code-config/commands/explore.md +45 -0
- package/claude-code-config/commands/melvynx-plugin.md +1 -0
- package/claude-code-config/commands/oneshot.md +57 -0
- package/claude-code-config/hooks/hooks.json +15 -0
- package/claude-code-config/scripts/statusline/CLAUDE.md +178 -0
- package/claude-code-config/scripts/statusline/README.md +105 -0
- package/claude-code-config/scripts/statusline/biome.json +34 -0
- package/claude-code-config/scripts/statusline/bun.lockb +0 -0
- package/claude-code-config/scripts/statusline/data/.gitignore +5 -0
- package/claude-code-config/scripts/statusline/fixtures/test-input.json +25 -0
- package/claude-code-config/scripts/statusline/package.json +21 -0
- package/claude-code-config/scripts/statusline/src/commands/CLAUDE.md +3 -0
- package/claude-code-config/scripts/statusline/src/commands/spend-month.ts +60 -0
- package/claude-code-config/scripts/statusline/src/commands/spend-today.ts +42 -0
- package/claude-code-config/scripts/statusline/src/index.ts +141 -0
- package/claude-code-config/scripts/statusline/src/lib/context.ts +103 -0
- package/claude-code-config/scripts/statusline/src/lib/formatters.ts +218 -0
- package/claude-code-config/scripts/statusline/src/lib/git.ts +100 -0
- package/claude-code-config/scripts/statusline/src/lib/spend.ts +119 -0
- package/claude-code-config/scripts/statusline/src/lib/types.ts +25 -0
- package/claude-code-config/scripts/statusline/src/lib/usage-limits.ts +147 -0
- package/claude-code-config/scripts/statusline/statusline.config.ts +122 -0
- package/claude-code-config/scripts/statusline/test.ts +20 -0
- package/claude-code-config/scripts/statusline/tsconfig.json +27 -0
- package/dist/cli.js +722 -256
- package/package.json +1 -2
- package/claude-code-config/output-styles/assistant.md +0 -15
- package/claude-code-config/output-styles/honnest.md +0 -9
- package/claude-code-config/output-styles/senior-dev.md +0 -14
- package/claude-code-config/scripts/statusline-ccusage.sh +0 -188
- package/claude-code-config/scripts/statusline.readme.md +0 -194
- /package/claude-code-config/{hooks → scripts}/hook-post-file.ts +0 -0
package/README.md
CHANGED
|
@@ -1,73 +1,528 @@
|
|
|
1
1
|
# AIBlueprint CLI
|
|
2
2
|
|
|
3
|
-
A CLI tool for
|
|
3
|
+
A comprehensive CLI tool for supercharging Claude Code with security, productivity, and workflow automation features. Transform your Claude Code experience with pre-configured commands, security hooks, intelligent status displays, and specialized AI agents.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> [!NOTE]
|
|
6
|
+
> If you encounter permission errors when running the commands below, add `sudo` before the command.
|
|
7
|
+
|
|
8
|
+
## 🚀 Quick Start
|
|
9
|
+
|
|
10
|
+
### Option 1: Install as Claude Code Plugin (Recommended)
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Add the AIBlueprint marketplace
|
|
14
|
+
/plugin marketplace add melvynx/aiblueprint
|
|
15
|
+
|
|
16
|
+
# Install the base plugin
|
|
17
|
+
/plugin install aibp-base@AIBlueprint
|
|
18
|
+
|
|
19
|
+
# Or install directly from GitHub
|
|
20
|
+
/plugin install github:melvynx/aiblueprint
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Option 2: Use the CLI Tool
|
|
6
24
|
|
|
7
25
|
```bash
|
|
8
26
|
# Run immediately without installation
|
|
9
|
-
bunx aiblueprint-cli claude-code setup
|
|
27
|
+
bunx aiblueprint-cli@latest claude-code setup
|
|
28
|
+
|
|
29
|
+
# Or install globally and use
|
|
30
|
+
npm install -g aiblueprint-cli
|
|
31
|
+
aiblueprint claude-code setup
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 📋 Table of Contents
|
|
35
|
+
|
|
36
|
+
- [Plugin Installation](#-plugin-installation)
|
|
37
|
+
- [CLI Installation & Usage](#-cli-installation--usage)
|
|
38
|
+
- [Command Reference](#command-reference)
|
|
39
|
+
- [Available Features](#available-features)
|
|
40
|
+
- [Configuration System](#configuration-system)
|
|
41
|
+
- [Templates Catalog](#templates-catalog)
|
|
42
|
+
- [Installation Targets](#installation-targets)
|
|
43
|
+
- [Security Features](#security-features)
|
|
44
|
+
- [Development](#development)
|
|
45
|
+
|
|
46
|
+
## 🔌 Plugin Installation
|
|
47
|
+
|
|
48
|
+
### Install from Claude Code Plugin Marketplace
|
|
49
|
+
|
|
50
|
+
The easiest way to get started is by installing AIBlueprint as a Claude Code plugin:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Step 1: Add the AIBlueprint marketplace
|
|
54
|
+
/plugin marketplace add melvynx/aiblueprint
|
|
55
|
+
|
|
56
|
+
# Step 2: Install the aibp-base plugin
|
|
57
|
+
/plugin install aibp-base@AIBlueprint
|
|
58
|
+
|
|
59
|
+
# Alternative: Install directly from GitHub
|
|
60
|
+
/plugin install github:melvynx/aiblueprint
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### What Gets Installed
|
|
64
|
+
|
|
65
|
+
The `aibp-base` plugin includes:
|
|
66
|
+
- ✅ **16 Custom Commands** - `/commit`, `/create-pull-request`, `/deep-code-analysis`, etc.
|
|
67
|
+
- ✅ **3 Specialized Agents** - explore-codebase, Snipper, websearch
|
|
68
|
+
- ✅ **Security Hooks** - Command validation and TypeScript processing
|
|
69
|
+
- ✅ **Custom Statusline** - Git status, cost tracking, and token usage
|
|
70
|
+
- ✅ **Notification Sounds** - Audio alerts for task completion
|
|
71
|
+
|
|
72
|
+
### Plugin Management
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# List installed plugins
|
|
76
|
+
/plugin list
|
|
77
|
+
|
|
78
|
+
# Update plugin to latest version
|
|
79
|
+
/plugin update aibp-base
|
|
80
|
+
|
|
81
|
+
# Remove plugin
|
|
82
|
+
/plugin uninstall aibp-base
|
|
83
|
+
|
|
84
|
+
# View marketplace plugins
|
|
85
|
+
/plugin marketplace list
|
|
10
86
|
```
|
|
11
87
|
|
|
12
|
-
|
|
88
|
+
### Plugin vs CLI Tool
|
|
89
|
+
|
|
90
|
+
**Plugin Installation (Recommended)**:
|
|
91
|
+
- ✅ Automatic updates via marketplace
|
|
92
|
+
- ✅ No CLI tool installation needed
|
|
93
|
+
- ✅ Direct integration with Claude Code
|
|
94
|
+
- ✅ Easy to manage and update
|
|
95
|
+
|
|
96
|
+
**CLI Tool Installation**:
|
|
97
|
+
- ✅ More control over installation
|
|
98
|
+
- ✅ Custom folder locations
|
|
99
|
+
- ✅ Interactive feature selection
|
|
100
|
+
- ✅ Symlink management for other tools
|
|
101
|
+
|
|
102
|
+
## 💾 CLI Installation & Usage
|
|
103
|
+
|
|
104
|
+
### Installation Methods
|
|
13
105
|
|
|
14
106
|
```bash
|
|
15
|
-
#
|
|
107
|
+
# Global installation
|
|
16
108
|
npm install -g aiblueprint-cli
|
|
109
|
+
bun install -g aiblueprint-cli
|
|
110
|
+
|
|
111
|
+
# Run without installation
|
|
112
|
+
npx aiblueprint-cli@latest claude-code setup
|
|
113
|
+
pnpm dlx aiblueprint-cli@latest claude-code setup
|
|
114
|
+
bunx aiblueprint-cli@latest claude-code setup
|
|
115
|
+
```
|
|
17
116
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
117
|
+
### Basic Usage
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Interactive setup with feature selection
|
|
121
|
+
bunx aiblueprint-cli@latest claude-code setup
|
|
122
|
+
|
|
123
|
+
# Non-interactive setup (install all features)
|
|
124
|
+
bunx aiblueprint-cli@latest claude-code setup --skip
|
|
125
|
+
|
|
126
|
+
# Install to custom directory
|
|
127
|
+
bunx aiblueprint-cli@latest claude-code setup --folder ./custom-claude-config
|
|
128
|
+
|
|
129
|
+
# Install to project directory
|
|
130
|
+
cd your-project
|
|
131
|
+
bunx aiblueprint-cli@latest claude-code setup # Creates .claude/ in project root
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 🎯 Command Reference
|
|
135
|
+
|
|
136
|
+
### Main Commands
|
|
137
|
+
|
|
138
|
+
| Command | Description | Options |
|
|
139
|
+
|---------|-------------|---------|
|
|
140
|
+
| `bunx aiblueprint-cli@latest claude-code setup` | Interactive setup with feature selection | `-f, --folder <path>` (alias for --claudeCodeFolder), `--claudeCodeFolder <path>`, `--codexFolder <path>`, `--openCodeFolder <path>`, `--factoryAiFolder <path>`, `-s, --skip` |
|
|
141
|
+
| `bunx aiblueprint-cli@latest claude-code symlink` | Create symlinks between CLI tools (Codex, OpenCode, FactoryAI) | `--claudeCodeFolder <path>`, `--codexFolder <path>`, `--openCodeFolder <path>`, `--factoryAiFolder <path>` |
|
|
142
|
+
| `bunx aiblueprint-cli@latest claude-code statusline` | Setup custom statusline with git status, costs, and token usage | `-f, --folder <path>` |
|
|
143
|
+
| `bunx aiblueprint-cli@latest claude-code add hook <type>` | Install specific hook | `-f, --folder <path>` |
|
|
144
|
+
| `bunx aiblueprint-cli@latest claude-code add commands [name]` | List or install commands | `-f, --folder <path>` |
|
|
145
|
+
|
|
146
|
+
### Command Examples
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Setup with options
|
|
150
|
+
bunx aiblueprint-cli@latest claude-code setup --skip # Install all features
|
|
151
|
+
bunx aiblueprint-cli@latest claude-code setup --folder ~/.my-claude # Custom location
|
|
152
|
+
bunx aiblueprint-cli@latest claude-code setup --claudeCodeFolder ~/.claude --codexFolder ~/.codex # Separate folders
|
|
153
|
+
|
|
154
|
+
# Add specific hooks
|
|
155
|
+
bunx aiblueprint-cli@latest claude-code add hook post-edit-typescript # TypeScript processing hook
|
|
156
|
+
|
|
157
|
+
# Manage commands
|
|
158
|
+
bunx aiblueprint-cli@latest claude-code add commands # List all available commands
|
|
159
|
+
bunx aiblueprint-cli@latest claude-code add commands commit # Install commit command
|
|
160
|
+
bunx aiblueprint-cli@latest claude-code add commands deep-code-analysis # Install analysis command
|
|
161
|
+
|
|
162
|
+
# Create symlinks between CLI tools
|
|
163
|
+
bunx aiblueprint-cli@latest claude-code symlink # Interactive symlink manager
|
|
164
|
+
bunx aiblueprint-cli@latest claude-code symlink --factoryAiFolder ~/.factory # With custom paths
|
|
165
|
+
|
|
166
|
+
# Setup statusline
|
|
167
|
+
bunx aiblueprint-cli@latest claude-code statusline # Quick statusline setup
|
|
168
|
+
bunx aiblueprint-cli@latest claude-code statusline --folder ~/.my-claude # Custom location
|
|
22
169
|
```
|
|
23
170
|
|
|
24
|
-
|
|
171
|
+
### Hook Types Available
|
|
172
|
+
|
|
173
|
+
- `post-edit-typescript` - Automatic TypeScript file processing (Prettier + ESLint + type checking)
|
|
174
|
+
|
|
175
|
+
### Installation Behavior
|
|
25
176
|
|
|
26
|
-
The
|
|
177
|
+
The CLI intelligently determines where to install configurations:
|
|
178
|
+
|
|
179
|
+
1. **Project Local** (`.claude/` in project root) - When run in a Git repository
|
|
180
|
+
2. **Global** (`~/.claude/`) - When not in a Git repository or with custom folder
|
|
181
|
+
3. **Custom Path** - When using `--folder` option
|
|
182
|
+
|
|
183
|
+
## ✨ Available Features
|
|
184
|
+
|
|
185
|
+
### 🛡️ Shell Shortcuts
|
|
186
|
+
- **`cc`** - Claude Code with permissions skipped (`claude --dangerously-skip-permissions`)
|
|
187
|
+
- **`ccc`** - Claude Code with continue mode (`claude --dangerously-skip-permissions -c`)
|
|
188
|
+
- Platform support: macOS (`.zshenv`), Linux (`.bashrc`/`.zshrc`)
|
|
189
|
+
|
|
190
|
+
### 🔒 Command Validation
|
|
191
|
+
- **700+ line security system** protecting against dangerous bash commands
|
|
192
|
+
- **Real-time validation** before command execution via PreToolUse hooks
|
|
193
|
+
- **Smart detection** of privilege escalation, destructive operations, and command injection
|
|
194
|
+
- **Comprehensive logging** to `~/.claude/security.log` with severity levels
|
|
195
|
+
|
|
196
|
+
### 📊 Custom Statusline
|
|
197
|
+
- **Git integration** - Branch status, changes, and repository info
|
|
198
|
+
- **Cost tracking** - Session costs, daily limits, and token usage via ccusage
|
|
199
|
+
- **Real-time updates** - Command-triggered statusline refresh
|
|
200
|
+
- **Colored output** - Visual indicators for different status types
|
|
201
|
+
- **Quick setup** - Install with one command: `pnpm dlx aiblueprint-cli claude-code statusline`
|
|
202
|
+
|
|
203
|
+
### 🤖 AIBlueprint Commands (16 Available)
|
|
204
|
+
|
|
205
|
+
**Development Workflow**
|
|
206
|
+
- `commit` - Fast conventional commits with immediate push
|
|
207
|
+
- `create-pull-request` - Auto-generated PR creation with templates
|
|
208
|
+
- `fix-pr-comments` - Systematic PR review comment resolution
|
|
209
|
+
- `run-tasks` - Execute GitHub issues with full EPCT workflow
|
|
210
|
+
|
|
211
|
+
**Code Analysis & Research**
|
|
212
|
+
- `deep-code-analysis` - Comprehensive codebase investigation with research
|
|
213
|
+
- `explain-architecture` - Pattern analysis with ASCII diagrams
|
|
214
|
+
- `cleanup-context` - Memory optimization and duplicate removal
|
|
215
|
+
|
|
216
|
+
**Utilities & Automation**
|
|
217
|
+
- `claude-memory` - Context management for long sessions
|
|
218
|
+
- `watch-ci` - Automated CI/CD monitoring and failure fixing
|
|
219
|
+
- `prompt-command` / `prompt-agent` - Template creation utilities
|
|
220
|
+
- `epct` - Systematic Explore-Plan-Code-Test methodology
|
|
221
|
+
|
|
222
|
+
### 🎭 AIBlueprint Agents (3 Specialized)
|
|
223
|
+
|
|
224
|
+
- **explore-codebase** (yellow) - Comprehensive code discovery and analysis
|
|
225
|
+
- **Snipper** (blue) - Rapid code modification specialist with minimal output
|
|
226
|
+
- **websearch** (yellow) - Quick web research with authoritative sources
|
|
227
|
+
|
|
228
|
+
### 🔊 Notification Sounds
|
|
229
|
+
- **Finish sound** - Audio alert for completed operations (macOS afplay)
|
|
230
|
+
- **Need-human sound** - Audio alert for attention requests
|
|
231
|
+
- **Volume control** - Configurable audio levels
|
|
232
|
+
|
|
233
|
+
### 🔗 Symlink Management
|
|
234
|
+
- **Multi-tool integration** - Create symlinks between Claude Code, Codex, OpenCode, and FactoryAI
|
|
235
|
+
- **Interactive selection** - Choose source, content type (commands/agents), and destinations
|
|
236
|
+
- **Smart validation** - Prevents overwriting non-symlink directories and validates paths
|
|
237
|
+
- **Bidirectional sync** - Sync commands and agents in any direction
|
|
238
|
+
- **Supported tools:**
|
|
239
|
+
- **Claude Code** - Commands + Agents (`~/.claude/`)
|
|
240
|
+
- **Codex** - Commands only (`~/.codex/prompts`)
|
|
241
|
+
- **OpenCode** - Commands only (`~/.config/opencode/command`)
|
|
242
|
+
- **FactoryAI** - Commands + Droids/Agents (`~/.factory/`)
|
|
243
|
+
|
|
244
|
+
## ⚙️ Configuration System
|
|
245
|
+
|
|
246
|
+
### Settings.json Structure
|
|
247
|
+
|
|
248
|
+
The CLI automatically manages your `~/.claude/settings.json` with:
|
|
249
|
+
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"statusLine": {
|
|
253
|
+
"type": "command",
|
|
254
|
+
"command": "bun ~/.claude/scripts/statusline/src/index.ts",
|
|
255
|
+
"padding": 0
|
|
256
|
+
},
|
|
257
|
+
"hooks": {
|
|
258
|
+
"PreToolUse": [
|
|
259
|
+
{
|
|
260
|
+
"matcher": "Bash",
|
|
261
|
+
"hooks": [{"type": "command", "command": "bun ~/.claude/scripts/validate-command.js"}]
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"PostToolUse": [
|
|
265
|
+
{
|
|
266
|
+
"matcher": "Edit|Write|MultiEdit",
|
|
267
|
+
"hooks": [{"type": "command", "command": "bun ~/.claude/hooks/hook-post-file.ts"}]
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
```
|
|
27
273
|
|
|
28
|
-
|
|
29
|
-
- **Command validation** - Security hook for bash commands
|
|
30
|
-
- **Custom statusline** - Shows git, costs, tokens info
|
|
31
|
-
- **AIBlueprint commands** - Pre-configured command templates
|
|
32
|
-
- **AIBlueprint agents** - Specialized AI agents
|
|
33
|
-
- **Output styles** - Custom output formatting
|
|
34
|
-
- **Notification sounds** - Audio alerts for events
|
|
274
|
+
### GitHub Integration
|
|
35
275
|
|
|
36
|
-
|
|
276
|
+
- **Remote-first approach** - Always downloads latest configurations from GitHub
|
|
277
|
+
- **Automatic fallback** - Uses local files when GitHub is unavailable
|
|
278
|
+
- **Version independence** - Get updates without CLI updates
|
|
279
|
+
- **Rate limiting aware** - Handles GitHub API limitations gracefully
|
|
37
280
|
|
|
38
|
-
|
|
39
|
-
2. Copies selected configurations to your `.claude` folder
|
|
40
|
-
3. Updates your `~/.claude/settings.json` with new configurations
|
|
41
|
-
4. Installs required dependencies (`bun`, `ccusage`)
|
|
42
|
-
5. Adds shell aliases to your shell configuration file
|
|
281
|
+
## 📚 Templates Catalog
|
|
43
282
|
|
|
44
|
-
###
|
|
283
|
+
### Commands by Category
|
|
45
284
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- `ccc` - Claude Code with permissions skipped and continue mode
|
|
285
|
+
<details>
|
|
286
|
+
<summary><strong>Development Workflow (4 commands)</strong></summary>
|
|
49
287
|
|
|
50
|
-
|
|
288
|
+
| Command | Tools | Purpose |
|
|
289
|
+
|---------|-------|---------|
|
|
290
|
+
| `commit` | `Bash(git :*)` | Quick conventional commits with immediate push |
|
|
291
|
+
| `create-pull-request` | `Bash(git :*)`, `Bash(gh :*)` | PR creation with auto-generated descriptions |
|
|
292
|
+
| `fix-pr-comments` | `Bash(gh :*)`, `Read`, `Edit` | Systematic PR review resolution |
|
|
293
|
+
| `run-tasks` | `Bash(gh :*)`, `Bash(git :*)` | GitHub issue execution with EPCT |
|
|
51
294
|
|
|
52
|
-
|
|
53
|
-
- macOS or Linux
|
|
54
|
-
- Claude Code installed
|
|
295
|
+
</details>
|
|
55
296
|
|
|
56
|
-
|
|
297
|
+
<details>
|
|
298
|
+
<summary><strong>Analysis & Research (2 commands)</strong></summary>
|
|
299
|
+
|
|
300
|
+
| Command | Tools | Purpose |
|
|
301
|
+
|---------|-------|---------|
|
|
302
|
+
| `deep-code-analysis` | `Task`, `WebSearch`, `mcp__context7__*` | Comprehensive codebase investigation |
|
|
303
|
+
| `explain-architecture` | `Read`, `Glob`, `Grep`, `Task` | Architectural pattern analysis |
|
|
304
|
+
|
|
305
|
+
</details>
|
|
306
|
+
|
|
307
|
+
<details>
|
|
308
|
+
<summary><strong>Maintenance & Optimization (2 commands)</strong></summary>
|
|
309
|
+
|
|
310
|
+
| Command | Tools | Purpose |
|
|
311
|
+
|---------|-------|---------|
|
|
312
|
+
| `cleanup-context` | `TodoWrite`, `MultiEdit`, `Glob` | Memory bank optimization |
|
|
313
|
+
| `watch-ci` | `Bash(gh :*)`, `Bash(sleep :*)` | Automated CI monitoring |
|
|
314
|
+
|
|
315
|
+
</details>
|
|
316
|
+
|
|
317
|
+
<details>
|
|
318
|
+
<summary><strong>Utilities (8 commands)</strong></summary>
|
|
319
|
+
|
|
320
|
+
| Command | Tools | Purpose |
|
|
321
|
+
|---------|-------|---------|
|
|
322
|
+
| `claude-memory` | `Read`, `Write`, `Edit`, `Glob` | CLAUDE.md file management |
|
|
323
|
+
| `epct` | `Task` | Explore-Plan-Code-Test methodology |
|
|
324
|
+
| `prompt-command` | `Read`, `Write`, `Edit` | Command template creation |
|
|
325
|
+
| `prompt-agent` | `Read`, `Write`, `Edit` | Agent template creation |
|
|
326
|
+
|
|
327
|
+
</details>
|
|
328
|
+
|
|
329
|
+
### Hooks Available
|
|
330
|
+
|
|
331
|
+
| Hook | Language | Purpose | Triggers |
|
|
332
|
+
|------|----------|---------|----------|
|
|
333
|
+
| `post-edit-typescript` | TypeScript/Bun | File processing after edits | Edit, Write, MultiEdit on .ts/.tsx |
|
|
334
|
+
|
|
335
|
+
### Scripts & Utilities
|
|
336
|
+
|
|
337
|
+
| Script | Language | Purpose |
|
|
338
|
+
|--------|----------|---------|
|
|
339
|
+
| `validate-command.js` | Bun/JavaScript | Security validation for bash commands |
|
|
340
|
+
| `statusline-ccusage.sh` | Bash | Git status and usage tracking display |
|
|
341
|
+
|
|
342
|
+
## 🎯 Installation Targets
|
|
343
|
+
|
|
344
|
+
### Local Project Installation (Recommended)
|
|
345
|
+
|
|
346
|
+
When run in a Git repository, creates `.claude/` in your project root:
|
|
57
347
|
|
|
58
348
|
```bash
|
|
59
|
-
|
|
60
|
-
|
|
349
|
+
cd your-project/
|
|
350
|
+
bunx aiblueprint-cli@latest claude-code setup
|
|
351
|
+
# Creates: your-project/.claude/
|
|
352
|
+
```
|
|
61
353
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
354
|
+
**Benefits:**
|
|
355
|
+
- Project-specific configurations
|
|
356
|
+
- Team collaboration ready
|
|
357
|
+
- Version control friendly
|
|
358
|
+
- Isolated environments
|
|
359
|
+
|
|
360
|
+
### Global Installation
|
|
361
|
+
|
|
362
|
+
When not in a Git repository, uses global directory:
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
cd ~/
|
|
366
|
+
bunx aiblueprint-cli@latest claude-code setup
|
|
367
|
+
# Creates: ~/.claude/
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**Benefits:**
|
|
371
|
+
- System-wide configurations
|
|
372
|
+
- Works across all projects
|
|
373
|
+
- Persistent settings
|
|
374
|
+
|
|
375
|
+
### Custom Path Installation
|
|
376
|
+
|
|
377
|
+
Use `--folder` for specific locations:
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
bunx aiblueprint-cli@latest claude-code setup --folder ./custom-config
|
|
381
|
+
bunx aiblueprint-cli@latest claude-code setup --folder /opt/claude-config
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
## 🔐 Security Features
|
|
385
|
+
|
|
386
|
+
### Command Validation System
|
|
387
|
+
|
|
388
|
+
The security system protects against dangerous operations:
|
|
389
|
+
|
|
390
|
+
**Critical Commands Blocked:**
|
|
391
|
+
- `rm -rf` (with path validation)
|
|
392
|
+
- `dd`, `mkfs`, `fdisk` (disk operations)
|
|
393
|
+
- `chmod 777`, `chown -R` (permission changes)
|
|
394
|
+
- `curl | bash`, `wget | sh` (remote execution)
|
|
395
|
+
- `sudo` operations (privilege escalation)
|
|
396
|
+
|
|
397
|
+
**Security Logging:**
|
|
398
|
+
```json
|
|
399
|
+
{
|
|
400
|
+
"timestamp": "2024-01-15T10:30:00.000Z",
|
|
401
|
+
"command": "rm -rf /",
|
|
402
|
+
"severity": "CRITICAL",
|
|
403
|
+
"action": "BLOCKED",
|
|
404
|
+
"reason": "Destructive command with critical path"
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Safe Paths Allowed:**
|
|
409
|
+
- `./`, `~/`, relative paths
|
|
410
|
+
- `node_modules/`, `.git/`, common safe directories
|
|
411
|
+
- Temporary directories (`/tmp/`, `/var/tmp/`)
|
|
412
|
+
|
|
413
|
+
### Hook-Based Protection
|
|
414
|
+
|
|
415
|
+
- **PreToolUse validation** - Commands checked before execution
|
|
416
|
+
- **Real-time analysis** - Pattern matching and rule evaluation
|
|
417
|
+
- **User confirmation** - Interactive prompts for questionable commands
|
|
418
|
+
- **Comprehensive rules** - 50+ security patterns and checks
|
|
419
|
+
|
|
420
|
+
## 🛠️ Development
|
|
421
|
+
|
|
422
|
+
### Local Development Setup
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
# Clone and setup
|
|
426
|
+
git clone <repository>
|
|
427
|
+
cd aiblueprint-cli
|
|
428
|
+
bun install
|
|
66
429
|
|
|
67
430
|
# Development mode
|
|
68
431
|
bun run dev claude-code setup
|
|
432
|
+
bun run dev claude-code add commands
|
|
433
|
+
|
|
434
|
+
# Testing
|
|
435
|
+
bun run test:run # Run test suite
|
|
436
|
+
bun run dev-test # Test with temporary config
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Build and Release
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
# Build for distribution
|
|
443
|
+
bun run build # Compiles to dist/cli.js
|
|
444
|
+
|
|
445
|
+
# Local testing
|
|
446
|
+
bun run test-local # Creates npm link
|
|
447
|
+
aiblueprint claude-code setup # Test globally
|
|
448
|
+
|
|
449
|
+
# Release (automated)
|
|
450
|
+
bun run release # Version bump, build, tag, publish
|
|
69
451
|
```
|
|
70
452
|
|
|
71
|
-
|
|
453
|
+
### Project Structure
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
src/
|
|
457
|
+
├── cli.ts # Main CLI entry point
|
|
458
|
+
├── commands/
|
|
459
|
+
│ ├── setup.ts # Main setup command
|
|
460
|
+
│ ├── addHook.ts # Hook installation
|
|
461
|
+
│ └── addCommand.ts # Command installation
|
|
462
|
+
└── utils/
|
|
463
|
+
├── claude-config.ts # Configuration utilities
|
|
464
|
+
├── file-installer.ts # GitHub/local fallback
|
|
465
|
+
└── github.ts # GitHub API integration
|
|
466
|
+
|
|
467
|
+
claude-code-config/ # Template repository
|
|
468
|
+
├── commands/ # Command templates
|
|
469
|
+
├── hooks/ # Hook scripts
|
|
470
|
+
├── agents/ # Agent configurations
|
|
471
|
+
├── scripts/ # Utility scripts
|
|
472
|
+
└── song/ # Notification sounds
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
### Testing Commands
|
|
476
|
+
|
|
477
|
+
```bash
|
|
478
|
+
# Test all major workflows
|
|
479
|
+
bun run dev claude-code setup --skip
|
|
480
|
+
bun run dev claude-code add hook post-edit-typescript
|
|
481
|
+
bun run dev claude-code add commands
|
|
482
|
+
bun run dev claude-code add commands commit
|
|
483
|
+
|
|
484
|
+
# Test with custom paths
|
|
485
|
+
bun run dev claude-code setup --folder ./test-config
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
## 📋 Requirements
|
|
489
|
+
|
|
490
|
+
### System Requirements
|
|
491
|
+
- **Runtime**: Node.js 16+ or Bun
|
|
492
|
+
- **Platform**: macOS (full support), Linux (partial), Windows (limited)
|
|
493
|
+
- **Dependencies**: Git (for repository detection)
|
|
494
|
+
|
|
495
|
+
### Claude Code Requirements
|
|
496
|
+
- **Claude Code**: Latest version installed
|
|
497
|
+
- **Permissions**: Ability to modify `~/.claude/settings.json`
|
|
498
|
+
|
|
499
|
+
### Optional Dependencies
|
|
500
|
+
- **bun**: Enhanced script execution and hooks
|
|
501
|
+
- **ccusage**: Advanced statusline with cost tracking
|
|
502
|
+
- **gh CLI**: GitHub integration for PR/issue commands
|
|
503
|
+
- **prettier**, **eslint**: TypeScript hook functionality
|
|
504
|
+
|
|
505
|
+
## 🤝 Contributing
|
|
506
|
+
|
|
507
|
+
1. Fork the repository
|
|
508
|
+
2. Create a feature branch
|
|
509
|
+
3. Make your changes
|
|
510
|
+
4. Run tests: `bun run test:run`
|
|
511
|
+
5. Submit a pull request
|
|
512
|
+
|
|
513
|
+
### Adding New Templates
|
|
514
|
+
|
|
515
|
+
1. Add template files to `claude-code-config/`
|
|
516
|
+
2. Update metadata with YAML frontmatter
|
|
517
|
+
3. Test installation: `bun run dev claude-code add commands <name>`
|
|
518
|
+
4. Document in README
|
|
519
|
+
|
|
520
|
+
## 📄 License
|
|
521
|
+
|
|
522
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
**Created by AIBlueprint** - Enhancing Claude Code for modern development workflows.
|
|
72
527
|
|
|
73
|
-
|
|
528
|
+
Need help? [Open an issue](https://github.com/melvynx/aiblueprint/issues) or check our [documentation](https://docs.aiblueprint.dev).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: action
|
|
3
|
+
description: Conditional action executor - performs actions only when specific conditions are met
|
|
4
|
+
color: purple
|
|
5
|
+
model: haiku
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Batch conditional executor. Handle ≤5 tasks. VERIFY INDEPENDENTLY before each action.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. **VERIFY each item yourself** (never trust input):
|
|
13
|
+
- **Exports/Types**: Grep for `import.*{name}` in codebase
|
|
14
|
+
- **Files**: Check framework patterns via explore-docs, then Grep for imports
|
|
15
|
+
- **Dependencies**: Grep for `from 'pkg'` or `require('pkg')`
|
|
16
|
+
|
|
17
|
+
2. **Execute ONLY if verified unused**:
|
|
18
|
+
- If used → Skip with reason, continue next
|
|
19
|
+
- If unused → Execute action, confirm success
|
|
20
|
+
|
|
21
|
+
3. **Report**: Count executed, count skipped with reasons
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- **MANDATORY**: Verify each item independently using Grep/explore-docs
|
|
26
|
+
- **Skip if used**: Continue to next task
|
|
27
|
+
- **Max 5 tasks**: Process all in batch
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
"Verify and remove: lodash, axios, moment"
|
|
32
|
+
|
|
33
|
+
1. Grep `lodash` → Found in utils.ts → Skip
|
|
34
|
+
2. Grep `axios` → Not found → `pnpm remove axios` → Done
|
|
35
|
+
3. Grep `moment` → Not found → `pnpm remove moment` → Done
|
|
36
|
+
Report: "Removed 2/3: axios, moment. Skipped: lodash (used in utils.ts)"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: explore-codebase
|
|
3
3
|
description: Use this agent whenever you need to explore the codebase to realize a feature.
|
|
4
4
|
color: yellow
|
|
5
|
+
model: haiku
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
You are a codebase exploration specialist. Your only job is to find and present ALL relevant code and logic for the requested feature.
|
|
@@ -55,3 +56,8 @@ Related to: [How it connects to the feature]
|
|
|
55
56
|
- External services to research: [list]
|
|
56
57
|
|
|
57
58
|
Focus on discovering and documenting existing code. Be thorough - include everything that might be relevant.
|
|
59
|
+
|
|
60
|
+
## Exa MCP
|
|
61
|
+
|
|
62
|
+
- You can use Exa web search for quick search
|
|
63
|
+
- Avoid using it too much, maximum 2-3 calls and then use WebSearch. Each call cost 0.05$
|