bootspring generate
Regenerate the CLAUDE.md context file.
Synopsis#
bootspring generate [options]Description#
The generate command regenerates your project's CLAUDE.md file with the latest project information. This ensures your AI assistant always has accurate context.
Options#
| Option | Description |
|---|---|
--full | Full generation including .mcp.json and todo.md |
--output <path> | Custom output path for CLAUDE.md |
--verbose | Show detailed generation output |
--force | Overwrite without confirmation |
Usage Examples#
Basic Generation#
bootspring generateOutput:
Analyzing project...
✓ Detected Next.js 14 (App Router)
✓ Detected TypeScript 5.3
✓ Detected Prisma with PostgreSQL
✓ Found 45 components
✓ Found 12 API routes
Generated CLAUDE.md (12.4 KB)
Full Generation#
bootspring generate --fullRegenerates all Bootspring files:
- CLAUDE.md
- .mcp.json
- todo.md (if doesn't exist)
Custom Output#
bootspring generate --output docs/AI-CONTEXT.mdVerbose Output#
bootspring generate --verboseShows detailed information about what's being detected and included.
What Gets Analyzed#
Project Files#
| Source | Information Extracted |
|---|---|
package.json | Dependencies, scripts, version |
tsconfig.json | TypeScript configuration |
next.config.* | Next.js settings |
prisma/schema.prisma | Database schema |
src/ or app/ | Project structure |
.env.example | Required environment variables |
Git Repository#
| Source | Information Extracted |
|---|---|
.git/ | Branch, remote status |
| Commit history | Recent learnings, patterns |
| Contributors | Team size |
Bootspring State#
| Source | Information Extracted |
|---|---|
bootspring.config.js | Custom settings |
todo.md | Open tasks |
.bootspring/ | Workflow state |
Generated Content#
The CLAUDE.md file includes:
1# Project Name - AI Context
2
3**Generated**: 2024-03-20
4**Bootspring**: v1.x.x
5
6## Project Overview
7[Auto-detected description]
8
9## Tech Stack
10| Category | Technology |
11|----------|------------|
12| Framework | Next.js 14 |
13| Language | TypeScript |
14| ...
15
16## Project Structure
17[Directory tree]
18
19## Conventions
20[Detected code patterns]
21
22## Commands
23[Available npm scripts]
24
25## Current State
26- Phase: [development phase]
27- Open Todos: [count]
28- Health: [status]
29
30## Recent Learnings
31[From git history]
32
33## Custom Sections
34[From config]Customization#
Add Custom Sections#
In bootspring.config.js:
1module.exports = {
2 context: {
3 customSections: [
4 {
5 title: 'Team Conventions',
6 content: `
7 - Use conventional commits
8 - PR reviews required
9 - Deploy only on weekdays
10 `,
11 },
12 ],
13 },
14};Exclude Files#
1module.exports = {
2 context: {
3 exclude: [
4 '**/node_modules/**',
5 '**/dist/**',
6 '**/*.test.ts',
7 '**/fixtures/**',
8 ],
9 },
10};Include Extra Sources#
1module.exports = {
2 context: {
3 include: [
4 'docs/ARCHITECTURE.md',
5 'docs/API.md',
6 '.github/CONTRIBUTING.md',
7 ],
8 },
9};When to Regenerate#
Automatically Recommended#
- After adding new dependencies
- When project structure changes
- After major feature additions
- When onboarding new team members
Manual Triggers#
1# After npm install
2npm install some-package && bootspring generate
3
4# After significant changes
5git pull && bootspring generate
6
7# Before AI-assisted work sessions
8bootspring generate && claudeCI Integration#
Add to your CI pipeline:
1# .github/workflows/context.yml
2name: Update Context
3
4on:
5 push:
6 branches: [main]
7 paths:
8 - 'package.json'
9 - 'prisma/schema.prisma'
10 - 'src/**'
11
12jobs:
13 update:
14 runs-on: ubuntu-latest
15 steps:
16 - uses: actions/checkout@v4
17 - uses: actions/setup-node@v4
18 - run: npm ci
19 - run: npx bootspring generate
20 - uses: stefanzweifel/git-auto-commit-action@v5
21 with:
22 commit_message: 'chore: update AI context'
23 file_pattern: 'CLAUDE.md'Troubleshooting#
Detection Issues#
# Show what's being detected
bootspring generate --verboseOverride Detection#
1// bootspring.config.js
2module.exports = {
3 stack: {
4 frontend: ['react', 'nextjs'], // Override auto-detection
5 database: ['postgresql', 'prisma'],
6 },
7};Large Projects#
For large projects, limit scope:
1module.exports = {
2 context: {
3 maxSize: 50000, // Limit to 50KB
4 exclude: ['**/vendor/**', '**/generated/**'],
5 },
6};Related Commands#
bootspring init- Initial setupbootspring status- Check project statusbootspring context- MCP tool equivalent