@nclamvn/vibecode-cli 1.7.0 → 1.8.1

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.
Files changed (67) hide show
  1. package/SESSION_NOTES.md +119 -0
  2. package/bin/vibecode.js +53 -0
  3. package/package.json +1 -1
  4. package/src/commands/ask.js +230 -0
  5. package/src/commands/docs.js +167 -0
  6. package/src/commands/git.js +103 -2
  7. package/src/commands/migrate.js +341 -0
  8. package/src/commands/refactor.js +205 -0
  9. package/src/commands/review.js +126 -1
  10. package/src/commands/security.js +229 -0
  11. package/src/commands/test.js +194 -0
  12. package/src/config/constants.js +5 -1
  13. package/src/index.js +8 -0
  14. package/docs-site/README.md +0 -41
  15. package/docs-site/blog/2019-05-28-first-blog-post.md +0 -12
  16. package/docs-site/blog/2019-05-29-long-blog-post.md +0 -44
  17. package/docs-site/blog/2021-08-01-mdx-blog-post.mdx +0 -24
  18. package/docs-site/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
  19. package/docs-site/blog/2021-08-26-welcome/index.md +0 -29
  20. package/docs-site/blog/authors.yml +0 -25
  21. package/docs-site/blog/tags.yml +0 -19
  22. package/docs-site/docs/commands/agent.md +0 -162
  23. package/docs-site/docs/commands/assist.md +0 -71
  24. package/docs-site/docs/commands/build.md +0 -53
  25. package/docs-site/docs/commands/config.md +0 -30
  26. package/docs-site/docs/commands/debug.md +0 -173
  27. package/docs-site/docs/commands/doctor.md +0 -34
  28. package/docs-site/docs/commands/go.md +0 -128
  29. package/docs-site/docs/commands/index.md +0 -79
  30. package/docs-site/docs/commands/init.md +0 -42
  31. package/docs-site/docs/commands/learn.md +0 -82
  32. package/docs-site/docs/commands/lock.md +0 -33
  33. package/docs-site/docs/commands/plan.md +0 -29
  34. package/docs-site/docs/commands/review.md +0 -31
  35. package/docs-site/docs/commands/snapshot.md +0 -34
  36. package/docs-site/docs/commands/start.md +0 -32
  37. package/docs-site/docs/commands/status.md +0 -37
  38. package/docs-site/docs/commands/undo.md +0 -83
  39. package/docs-site/docs/configuration.md +0 -72
  40. package/docs-site/docs/faq.md +0 -83
  41. package/docs-site/docs/getting-started.md +0 -119
  42. package/docs-site/docs/guides/agent-mode.md +0 -94
  43. package/docs-site/docs/guides/debug-mode.md +0 -83
  44. package/docs-site/docs/guides/magic-mode.md +0 -107
  45. package/docs-site/docs/installation.md +0 -98
  46. package/docs-site/docs/intro.md +0 -67
  47. package/docs-site/docusaurus.config.ts +0 -141
  48. package/docs-site/package-lock.json +0 -18039
  49. package/docs-site/package.json +0 -48
  50. package/docs-site/sidebars.ts +0 -70
  51. package/docs-site/src/components/HomepageFeatures/index.tsx +0 -72
  52. package/docs-site/src/components/HomepageFeatures/styles.module.css +0 -16
  53. package/docs-site/src/css/custom.css +0 -30
  54. package/docs-site/src/pages/index.module.css +0 -23
  55. package/docs-site/src/pages/index.tsx +0 -44
  56. package/docs-site/src/pages/markdown-page.md +0 -7
  57. package/docs-site/src/theme/Footer/index.tsx +0 -127
  58. package/docs-site/src/theme/Footer/styles.module.css +0 -285
  59. package/docs-site/static/.nojekyll +0 -0
  60. package/docs-site/static/img/docusaurus-social-card.jpg +0 -0
  61. package/docs-site/static/img/docusaurus.png +0 -0
  62. package/docs-site/static/img/favicon.ico +0 -0
  63. package/docs-site/static/img/logo.svg +0 -1
  64. package/docs-site/static/img/undraw_docusaurus_mountain.svg +0 -171
  65. package/docs-site/static/img/undraw_docusaurus_react.svg +0 -170
  66. package/docs-site/static/img/undraw_docusaurus_tree.svg +0 -40
  67. package/docs-site/tsconfig.json +0 -8
@@ -1,83 +0,0 @@
1
- ---
2
- sidebar_position: 8
3
- ---
4
-
5
- # FAQ
6
-
7
- Frequently asked questions about Vibecode CLI.
8
-
9
- ## General
10
-
11
- ### What is Vibecode?
12
-
13
- Vibecode is a CLI tool for AI-assisted software development with built-in discipline and guardrails.
14
-
15
- ### Is it free?
16
-
17
- Yes, Vibecode CLI is open source and free. However, you need an Anthropic API key for Claude Code.
18
-
19
- ### What models does it use?
20
-
21
- Vibecode uses Claude Code CLI which uses Claude 3.5 Sonnet by default.
22
-
23
- ## Installation
24
-
25
- ### Why do I need Claude Code?
26
-
27
- Claude Code provides the AI capabilities for code generation, debugging, and assistance.
28
-
29
- ### Node.js version error?
30
-
31
- Upgrade to Node.js 18 or higher:
32
- ```bash
33
- nvm install 20
34
- nvm use 20
35
- ```
36
-
37
- ## Usage
38
-
39
- ### Magic Mode vs Agent Mode?
40
-
41
- - **Magic Mode** (`go`): Single-module projects, quick prototypes
42
- - **Agent Mode** (`agent`): Complex multi-module systems
43
-
44
- ### How do I undo changes?
45
-
46
- ```bash
47
- vibecode undo --list # See available backups
48
- vibecode undo # Interactive restore
49
- ```
50
-
51
- ### How does learning work?
52
-
53
- After each fix, Vibecode asks for feedback. This helps improve future suggestions.
54
-
55
- ## Troubleshooting
56
-
57
- ### Build failed?
58
-
59
- 1. Check logs: `cat .vibecode/sessions/*/evidence/build.log`
60
- 2. Try iterative mode: `vibecode go "desc" --iterate`
61
- 3. Use debug: `vibecode debug --auto`
62
-
63
- ### Tests failing?
64
-
65
- Run with strict mode to see issues:
66
- ```bash
67
- vibecode build --iterate --strict
68
- ```
69
-
70
- ### Claude Code not found?
71
-
72
- ```bash
73
- npm install -g @anthropic-ai/claude-code
74
- ```
75
-
76
- ## Contributing
77
-
78
- ### How can I contribute?
79
-
80
- - Report issues on GitHub
81
- - Submit pull requests
82
- - Improve documentation
83
- - Share feedback
@@ -1,119 +0,0 @@
1
- ---
2
- sidebar_position: 2
3
- ---
4
-
5
- # Getting Started
6
-
7
- Get up and running with Vibecode CLI in minutes.
8
-
9
- ## Prerequisites
10
-
11
- Before installing Vibecode, ensure you have:
12
-
13
- 1. **Node.js 18+**
14
- ```bash
15
- node --version # Should be v18.0.0 or higher
16
- ```
17
-
18
- 2. **Claude Code CLI** (for AI features)
19
- ```bash
20
- npm install -g @anthropic-ai/claude-code
21
- ```
22
-
23
- ## Installation
24
-
25
- Install Vibecode globally:
26
-
27
- ```bash
28
- npm install -g @nclamvn/vibecode-cli
29
- ```
30
-
31
- Verify installation:
32
-
33
- ```bash
34
- vibecode --version
35
- # Output: 1.6.0
36
- ```
37
-
38
- ## Your First Project
39
-
40
- ### Option 1: Interactive Wizard
41
-
42
- Simply run `vibecode` with no arguments:
43
-
44
- ```bash
45
- vibecode
46
- ```
47
-
48
- You'll see an interactive menu:
49
-
50
- ```
51
- ? Bạn muốn làm gì hôm nay?
52
- 🚀 Tạo project mới nhanh (go)
53
- 🤖 Build project phức tạp (agent)
54
- 🔧 Debug lỗi (debug)
55
- 💬 Hỏi AI (assist)
56
- 📊 Xem trạng thái
57
- ```
58
-
59
- ### Option 2: Magic Mode
60
-
61
- Build a complete project with one command:
62
-
63
- ```bash
64
- vibecode go "A todo app with React and local storage"
65
- ```
66
-
67
- Vibecode will:
68
- 1. Create project directory
69
- 2. Capture requirements
70
- 3. Design architecture
71
- 4. Generate code
72
- 5. Run tests
73
- 6. Show results
74
-
75
- ### Option 3: Step-by-Step Workflow
76
-
77
- For more control, use the guided workflow:
78
-
79
- ```bash
80
- # Initialize workspace
81
- vibecode init
82
-
83
- # Start guided session
84
- vibecode start
85
-
86
- # ... follow prompts ...
87
-
88
- # Build with AI
89
- vibecode build --auto
90
-
91
- # Review results
92
- vibecode review
93
- ```
94
-
95
- ## Project Structure
96
-
97
- After running `vibecode init`, your project will have:
98
-
99
- ```
100
- your-project/
101
- ├── .vibecode/
102
- │ ├── state.json # Current state
103
- │ ├── sessions/ # Session data
104
- │ │ └── [session-id]/
105
- │ │ ├── intake.md # Requirements
106
- │ │ ├── blueprint.md # Architecture
107
- │ │ ├── contract.md # Locked spec
108
- │ │ ├── plan.md # Execution plan
109
- │ │ └── evidence/ # Build logs
110
- │ ├── backups/ # Auto-backups
111
- │ └── learning/ # AI learnings
112
- └── ... your code files
113
- ```
114
-
115
- ## Next Steps
116
-
117
- - [Commands Overview](./commands) - Learn all available commands
118
- - [Magic Mode Guide](./guides/magic-mode) - Deep dive into `vibecode go`
119
- - [Configuration](./configuration) - Customize Vibecode behavior
@@ -1,94 +0,0 @@
1
- ---
2
- sidebar_position: 2
3
- ---
4
-
5
- # Agent Mode Guide
6
-
7
- Build complex multi-module projects with autonomous agents.
8
-
9
- ## Overview
10
-
11
- Agent Mode decomposes large projects into modules, builds each sequentially, and uses self-healing to recover from errors.
12
-
13
- ## When to Use Agent Mode
14
-
15
- ✅ **Good for:**
16
- - Complex full-stack applications
17
- - Projects with multiple features
18
- - Systems with many integrations
19
- - Production-grade builds
20
-
21
- ## Architecture
22
-
23
- ```
24
- ┌─────────────────────────────────────────┐
25
- │ Orchestrator │
26
- ├─────────────────────────────────────────┤
27
- │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
28
- │ │Decompose│→│ Build │→│ Verify │ │
29
- │ └─────────┘ └─────────┘ └─────────┘ │
30
- │ ↓ ↓ ↓ │
31
- │ ┌─────────────────────────────────┐ │
32
- │ │ Memory Engine │ │
33
- │ └─────────────────────────────────┘ │
34
- │ ↓ │
35
- │ ┌─────────────────────────────────┐ │
36
- │ │ Self-Healing Engine │ │
37
- │ └─────────────────────────────────┘ │
38
- └─────────────────────────────────────────┘
39
- ```
40
-
41
- ## Module Types
42
-
43
- Agent Mode recognizes common module patterns:
44
-
45
- - **auth** - Authentication/authorization
46
- - **api** - REST/GraphQL endpoints
47
- - **database** - Schema and models
48
- - **ui** - Frontend components
49
- - **admin** - Admin dashboard
50
- - **integration** - Third-party services
51
-
52
- ## Example: E-commerce
53
-
54
- ```bash
55
- vibecode agent "E-commerce platform with:
56
- - User authentication (email, OAuth)
57
- - Product catalog with categories
58
- - Shopping cart with sessions
59
- - Checkout with Stripe
60
- - Admin dashboard
61
- - Order management"
62
- ```
63
-
64
- Agent decomposes into:
65
- 1. `auth` - User system
66
- 2. `products` - Catalog
67
- 3. `cart` - Shopping cart
68
- 4. `checkout` - Payment
69
- 5. `admin` - Dashboard
70
- 6. `orders` - Management
71
-
72
- ## Self-Healing
73
-
74
- When a module fails:
75
-
76
- 1. **Analyze** - Identify error pattern
77
- 2. **Hypothesize** - Generate fix
78
- 3. **Apply** - Make changes
79
- 4. **Verify** - Re-test
80
- 5. **Learn** - Store pattern
81
-
82
- Max 3 retries per module by default.
83
-
84
- ## Memory System
85
-
86
- Agent remembers:
87
- - Successful build patterns
88
- - Common error fixes
89
- - Technology preferences
90
-
91
- View with:
92
- ```bash
93
- vibecode agent --status
94
- ```
@@ -1,83 +0,0 @@
1
- ---
2
- sidebar_position: 3
3
- ---
4
-
5
- # Debug Mode Guide
6
-
7
- Master the 9-step intelligent debugging protocol.
8
-
9
- ## Overview
10
-
11
- Debug Mode uses a systematic approach to identify, fix, and prevent bugs.
12
-
13
- ## The 9 Steps
14
-
15
- ### Step 1: Evidence
16
- Collect information about the error from:
17
- - Error logs
18
- - Stack traces
19
- - User descriptions
20
- - Screenshots
21
-
22
- ### Step 2: Reproduce
23
- Confirm the error exists by running:
24
- - Type checking
25
- - Build commands
26
- - Test suites
27
-
28
- ### Step 3: Analyze
29
- Identify root cause:
30
- - Pattern matching
31
- - AI analysis
32
- - Category detection
33
-
34
- ### Step 4: Hypothesize
35
- Generate fix hypotheses:
36
- - Ranked by confidence
37
- - Based on past successes
38
- - Multiple approaches
39
-
40
- ### Step 5: Test
41
- Validate the approach:
42
- - Generate fix prompt
43
- - Prepare changes
44
-
45
- ### Step 6: Fix
46
- Apply fix via Claude Code:
47
- - Make changes
48
- - Log evidence
49
-
50
- ### Step 7: Verify
51
- Confirm fix works:
52
- - Re-run tests
53
- - Check functionality
54
-
55
- ### Step 8: Document
56
- Log for future:
57
- - Store fix pattern
58
- - Update history
59
-
60
- ### Step 9: Prevent
61
- Add prevention rules:
62
- - Update CLAUDE.md
63
- - Add warnings
64
-
65
- ## Error Categories
66
-
67
- | Category | Examples |
68
- |----------|----------|
69
- | RUNTIME | undefined, null, type errors |
70
- | SYNTAX | Unexpected tokens |
71
- | MODULE | Missing imports |
72
- | FILE | ENOENT |
73
- | NETWORK | ECONNREFUSED |
74
- | NPM | Dependency issues |
75
- | DATABASE | Connection, query errors |
76
- | TYPESCRIPT | Type mismatches |
77
-
78
- ## Tips
79
-
80
- 1. **Be specific** - Include full error message
81
- 2. **Use auto mode** - Let AI scan for all errors
82
- 3. **Provide context** - Mention what you were doing
83
- 4. **Give feedback** - Help AI learn from fixes
@@ -1,107 +0,0 @@
1
- ---
2
- sidebar_position: 1
3
- ---
4
-
5
- # Magic Mode Guide
6
-
7
- A comprehensive guide to using `vibecode go` for one-command project building.
8
-
9
- ## Overview
10
-
11
- Magic Mode is Vibecode's flagship feature - describe what you want, and it builds the entire project automatically.
12
-
13
- ## When to Use Magic Mode
14
-
15
- ✅ **Good for:**
16
- - Prototypes and MVPs
17
- - Landing pages
18
- - Simple full-stack apps
19
- - Learning projects
20
-
21
- ❌ **Consider Agent Mode for:**
22
- - Complex multi-module systems
23
- - Enterprise applications
24
- - Projects with many integrations
25
-
26
- ## Best Practices
27
-
28
- ### 1. Be Specific
29
-
30
- ```bash
31
- # ❌ Too vague
32
- vibecode go "a website"
33
-
34
- # ✅ Specific
35
- vibecode go "Landing page for a SaaS product with hero, features, pricing, and contact sections using React and Tailwind"
36
- ```
37
-
38
- ### 2. Mention Tech Stack
39
-
40
- ```bash
41
- vibecode go "Todo app with React, TypeScript, and local storage"
42
- ```
43
-
44
- ### 3. Include Key Features
45
-
46
- ```bash
47
- vibecode go "Blog platform with markdown support, categories, search, and dark mode"
48
- ```
49
-
50
- ### 4. Use Templates
51
-
52
- ```bash
53
- vibecode go "My startup landing" --template landing
54
- ```
55
-
56
- ## Understanding the Process
57
-
58
- ### Phase 1: Initialization (5%)
59
- - Creates project directory
60
- - Sets up workspace structure
61
-
62
- ### Phase 2: Requirements (10%)
63
- - Parses your description
64
- - Generates intake document
65
-
66
- ### Phase 3: Architecture (15%)
67
- - Designs system blueprint
68
- - Identifies components
69
-
70
- ### Phase 4: Contract (20%)
71
- - Creates acceptance criteria
72
- - Defines deliverables
73
-
74
- ### Phase 5: Planning (25%)
75
- - Generates execution plan
76
- - Prepares coder pack
77
-
78
- ### Phase 6: Building (85%)
79
- - Claude Code generates files
80
- - Implements features
81
-
82
- ### Phase 7: Testing (95%)
83
- - Runs automated tests
84
- - Validates functionality
85
-
86
- ## Troubleshooting
87
-
88
- ### Build Failed
89
-
90
- ```bash
91
- # Check logs
92
- cat .vibecode/sessions/*/evidence/build.log
93
-
94
- # Try iterative mode
95
- vibecode go "your description" --iterate
96
- ```
97
-
98
- ### Tests Failing
99
-
100
- ```bash
101
- # Use strict mode to see issues
102
- vibecode go "your description" --iterate --strict
103
- ```
104
-
105
- ### Missing Features
106
-
107
- Be more explicit in your description or use `vibecode assist` to add features after initial build.
@@ -1,98 +0,0 @@
1
- ---
2
- sidebar_position: 3
3
- ---
4
-
5
- # Installation
6
-
7
- Complete guide to installing Vibecode CLI.
8
-
9
- ## System Requirements
10
-
11
- | Requirement | Minimum | Recommended |
12
- |-------------|---------|-------------|
13
- | Node.js | 18.0.0 | 20.x LTS |
14
- | npm | 9.0.0 | Latest |
15
- | OS | macOS, Linux, Windows | macOS, Linux |
16
- | RAM | 4 GB | 8 GB+ |
17
-
18
- ## Install via npm
19
-
20
- ```bash
21
- npm install -g @nclamvn/vibecode-cli
22
- ```
23
-
24
- ## Install Claude Code (Required for AI features)
25
-
26
- Vibecode uses Claude Code CLI for AI-powered features:
27
-
28
- ```bash
29
- npm install -g @anthropic-ai/claude-code
30
- ```
31
-
32
- Set up your Anthropic API key:
33
- ```bash
34
- export ANTHROPIC_API_KEY="your-api-key"
35
- ```
36
-
37
- ## Verify Installation
38
-
39
- ```bash
40
- # Check Vibecode version
41
- vibecode --version
42
-
43
- # Check Claude Code
44
- claude --version
45
-
46
- # Run doctor to verify setup
47
- vibecode doctor
48
- ```
49
-
50
- ## Updating
51
-
52
- ```bash
53
- npm update -g @nclamvn/vibecode-cli
54
- ```
55
-
56
- ## Uninstalling
57
-
58
- ```bash
59
- npm uninstall -g @nclamvn/vibecode-cli
60
- ```
61
-
62
- ## Troubleshooting
63
-
64
- ### Permission Errors
65
-
66
- If you get `EACCES` errors:
67
-
68
- ```bash
69
- # Option 1: Use npx
70
- npx @nclamvn/vibecode-cli
71
-
72
- # Option 2: Fix npm permissions
73
- mkdir ~/.npm-global
74
- npm config set prefix '~/.npm-global'
75
- echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
76
- source ~/.bashrc
77
- ```
78
-
79
- ### Node.js Version Issues
80
-
81
- ```bash
82
- # Check version
83
- node --version
84
-
85
- # Use nvm to install correct version
86
- nvm install 20
87
- nvm use 20
88
- ```
89
-
90
- ### Claude Code Not Found
91
-
92
- ```bash
93
- # Verify installation
94
- which claude
95
-
96
- # Reinstall if needed
97
- npm install -g @anthropic-ai/claude-code
98
- ```
@@ -1,67 +0,0 @@
1
- ---
2
- sidebar_position: 1
3
- ---
4
-
5
- # Introduction
6
-
7
- **Vibecode CLI** is a command-line tool that helps you build software with AI assistance while maintaining discipline and control.
8
-
9
- ## What is Vibecode?
10
-
11
- Vibecode provides a structured workflow for AI-assisted software development:
12
-
13
- - **Guided Process**: From requirements capture to deployment
14
- - **AI Integration**: Powered by Claude Code for intelligent code generation
15
- - **Quality Guardrails**: Built-in testing, review, and rollback capabilities
16
- - **Learning System**: AI improves from your feedback over time
17
-
18
- ## Key Features
19
-
20
- ### Magic Mode (`vibecode go`)
21
- One command to build an entire project:
22
- ```bash
23
- vibecode go "Landing page for my SaaS startup"
24
- ```
25
-
26
- ### Agent Mode (`vibecode agent`)
27
- Multi-module autonomous building with self-healing:
28
- ```bash
29
- vibecode agent "E-commerce platform with auth, products, and checkout"
30
- ```
31
-
32
- ### Debug Mode (`vibecode debug`)
33
- Intelligent 9-step bug fixing:
34
- ```bash
35
- vibecode debug "TypeError in user authentication"
36
- ```
37
-
38
- ### Undo & Learn
39
- Auto-backup with rollback, and AI that learns from your feedback:
40
- ```bash
41
- vibecode undo --list
42
- vibecode learn --stats
43
- ```
44
-
45
- ## Quick Start
46
-
47
- ```bash
48
- # Install globally
49
- npm install -g @nclamvn/vibecode-cli
50
-
51
- # Run interactive wizard
52
- vibecode
53
-
54
- # Or start with Magic Mode
55
- vibecode go "Your project description"
56
- ```
57
-
58
- ## Requirements
59
-
60
- - Node.js 18.0.0 or higher
61
- - Claude Code CLI (`npm install -g @anthropic-ai/claude-code`)
62
-
63
- ## Next Steps
64
-
65
- - [Getting Started](./getting-started) - First steps with Vibecode
66
- - [Installation](./installation) - Detailed installation guide
67
- - [Commands](./commands) - All available commands