@thanhvn14/csvibe 0.1.6 → 0.1.7
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/LICENSE +21 -21
- package/README.md +391 -391
- package/bin/csvibe.js +8 -8
- package/dist/commands/init/phases/validation-handler.d.ts.map +1 -1
- package/dist/commands/init/phases/validation-handler.js +3 -0
- package/dist/commands/init/phases/validation-handler.js.map +1 -1
- package/dist/domains/github/github-client.d.ts.map +1 -1
- package/dist/utils/downloader.js +33 -33
- package/dist/utils/git.d.ts +5 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +29 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/scaffolder.d.ts.map +1 -1
- package/dist/utils/scaffolder.js +34 -12
- package/dist/utils/scaffolder.js.map +1 -1
- package/package.json +53 -53
- package/test-jira-prompt.js +32 -32
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Thanh Vu
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Thanh Vu
|
|
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
CHANGED
|
@@ -1,391 +1,391 @@
|
|
|
1
|
-
# CSVibe CLI
|
|
2
|
-
|
|
3
|
-
CSVibe CLI - GitHub Copilot Vibecoding Workflow
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- **Node.js** >= 16.0.0 ([Download](https://nodejs.org/))
|
|
8
|
-
- **GitHub CLI (gh)** ([Installation Guide](https://github.com/cli/cli#installation))
|
|
9
|
-
- **Access** to `thanhvu0895/csvibe-engine` private repository
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
### Global Installation
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install -g @thanhvn14/csvibe
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Verify Installation
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
csvibe --version
|
|
23
|
-
csvibe --help
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Quick Start
|
|
27
|
-
|
|
28
|
-
1. **Authenticate GitHub CLI:**
|
|
29
|
-
```bash
|
|
30
|
-
gh auth login
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
2. **Initialize vibecoding in your project:**
|
|
34
|
-
```bash
|
|
35
|
-
cd my-project
|
|
36
|
-
csvibe init
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
3. **Start coding with AI:**
|
|
40
|
-
Open your project in VSCode and use GitHub Copilot with the installed `.agent` files.
|
|
41
|
-
|
|
42
|
-
## Commands
|
|
43
|
-
|
|
44
|
-
### `csvibe --version`
|
|
45
|
-
Display CLI version.
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
$ csvibe --version
|
|
49
|
-
csvibe v0.1.0
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### `csvibe --help`
|
|
53
|
-
Display usage information.
|
|
54
|
-
|
|
55
|
-
### `csvibe help`
|
|
56
|
-
Display detailed help with prerequisites, examples, and documentation links.
|
|
57
|
-
|
|
58
|
-
### `csvibe init`
|
|
59
|
-
|
|
60
|
-
Bootstrap vibecoding workflow in your project.
|
|
61
|
-
|
|
62
|
-
**What it does:**
|
|
63
|
-
1. Validates GitHub CLI authentication and repository access
|
|
64
|
-
2. Detects project type (Node.js, Python, Rust, monorepo)
|
|
65
|
-
3. Prompts for Jira credentials (interactive)
|
|
66
|
-
4. Creates `.github/agents/`, `.github/prompts/`, `.github/instructions/` directories
|
|
67
|
-
5. Downloads agent templates from `csvibe-engine` repository
|
|
68
|
-
6. Generates `.csvibe/config.yml` with project and Jira configuration
|
|
69
|
-
7. Updates `.gitignore` with CSVibe entries
|
|
70
|
-
8. Validates VSCode and GitHub Copilot installation (non-blocking)
|
|
71
|
-
|
|
72
|
-
**Example:**
|
|
73
|
-
```bash
|
|
74
|
-
cd my-project
|
|
75
|
-
csvibe init
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**Interactive Prompts:**
|
|
79
|
-
- Jira URL (e.g., `https://company.atlassian.net`)
|
|
80
|
-
- Jira Email
|
|
81
|
-
- Jira API Token ([How to create](https://id.atlassian.com/manage-profile/security/api-tokens))
|
|
82
|
-
- Jira Project Key (e.g., `PROJ`, `QS`)
|
|
83
|
-
|
|
84
|
-
**Generated Structure:**
|
|
85
|
-
```
|
|
86
|
-
my-project/
|
|
87
|
-
├── .github/
|
|
88
|
-
│ ├── agents/ # Agent templates from csvibe-engine
|
|
89
|
-
│ ├── prompts/ # Prompt templates
|
|
90
|
-
│ └── instructions/ # Instruction templates
|
|
91
|
-
├── .csvibe/
|
|
92
|
-
│ ├── config.yml # Project and Jira configuration
|
|
93
|
-
│ ├── state/ # Pipeline state (gitignored)
|
|
94
|
-
│ └── cache/ # Cache directory (gitignored)
|
|
95
|
-
└── .gitignore # Updated with CSVibe entries
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### `csvibe scout`
|
|
99
|
-
|
|
100
|
-
Analyze project structure and gather context for AI planning.
|
|
101
|
-
|
|
102
|
-
**What it does:**
|
|
103
|
-
1. Validates project initialization (`.csvibe/state/` must exist)
|
|
104
|
-
2. Detects project type (Node.js, Python, Rust, monorepo)
|
|
105
|
-
3. Analyzes directory structure (source, tests, config)
|
|
106
|
-
4. Extracts dependencies from manifest files
|
|
107
|
-
5. Infers tech stack from dependencies
|
|
108
|
-
6. Detects build tool from lock files
|
|
109
|
-
7. Generates architecture summary
|
|
110
|
-
8. Outputs context to `.csvibe/state/scout-context.json`
|
|
111
|
-
|
|
112
|
-
**Example:**
|
|
113
|
-
```bash
|
|
114
|
-
cd my-project
|
|
115
|
-
csvibe scout
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Custom Output Path:**
|
|
119
|
-
```bash
|
|
120
|
-
csvibe scout -o custom-path.json
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Output Schema:**
|
|
124
|
-
```json
|
|
125
|
-
{
|
|
126
|
-
"projectType": "node",
|
|
127
|
-
"techStack": ["TypeScript", "React", "Vite"],
|
|
128
|
-
"directories": {
|
|
129
|
-
"source": ["src", "lib"],
|
|
130
|
-
"tests": ["tests"],
|
|
131
|
-
"config": ["."]
|
|
132
|
-
},
|
|
133
|
-
"dependencies": {
|
|
134
|
-
"react": "^18.2.0",
|
|
135
|
-
"typescript": "^5.0.0"
|
|
136
|
-
},
|
|
137
|
-
"buildTool": "npm",
|
|
138
|
-
"architecture": "node with TypeScript, React, Vite"
|
|
139
|
-
}
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**Supported Project Types:**
|
|
143
|
-
- **Node.js:** package.json-based projects
|
|
144
|
-
- **Node.js Monorepo:** Projects with pnpm-workspace.yaml, lerna.json, nx.json, or turbo.json
|
|
145
|
-
- **Python:** pyproject.toml, requirements.txt, or Pipfile
|
|
146
|
-
- **Rust:** Cargo.toml projects
|
|
147
|
-
|
|
148
|
-
**Detected Tech Stack:**
|
|
149
|
-
- Frontend: React, Vue, Angular, Svelte, Next.js, Nuxt
|
|
150
|
-
- Backend: Express, Fastify, NestJS, Django, FastAPI, Flask, Actix
|
|
151
|
-
- CSS: Tailwind CSS, MUI, Bootstrap
|
|
152
|
-
- Databases: PostgreSQL, MongoDB, MySQL, Redis
|
|
153
|
-
- Build Tools: Vite, Webpack, Rollup, Turbopack
|
|
154
|
-
- Testing: Vitest, Jest, Pytest, Mocha
|
|
155
|
-
|
|
156
|
-
**Build Tool Detection:**
|
|
157
|
-
- **pnpm:** pnpm-lock.yaml
|
|
158
|
-
- **yarn:** yarn.lock
|
|
159
|
-
- **bun:** bun.lockb
|
|
160
|
-
- **npm:** package-lock.json (default)
|
|
161
|
-
- **poetry:** poetry.lock
|
|
162
|
-
- **pipenv:** Pipfile.lock
|
|
163
|
-
- **pip:** (default for Python)
|
|
164
|
-
- **cargo:** (Rust projects)
|
|
165
|
-
|
|
166
|
-
### `csvibe brainstorm`
|
|
167
|
-
|
|
168
|
-
Generate solution approaches with trade-off analysis using GitHub Copilot Chat.
|
|
169
|
-
|
|
170
|
-
**What it does:**
|
|
171
|
-
1. Validates project initialization and scout phase completion
|
|
172
|
-
2. Prompts for requirement description
|
|
173
|
-
3. Guides you to use @brainstorm in GitHub Copilot Chat
|
|
174
|
-
4. Watches for approaches.json creation
|
|
175
|
-
5. Validates and displays generated approaches
|
|
176
|
-
6. Prepares for plan phase
|
|
177
|
-
|
|
178
|
-
**Prerequisites:**
|
|
179
|
-
- Project initialized with `csvibe init`
|
|
180
|
-
- Scout analysis completed with `csvibe scout`
|
|
181
|
-
- GitHub Copilot extension active in VSCode
|
|
182
|
-
|
|
183
|
-
**Example:**
|
|
184
|
-
```bash
|
|
185
|
-
cd my-project
|
|
186
|
-
csvibe brainstorm
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**Workflow:**
|
|
190
|
-
1. CLI prompts: "What feature or functionality do you want to add?"
|
|
191
|
-
2. You answer: "Add JWT authentication"
|
|
192
|
-
3. CLI displays Copilot Chat command to run
|
|
193
|
-
4. You open Copilot Chat and run: `@brainstorm generate approaches for: Add JWT authentication`
|
|
194
|
-
5. Copilot generates 2-3 approaches with pros/cons
|
|
195
|
-
6. You copy JSON output to `.csvibe/state/approaches.json`
|
|
196
|
-
7. CLI validates and displays summary
|
|
197
|
-
8. Ready for `csvibe plan`
|
|
198
|
-
|
|
199
|
-
**Custom Output Path:**
|
|
200
|
-
```bash
|
|
201
|
-
csvibe brainstorm -o custom-approaches.json
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
**Output Schema:**
|
|
205
|
-
```json
|
|
206
|
-
{
|
|
207
|
-
"requirement": "Add JWT authentication",
|
|
208
|
-
"approaches": [
|
|
209
|
-
{
|
|
210
|
-
"name": "JWT with Passport.js (Simple)",
|
|
211
|
-
"strategy": "Use existing Passport middleware...",
|
|
212
|
-
"technologies": ["passport", "passport-jwt", "jsonwebtoken"],
|
|
213
|
-
"pros": ["Battle-tested", "Rich ecosystem", "Minimal code"],
|
|
214
|
-
"cons": ["Session complexity", "Cookie security"],
|
|
215
|
-
"effort": "5-8 hours"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"name": "Custom JWT Middleware (Moderate)",
|
|
219
|
-
"strategy": "Create custom Express middleware...",
|
|
220
|
-
"technologies": ["jsonwebtoken", "bcryptjs"],
|
|
221
|
-
"pros": ["Full control", "Lighter weight", "Easier debugging"],
|
|
222
|
-
"cons": ["More code", "Edge cases", "Security risks"],
|
|
223
|
-
"effort": "8-12 hours"
|
|
224
|
-
}
|
|
225
|
-
],
|
|
226
|
-
"recommendation": "Approach 1 - best balance of simplicity and robustness"
|
|
227
|
-
}
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## Troubleshooting
|
|
231
|
-
|
|
232
|
-
### Error: gh CLI not found
|
|
233
|
-
|
|
234
|
-
**Solution:** Install GitHub CLI:
|
|
235
|
-
- **macOS:** `brew install gh`
|
|
236
|
-
- **Windows:** `winget install GitHub.cli`
|
|
237
|
-
- **Linux:** See [installation guide](https://github.com/cli/cli#installation)
|
|
238
|
-
|
|
239
|
-
### Error: gh CLI not authenticated
|
|
240
|
-
|
|
241
|
-
**Solution:** Authenticate:
|
|
242
|
-
```bash
|
|
243
|
-
gh auth login
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
Follow the prompts to authenticate with your GitHub account.
|
|
247
|
-
|
|
248
|
-
### Error: Cannot access private repository
|
|
249
|
-
|
|
250
|
-
**Possible causes:**
|
|
251
|
-
1. Repository doesn't exist
|
|
252
|
-
2. Your GitHub account lacks access
|
|
253
|
-
3. Authentication expired
|
|
254
|
-
|
|
255
|
-
**Solution:** Contact repository administrator (@thanhvu0895) for access to `csvibe-engine`.
|
|
256
|
-
|
|
257
|
-
### Error: Node.js version too old
|
|
258
|
-
|
|
259
|
-
**Solution:** Upgrade Node.js to 16+:
|
|
260
|
-
- **Download:** [nodejs.org](https://nodejs.org/)
|
|
261
|
-
- **nvm:** `nvm install 16`
|
|
262
|
-
|
|
263
|
-
## Development
|
|
264
|
-
|
|
265
|
-
### Setup
|
|
266
|
-
|
|
267
|
-
```bash
|
|
268
|
-
git clone <repo>
|
|
269
|
-
cd csvibe-cli
|
|
270
|
-
npm install
|
|
271
|
-
npm run build
|
|
272
|
-
npm link # Test locally
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
### Testing
|
|
276
|
-
|
|
277
|
-
```bash
|
|
278
|
-
npm test # Run all tests
|
|
279
|
-
npm run test:watch # Watch mode
|
|
280
|
-
npm run test:coverage # Coverage report
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### Build
|
|
284
|
-
|
|
285
|
-
```bash
|
|
286
|
-
npm run build # Compile TypeScript to dist/
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
### Local Testing
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
# Link locally
|
|
293
|
-
npm link
|
|
294
|
-
|
|
295
|
-
# Test commands
|
|
296
|
-
csvibe --help
|
|
297
|
-
csvibe --version
|
|
298
|
-
csvibe help
|
|
299
|
-
|
|
300
|
-
# Unlink when done
|
|
301
|
-
npm unlink -g @thanhvn14/csvibe
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
## Project Structure
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
csvibe-cli/
|
|
308
|
-
├── src/
|
|
309
|
-
│ ├── index.ts # Main CLI orchestrator
|
|
310
|
-
│ ├── commands/ # Command implementations
|
|
311
|
-
│ │ ├── help.ts # Help command
|
|
312
|
-
│ │ ├── version.ts # Version command
|
|
313
|
-
│ │ ├── init.ts # Init command (Story 2)
|
|
314
|
-
│ │ └── scout.ts # Scout command (Story 4)
|
|
315
|
-
│ ├── utils/ # Utilities
|
|
316
|
-
│ │ ├── gh-cli.ts # gh CLI validation
|
|
317
|
-
│ │ ├── logger.ts # Colored output
|
|
318
|
-
│ │ ├── errors.ts # Error handling
|
|
319
|
-
│ │ ├── validators.ts # System validation
|
|
320
|
-
│ │ ├── project-detector.ts # Project type detection (Story 2)
|
|
321
|
-
│ │ ├── directory-analyzer.ts # Directory structure analysis (Story 4)
|
|
322
|
-
│ │ ├── dependency-analyzer.ts # Dependency extraction (Story 4)
|
|
323
|
-
│ │ ├── prompts.ts # Interactive prompts (Story 2)
|
|
324
|
-
│ │ ├── config-generator.ts # Config file generation (Story 2)
|
|
325
|
-
│ │ ├── scaffolder.ts # Directory scaffolding (Story 2)
|
|
326
|
-
│ │ ├── vscode-validator.ts # VSCode/Copilot validation (Story 2)
|
|
327
|
-
│ │ └── downloader.ts # GitHub asset downloader (Story 2)
|
|
328
|
-
│ └── config/
|
|
329
|
-
│ └── constants.ts # Configuration
|
|
330
|
-
├── tests/
|
|
331
|
-
│ ├── unit/ # Unit tests
|
|
332
|
-
│ │ ├── gh-cli.test.ts
|
|
333
|
-
│ │ ├── validators.test.ts
|
|
334
|
-
│ │ ├── project-detector.test.ts
|
|
335
|
-
│ │ ├── directory-analyzer.test.ts # Story 4
|
|
336
|
-
│ │ ├── dependency-analyzer.test.ts # Story 4
|
|
337
|
-
│ │ ├── config-generator.test.ts
|
|
338
|
-
│ │ ├── scaffolder.test.ts
|
|
339
|
-
│ │ ├── vscode-validator.test.ts
|
|
340
|
-
│ │ └── downloader.test.ts
|
|
341
|
-
│ └── integration/ # Integration tests
|
|
342
|
-
│ ├── cli.test.ts
|
|
343
|
-
│ └── scout-command.test.ts # Story 4
|
|
344
|
-
├── bin/
|
|
345
|
-
│ └── csvibe.js # CLI entry point
|
|
346
|
-
└── package.json
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
## Tech Stack
|
|
350
|
-
|
|
351
|
-
### Core
|
|
352
|
-
- **TypeScript** - Type-safe development
|
|
353
|
-
- **Commander** - CLI framework
|
|
354
|
-
- **Node.js** >= 16.0.0
|
|
355
|
-
|
|
356
|
-
### CLI & UI
|
|
357
|
-
- **chalk** - Terminal colors
|
|
358
|
-
- **ora** - Progress spinners
|
|
359
|
-
- **inquirer** - Interactive prompts (Story 2)
|
|
360
|
-
|
|
361
|
-
### File & Config
|
|
362
|
-
- **fs-extra** - Enhanced file operations (Story 2)
|
|
363
|
-
- **yaml** - YAML parsing/generation (Story 2)
|
|
364
|
-
|
|
365
|
-
### Process Execution
|
|
366
|
-
- **execa** - Execute gh CLI commands
|
|
367
|
-
|
|
368
|
-
### Testing
|
|
369
|
-
- **Vitest** - Testing framework
|
|
370
|
-
- **@vitest/ui** - Test UI dashboard
|
|
371
|
-
|
|
372
|
-
## License
|
|
373
|
-
|
|
374
|
-
MIT © Thanh Vu
|
|
375
|
-
|
|
376
|
-
## Documentation
|
|
377
|
-
|
|
378
|
-
Full documentation: [csvibe-engine repository](https://github.com/thanhvu0895/csvibe-engine)
|
|
379
|
-
|
|
380
|
-
## Issues
|
|
381
|
-
|
|
382
|
-
Report issues: [GitHub Issues](https://github.com/thanhvu0895/csvibe-engine/issues)
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
**Status:**
|
|
387
|
-
- ✅ Story 1 (QS-262) Complete - CLI Installation Package
|
|
388
|
-
- ✅ Story 2 (QS-263) Complete - Project Bootstrapping (`csvibe init`)
|
|
389
|
-
- ✅ Story 4 (QS-265) Complete - Scout Phase Implementation (`csvibe scout`)
|
|
390
|
-
|
|
391
|
-
**Next:** Story 5 (QS-266) - Brainstorm Phase Implementation
|
|
1
|
+
# CSVibe CLI
|
|
2
|
+
|
|
3
|
+
CSVibe CLI - GitHub Copilot Vibecoding Workflow
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- **Node.js** >= 16.0.0 ([Download](https://nodejs.org/))
|
|
8
|
+
- **GitHub CLI (gh)** ([Installation Guide](https://github.com/cli/cli#installation))
|
|
9
|
+
- **Access** to `thanhvu0895/csvibe-engine` private repository
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
### Global Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @thanhvn14/csvibe
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Verify Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
csvibe --version
|
|
23
|
+
csvibe --help
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
1. **Authenticate GitHub CLI:**
|
|
29
|
+
```bash
|
|
30
|
+
gh auth login
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. **Initialize vibecoding in your project:**
|
|
34
|
+
```bash
|
|
35
|
+
cd my-project
|
|
36
|
+
csvibe init
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. **Start coding with AI:**
|
|
40
|
+
Open your project in VSCode and use GitHub Copilot with the installed `.agent` files.
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
### `csvibe --version`
|
|
45
|
+
Display CLI version.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
$ csvibe --version
|
|
49
|
+
csvibe v0.1.0
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### `csvibe --help`
|
|
53
|
+
Display usage information.
|
|
54
|
+
|
|
55
|
+
### `csvibe help`
|
|
56
|
+
Display detailed help with prerequisites, examples, and documentation links.
|
|
57
|
+
|
|
58
|
+
### `csvibe init`
|
|
59
|
+
|
|
60
|
+
Bootstrap vibecoding workflow in your project.
|
|
61
|
+
|
|
62
|
+
**What it does:**
|
|
63
|
+
1. Validates GitHub CLI authentication and repository access
|
|
64
|
+
2. Detects project type (Node.js, Python, Rust, monorepo)
|
|
65
|
+
3. Prompts for Jira credentials (interactive)
|
|
66
|
+
4. Creates `.github/agents/`, `.github/prompts/`, `.github/instructions/` directories
|
|
67
|
+
5. Downloads agent templates from `csvibe-engine` repository
|
|
68
|
+
6. Generates `.csvibe/config.yml` with project and Jira configuration
|
|
69
|
+
7. Updates `.gitignore` with CSVibe entries
|
|
70
|
+
8. Validates VSCode and GitHub Copilot installation (non-blocking)
|
|
71
|
+
|
|
72
|
+
**Example:**
|
|
73
|
+
```bash
|
|
74
|
+
cd my-project
|
|
75
|
+
csvibe init
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Interactive Prompts:**
|
|
79
|
+
- Jira URL (e.g., `https://company.atlassian.net`)
|
|
80
|
+
- Jira Email
|
|
81
|
+
- Jira API Token ([How to create](https://id.atlassian.com/manage-profile/security/api-tokens))
|
|
82
|
+
- Jira Project Key (e.g., `PROJ`, `QS`)
|
|
83
|
+
|
|
84
|
+
**Generated Structure:**
|
|
85
|
+
```
|
|
86
|
+
my-project/
|
|
87
|
+
├── .github/
|
|
88
|
+
│ ├── agents/ # Agent templates from csvibe-engine
|
|
89
|
+
│ ├── prompts/ # Prompt templates
|
|
90
|
+
│ └── instructions/ # Instruction templates
|
|
91
|
+
├── .csvibe/
|
|
92
|
+
│ ├── config.yml # Project and Jira configuration
|
|
93
|
+
│ ├── state/ # Pipeline state (gitignored)
|
|
94
|
+
│ └── cache/ # Cache directory (gitignored)
|
|
95
|
+
└── .gitignore # Updated with CSVibe entries
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### `csvibe scout`
|
|
99
|
+
|
|
100
|
+
Analyze project structure and gather context for AI planning.
|
|
101
|
+
|
|
102
|
+
**What it does:**
|
|
103
|
+
1. Validates project initialization (`.csvibe/state/` must exist)
|
|
104
|
+
2. Detects project type (Node.js, Python, Rust, monorepo)
|
|
105
|
+
3. Analyzes directory structure (source, tests, config)
|
|
106
|
+
4. Extracts dependencies from manifest files
|
|
107
|
+
5. Infers tech stack from dependencies
|
|
108
|
+
6. Detects build tool from lock files
|
|
109
|
+
7. Generates architecture summary
|
|
110
|
+
8. Outputs context to `.csvibe/state/scout-context.json`
|
|
111
|
+
|
|
112
|
+
**Example:**
|
|
113
|
+
```bash
|
|
114
|
+
cd my-project
|
|
115
|
+
csvibe scout
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Custom Output Path:**
|
|
119
|
+
```bash
|
|
120
|
+
csvibe scout -o custom-path.json
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Output Schema:**
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"projectType": "node",
|
|
127
|
+
"techStack": ["TypeScript", "React", "Vite"],
|
|
128
|
+
"directories": {
|
|
129
|
+
"source": ["src", "lib"],
|
|
130
|
+
"tests": ["tests"],
|
|
131
|
+
"config": ["."]
|
|
132
|
+
},
|
|
133
|
+
"dependencies": {
|
|
134
|
+
"react": "^18.2.0",
|
|
135
|
+
"typescript": "^5.0.0"
|
|
136
|
+
},
|
|
137
|
+
"buildTool": "npm",
|
|
138
|
+
"architecture": "node with TypeScript, React, Vite"
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Supported Project Types:**
|
|
143
|
+
- **Node.js:** package.json-based projects
|
|
144
|
+
- **Node.js Monorepo:** Projects with pnpm-workspace.yaml, lerna.json, nx.json, or turbo.json
|
|
145
|
+
- **Python:** pyproject.toml, requirements.txt, or Pipfile
|
|
146
|
+
- **Rust:** Cargo.toml projects
|
|
147
|
+
|
|
148
|
+
**Detected Tech Stack:**
|
|
149
|
+
- Frontend: React, Vue, Angular, Svelte, Next.js, Nuxt
|
|
150
|
+
- Backend: Express, Fastify, NestJS, Django, FastAPI, Flask, Actix
|
|
151
|
+
- CSS: Tailwind CSS, MUI, Bootstrap
|
|
152
|
+
- Databases: PostgreSQL, MongoDB, MySQL, Redis
|
|
153
|
+
- Build Tools: Vite, Webpack, Rollup, Turbopack
|
|
154
|
+
- Testing: Vitest, Jest, Pytest, Mocha
|
|
155
|
+
|
|
156
|
+
**Build Tool Detection:**
|
|
157
|
+
- **pnpm:** pnpm-lock.yaml
|
|
158
|
+
- **yarn:** yarn.lock
|
|
159
|
+
- **bun:** bun.lockb
|
|
160
|
+
- **npm:** package-lock.json (default)
|
|
161
|
+
- **poetry:** poetry.lock
|
|
162
|
+
- **pipenv:** Pipfile.lock
|
|
163
|
+
- **pip:** (default for Python)
|
|
164
|
+
- **cargo:** (Rust projects)
|
|
165
|
+
|
|
166
|
+
### `csvibe brainstorm`
|
|
167
|
+
|
|
168
|
+
Generate solution approaches with trade-off analysis using GitHub Copilot Chat.
|
|
169
|
+
|
|
170
|
+
**What it does:**
|
|
171
|
+
1. Validates project initialization and scout phase completion
|
|
172
|
+
2. Prompts for requirement description
|
|
173
|
+
3. Guides you to use @brainstorm in GitHub Copilot Chat
|
|
174
|
+
4. Watches for approaches.json creation
|
|
175
|
+
5. Validates and displays generated approaches
|
|
176
|
+
6. Prepares for plan phase
|
|
177
|
+
|
|
178
|
+
**Prerequisites:**
|
|
179
|
+
- Project initialized with `csvibe init`
|
|
180
|
+
- Scout analysis completed with `csvibe scout`
|
|
181
|
+
- GitHub Copilot extension active in VSCode
|
|
182
|
+
|
|
183
|
+
**Example:**
|
|
184
|
+
```bash
|
|
185
|
+
cd my-project
|
|
186
|
+
csvibe brainstorm
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Workflow:**
|
|
190
|
+
1. CLI prompts: "What feature or functionality do you want to add?"
|
|
191
|
+
2. You answer: "Add JWT authentication"
|
|
192
|
+
3. CLI displays Copilot Chat command to run
|
|
193
|
+
4. You open Copilot Chat and run: `@brainstorm generate approaches for: Add JWT authentication`
|
|
194
|
+
5. Copilot generates 2-3 approaches with pros/cons
|
|
195
|
+
6. You copy JSON output to `.csvibe/state/approaches.json`
|
|
196
|
+
7. CLI validates and displays summary
|
|
197
|
+
8. Ready for `csvibe plan`
|
|
198
|
+
|
|
199
|
+
**Custom Output Path:**
|
|
200
|
+
```bash
|
|
201
|
+
csvibe brainstorm -o custom-approaches.json
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Output Schema:**
|
|
205
|
+
```json
|
|
206
|
+
{
|
|
207
|
+
"requirement": "Add JWT authentication",
|
|
208
|
+
"approaches": [
|
|
209
|
+
{
|
|
210
|
+
"name": "JWT with Passport.js (Simple)",
|
|
211
|
+
"strategy": "Use existing Passport middleware...",
|
|
212
|
+
"technologies": ["passport", "passport-jwt", "jsonwebtoken"],
|
|
213
|
+
"pros": ["Battle-tested", "Rich ecosystem", "Minimal code"],
|
|
214
|
+
"cons": ["Session complexity", "Cookie security"],
|
|
215
|
+
"effort": "5-8 hours"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "Custom JWT Middleware (Moderate)",
|
|
219
|
+
"strategy": "Create custom Express middleware...",
|
|
220
|
+
"technologies": ["jsonwebtoken", "bcryptjs"],
|
|
221
|
+
"pros": ["Full control", "Lighter weight", "Easier debugging"],
|
|
222
|
+
"cons": ["More code", "Edge cases", "Security risks"],
|
|
223
|
+
"effort": "8-12 hours"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"recommendation": "Approach 1 - best balance of simplicity and robustness"
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Troubleshooting
|
|
231
|
+
|
|
232
|
+
### Error: gh CLI not found
|
|
233
|
+
|
|
234
|
+
**Solution:** Install GitHub CLI:
|
|
235
|
+
- **macOS:** `brew install gh`
|
|
236
|
+
- **Windows:** `winget install GitHub.cli`
|
|
237
|
+
- **Linux:** See [installation guide](https://github.com/cli/cli#installation)
|
|
238
|
+
|
|
239
|
+
### Error: gh CLI not authenticated
|
|
240
|
+
|
|
241
|
+
**Solution:** Authenticate:
|
|
242
|
+
```bash
|
|
243
|
+
gh auth login
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Follow the prompts to authenticate with your GitHub account.
|
|
247
|
+
|
|
248
|
+
### Error: Cannot access private repository
|
|
249
|
+
|
|
250
|
+
**Possible causes:**
|
|
251
|
+
1. Repository doesn't exist
|
|
252
|
+
2. Your GitHub account lacks access
|
|
253
|
+
3. Authentication expired
|
|
254
|
+
|
|
255
|
+
**Solution:** Contact repository administrator (@thanhvu0895) for access to `csvibe-engine`.
|
|
256
|
+
|
|
257
|
+
### Error: Node.js version too old
|
|
258
|
+
|
|
259
|
+
**Solution:** Upgrade Node.js to 16+:
|
|
260
|
+
- **Download:** [nodejs.org](https://nodejs.org/)
|
|
261
|
+
- **nvm:** `nvm install 16`
|
|
262
|
+
|
|
263
|
+
## Development
|
|
264
|
+
|
|
265
|
+
### Setup
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
git clone <repo>
|
|
269
|
+
cd csvibe-cli
|
|
270
|
+
npm install
|
|
271
|
+
npm run build
|
|
272
|
+
npm link # Test locally
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Testing
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
npm test # Run all tests
|
|
279
|
+
npm run test:watch # Watch mode
|
|
280
|
+
npm run test:coverage # Coverage report
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Build
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
npm run build # Compile TypeScript to dist/
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Local Testing
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# Link locally
|
|
293
|
+
npm link
|
|
294
|
+
|
|
295
|
+
# Test commands
|
|
296
|
+
csvibe --help
|
|
297
|
+
csvibe --version
|
|
298
|
+
csvibe help
|
|
299
|
+
|
|
300
|
+
# Unlink when done
|
|
301
|
+
npm unlink -g @thanhvn14/csvibe
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Project Structure
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
csvibe-cli/
|
|
308
|
+
├── src/
|
|
309
|
+
│ ├── index.ts # Main CLI orchestrator
|
|
310
|
+
│ ├── commands/ # Command implementations
|
|
311
|
+
│ │ ├── help.ts # Help command
|
|
312
|
+
│ │ ├── version.ts # Version command
|
|
313
|
+
│ │ ├── init.ts # Init command (Story 2)
|
|
314
|
+
│ │ └── scout.ts # Scout command (Story 4)
|
|
315
|
+
│ ├── utils/ # Utilities
|
|
316
|
+
│ │ ├── gh-cli.ts # gh CLI validation
|
|
317
|
+
│ │ ├── logger.ts # Colored output
|
|
318
|
+
│ │ ├── errors.ts # Error handling
|
|
319
|
+
│ │ ├── validators.ts # System validation
|
|
320
|
+
│ │ ├── project-detector.ts # Project type detection (Story 2)
|
|
321
|
+
│ │ ├── directory-analyzer.ts # Directory structure analysis (Story 4)
|
|
322
|
+
│ │ ├── dependency-analyzer.ts # Dependency extraction (Story 4)
|
|
323
|
+
│ │ ├── prompts.ts # Interactive prompts (Story 2)
|
|
324
|
+
│ │ ├── config-generator.ts # Config file generation (Story 2)
|
|
325
|
+
│ │ ├── scaffolder.ts # Directory scaffolding (Story 2)
|
|
326
|
+
│ │ ├── vscode-validator.ts # VSCode/Copilot validation (Story 2)
|
|
327
|
+
│ │ └── downloader.ts # GitHub asset downloader (Story 2)
|
|
328
|
+
│ └── config/
|
|
329
|
+
│ └── constants.ts # Configuration
|
|
330
|
+
├── tests/
|
|
331
|
+
│ ├── unit/ # Unit tests
|
|
332
|
+
│ │ ├── gh-cli.test.ts
|
|
333
|
+
│ │ ├── validators.test.ts
|
|
334
|
+
│ │ ├── project-detector.test.ts
|
|
335
|
+
│ │ ├── directory-analyzer.test.ts # Story 4
|
|
336
|
+
│ │ ├── dependency-analyzer.test.ts # Story 4
|
|
337
|
+
│ │ ├── config-generator.test.ts
|
|
338
|
+
│ │ ├── scaffolder.test.ts
|
|
339
|
+
│ │ ├── vscode-validator.test.ts
|
|
340
|
+
│ │ └── downloader.test.ts
|
|
341
|
+
│ └── integration/ # Integration tests
|
|
342
|
+
│ ├── cli.test.ts
|
|
343
|
+
│ └── scout-command.test.ts # Story 4
|
|
344
|
+
├── bin/
|
|
345
|
+
│ └── csvibe.js # CLI entry point
|
|
346
|
+
└── package.json
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
## Tech Stack
|
|
350
|
+
|
|
351
|
+
### Core
|
|
352
|
+
- **TypeScript** - Type-safe development
|
|
353
|
+
- **Commander** - CLI framework
|
|
354
|
+
- **Node.js** >= 16.0.0
|
|
355
|
+
|
|
356
|
+
### CLI & UI
|
|
357
|
+
- **chalk** - Terminal colors
|
|
358
|
+
- **ora** - Progress spinners
|
|
359
|
+
- **inquirer** - Interactive prompts (Story 2)
|
|
360
|
+
|
|
361
|
+
### File & Config
|
|
362
|
+
- **fs-extra** - Enhanced file operations (Story 2)
|
|
363
|
+
- **yaml** - YAML parsing/generation (Story 2)
|
|
364
|
+
|
|
365
|
+
### Process Execution
|
|
366
|
+
- **execa** - Execute gh CLI commands
|
|
367
|
+
|
|
368
|
+
### Testing
|
|
369
|
+
- **Vitest** - Testing framework
|
|
370
|
+
- **@vitest/ui** - Test UI dashboard
|
|
371
|
+
|
|
372
|
+
## License
|
|
373
|
+
|
|
374
|
+
MIT © Thanh Vu
|
|
375
|
+
|
|
376
|
+
## Documentation
|
|
377
|
+
|
|
378
|
+
Full documentation: [csvibe-engine repository](https://github.com/thanhvu0895/csvibe-engine)
|
|
379
|
+
|
|
380
|
+
## Issues
|
|
381
|
+
|
|
382
|
+
Report issues: [GitHub Issues](https://github.com/thanhvu0895/csvibe-engine/issues)
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
**Status:**
|
|
387
|
+
- ✅ Story 1 (QS-262) Complete - CLI Installation Package
|
|
388
|
+
- ✅ Story 2 (QS-263) Complete - Project Bootstrapping (`csvibe init`)
|
|
389
|
+
- ✅ Story 4 (QS-265) Complete - Scout Phase Implementation (`csvibe scout`)
|
|
390
|
+
|
|
391
|
+
**Next:** Story 5 (QS-266) - Brainstorm Phase Implementation
|
package/bin/csvibe.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* CSVibe CLI - Entry point
|
|
5
|
-
* This file is executed when the user runs `csvibe` command
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Require the compiled JavaScript from dist/
|
|
9
|
-
require('../dist/index.js');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CSVibe CLI - Entry point
|
|
5
|
+
* This file is executed when the user runs `csvibe` command
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Require the compiled JavaScript from dist/
|
|
9
|
+
require('../dist/index.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-handler.d.ts","sourceRoot":"","sources":["../../../../src/commands/init/phases/validation-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"validation-handler.d.ts","sourceRoot":"","sources":["../../../../src/commands/init/phases/validation-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiBxF;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAc7E"}
|
|
@@ -11,6 +11,7 @@ exports.validateEnvironment = validateEnvironment;
|
|
|
11
11
|
exports.checkExistingInit = checkExistingInit;
|
|
12
12
|
const chalk_1 = __importDefault(require("chalk"));
|
|
13
13
|
const gh_cli_1 = require("../../../utils/gh-cli");
|
|
14
|
+
const git_1 = require("../../../utils/git");
|
|
14
15
|
const config_1 = require("../../../domains/config");
|
|
15
16
|
const prompts_1 = require("../../../utils/prompts");
|
|
16
17
|
const logger_1 = require("../../../utils/logger");
|
|
@@ -21,6 +22,8 @@ const constants_1 = require("../../../config/constants");
|
|
|
21
22
|
async function validateEnvironment(projectRoot) {
|
|
22
23
|
const spinner = logger_1.logger.spinner('Validating GitHub CLI and repository access');
|
|
23
24
|
try {
|
|
25
|
+
// Ensure git is initialized first
|
|
26
|
+
await (0, git_1.ensureGitInitialized)(projectRoot);
|
|
24
27
|
await (0, gh_cli_1.validateGhCli)(constants_1.CONSTANTS.REPO_FULL);
|
|
25
28
|
spinner.succeed('GitHub CLI validated');
|
|
26
29
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-handler.js","sourceRoot":"","sources":["../../../../src/commands/init/phases/validation-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;
|
|
1
|
+
{"version":3,"file":"validation-handler.js","sourceRoot":"","sources":["../../../../src/commands/init/phases/validation-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;AAcH,kDAiBC;AAKD,8CAcC;AAhDD,kDAA0B;AAC1B,kDAAsD;AACtD,4CAA0D;AAC1D,oDAAwD;AACxD,oDAA0D;AAC1D,kDAA+C;AAC/C,yDAAsD;AAGtD;;GAEG;AACI,KAAK,UAAU,mBAAmB,CAAC,WAAmB;IAC3D,MAAM,OAAO,GAAG,eAAM,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC;IAE9E,IAAI,CAAC;QACH,kCAAkC;QAClC,MAAM,IAAA,0BAAoB,EAAC,WAAW,CAAC,CAAC;QAExC,MAAM,IAAA,sBAAa,EAAC,qBAAS,CAAC,SAAS,CAAC,CAAC;QACzC,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;QAExC,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;QAC7C,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,iBAAiB,CAAC,WAAmB;IACzD,IAAI,MAAM,IAAA,sBAAa,EAAC,WAAW,CAAC,EAAE,CAAC;QACrC,eAAM,CAAC,OAAO,CAAC,iDAAiD,CAAC,CAAC;QAClE,MAAM,eAAe,GAAG,MAAM,IAAA,0BAAgB,GAAE,CAAC;QAEjD,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC,CAAC;YACzD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU;IAC3B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-client.d.ts","sourceRoot":"","sources":["../../../src/domains/github/github-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAmB,MAAM,SAAS,CAAC;AAE9D;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO;IAWP;;OAEG;WACU,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;IAK5C;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC;IAoB5C;;OAEG;IACG,YAAY,CAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAe,GACnB,OAAO,CAAC,MAAM,CAAC;IAwClB;;OAEG;IACG,iBAAiB,CACrB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAe,GACnB,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IA+CpD;;OAEG;IACG,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;;
|
|
1
|
+
{"version":3,"file":"github-client.d.ts","sourceRoot":"","sources":["../../../src/domains/github/github-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAmB,MAAM,SAAS,CAAC;AAE9D;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO;IAWP;;OAEG;WACU,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;IAK5C;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC;IAoB5C;;OAEG;IACG,YAAY,CAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAe,GACnB,OAAO,CAAC,MAAM,CAAC;IAwClB;;OAEG;IACG,iBAAiB,CACrB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAe,GACnB,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IA+CpD;;OAEG;IACG,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;;eAwHi6h7B,sDAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAA2nO,CAAC;;kBAAgD,CAAC;;;;8BAAqI,sDAAsB;;;;;;;;;;;;;;;;iBAAsyE,sDAAsB;uBAAiD,sDAAsB;iBAAwC,sDAAsB;iBAA8B,sDAAsB;;;;;;0BAAiS,sDAAsB;gCAAyD,sDAAsB;;;;;IAzGzq27B;;OAEG;IACG,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAW,EAAE,GAAG,GAAE,MAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuBvF;;OAEG;IACG,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYlE;;OAEG;IACG,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK1B;;;OAGG;IACG,oBAAoB,CACxB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GACvD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CA6C1B"}
|
package/dist/utils/downloader.js
CHANGED
|
@@ -122,39 +122,39 @@ async function downloadConfigTemplate(repo = constants_1.CONSTANTS.REPO_FULL) {
|
|
|
122
122
|
* Default config template (fallback)
|
|
123
123
|
*/
|
|
124
124
|
function getDefaultConfigTemplate() {
|
|
125
|
-
return `# CSVibe Configuration
|
|
126
|
-
# Generated by: csvibe init
|
|
127
|
-
# Date: {{GENERATED_DATE}}
|
|
128
|
-
|
|
129
|
-
project:
|
|
130
|
-
name: {{PROJECT_NAME}}
|
|
131
|
-
type: {{PROJECT_TYPE}}
|
|
132
|
-
version: {{PROJECT_VERSION}}
|
|
133
|
-
|
|
134
|
-
github:
|
|
135
|
-
private_repo: thanhvu0895/csvibe-engine
|
|
136
|
-
branch: main
|
|
137
|
-
|
|
138
|
-
jira:
|
|
139
|
-
url: {{JIRA_URL}}
|
|
140
|
-
email: {{JIRA_EMAIL}}
|
|
141
|
-
api_token: {{JIRA_API_TOKEN}}
|
|
142
|
-
project_key: {{JIRA_PROJECT_KEY}}
|
|
143
|
-
|
|
144
|
-
pipeline:
|
|
145
|
-
phases:
|
|
146
|
-
- scout
|
|
147
|
-
- brainstorm
|
|
148
|
-
- plan
|
|
149
|
-
- execute
|
|
150
|
-
- review
|
|
151
|
-
- jira-reporter
|
|
152
|
-
enabled: true
|
|
153
|
-
dry_run: false
|
|
154
|
-
|
|
155
|
-
vscode:
|
|
156
|
-
copilot_required: true
|
|
157
|
-
workspace_path: .
|
|
125
|
+
return `# CSVibe Configuration
|
|
126
|
+
# Generated by: csvibe init
|
|
127
|
+
# Date: {{GENERATED_DATE}}
|
|
128
|
+
|
|
129
|
+
project:
|
|
130
|
+
name: {{PROJECT_NAME}}
|
|
131
|
+
type: {{PROJECT_TYPE}}
|
|
132
|
+
version: {{PROJECT_VERSION}}
|
|
133
|
+
|
|
134
|
+
github:
|
|
135
|
+
private_repo: thanhvu0895/csvibe-engine
|
|
136
|
+
branch: main
|
|
137
|
+
|
|
138
|
+
jira:
|
|
139
|
+
url: {{JIRA_URL}}
|
|
140
|
+
email: {{JIRA_EMAIL}}
|
|
141
|
+
api_token: {{JIRA_API_TOKEN}}
|
|
142
|
+
project_key: {{JIRA_PROJECT_KEY}}
|
|
143
|
+
|
|
144
|
+
pipeline:
|
|
145
|
+
phases:
|
|
146
|
+
- scout
|
|
147
|
+
- brainstorm
|
|
148
|
+
- plan
|
|
149
|
+
- execute
|
|
150
|
+
- review
|
|
151
|
+
- jira-reporter
|
|
152
|
+
enabled: true
|
|
153
|
+
dry_run: false
|
|
154
|
+
|
|
155
|
+
vscode:
|
|
156
|
+
copilot_required: true
|
|
157
|
+
workspace_path: .
|
|
158
158
|
`;
|
|
159
159
|
}
|
|
160
160
|
//# sourceMappingURL=downloader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAe7E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ensureGitInitialized = ensureGitInitialized;
|
|
7
|
+
const execa_1 = require("execa");
|
|
8
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const logger_1 = require("./logger");
|
|
11
|
+
/**
|
|
12
|
+
* Ensure git is initialized in the project root
|
|
13
|
+
*/
|
|
14
|
+
async function ensureGitInitialized(projectRoot) {
|
|
15
|
+
const gitDir = path_1.default.join(projectRoot, '.git');
|
|
16
|
+
if (await fs_extra_1.default.pathExists(gitDir)) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const spinner = logger_1.logger.spinner('Initializing git repository');
|
|
20
|
+
try {
|
|
21
|
+
await (0, execa_1.execa)('git', ['init'], { cwd: projectRoot });
|
|
22
|
+
spinner.succeed('Git repository initialized');
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
spinner.fail('Failed to initialize git repository');
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=git.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":";;;;;AAQA,oDAeC;AAvBD,iCAA8B;AAC9B,wDAA0B;AAC1B,gDAAwB;AACxB,qCAAkC;AAElC;;GAEG;AACI,KAAK,UAAU,oBAAoB,CAAC,WAAmB;IAC1D,MAAM,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAE9C,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9B,OAAO;IACX,CAAC;IAED,MAAM,OAAO,GAAG,eAAM,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC9D,IAAI,CAAC;QACD,MAAM,IAAA,aAAK,EAAC,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC;QACnD,OAAO,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAClD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;QACpD,MAAM,KAAK,CAAC;IAChB,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffolder.d.ts","sourceRoot":"","sources":["../../src/utils/scaffolder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,wBAAsB,QAAQ,CAAC,WAAW,GAAE,MAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAYjF;
|
|
1
|
+
{"version":3,"file":"scaffolder.d.ts","sourceRoot":"","sources":["../../src/utils/scaffolder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,wBAAsB,QAAQ,CAAC,WAAW,GAAE,MAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAYjF;AAuDD;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,GAAE,MAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAatF"}
|
package/dist/utils/scaffolder.js
CHANGED
|
@@ -29,24 +29,46 @@ async function scaffold(projectRoot = process.cwd()) {
|
|
|
29
29
|
*/
|
|
30
30
|
async function updateGitignore(projectRoot) {
|
|
31
31
|
const gitignorePath = path_1.default.join(projectRoot, '.gitignore');
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.
|
|
37
|
-
|
|
32
|
+
// Common ignores to ensure are present
|
|
33
|
+
const requiredIgnores = [
|
|
34
|
+
{ pattern: 'node_modules', comment: '# Dependencies' },
|
|
35
|
+
{ pattern: 'dist', comment: '# Build output' },
|
|
36
|
+
{ pattern: '.env', comment: '# Environment variables' },
|
|
37
|
+
{ pattern: '.DS_Store', comment: '# OS files' },
|
|
38
|
+
{ pattern: '.vscode', comment: '# IDE' },
|
|
39
|
+
{ pattern: '.idea', comment: '' },
|
|
40
|
+
{ pattern: '.github/agents', comment: '# GitHub Copilot Agents' },
|
|
41
|
+
{ pattern: '.csvibe/state/', comment: '# CSVibe' },
|
|
42
|
+
{ pattern: '.csvibe/cache/', comment: '' },
|
|
43
|
+
{ pattern: '.csvibe/config.yml', comment: '' },
|
|
44
|
+
];
|
|
38
45
|
let content = '';
|
|
46
|
+
let hasChanges = false;
|
|
39
47
|
// Read existing .gitignore if it exists
|
|
40
48
|
if (await fs_extra_1.default.pathExists(gitignorePath)) {
|
|
41
49
|
content = await fs_extra_1.default.readFile(gitignorePath, 'utf-8');
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
// If creating new, add a header
|
|
53
|
+
content = '# .gitignore generated by CSVibe\n\n';
|
|
54
|
+
hasChanges = true;
|
|
55
|
+
}
|
|
56
|
+
// Check and append missing entries
|
|
57
|
+
for (const item of requiredIgnores) {
|
|
58
|
+
if (!content.includes(item.pattern)) {
|
|
59
|
+
if (!hasChanges && content.length > 0 && !content.endsWith('\n')) {
|
|
60
|
+
content += '\n';
|
|
61
|
+
}
|
|
62
|
+
const entry = item.comment
|
|
63
|
+
? `\n${item.comment}\n${item.pattern}\n`
|
|
64
|
+
: `${item.pattern}\n`;
|
|
65
|
+
content += entry;
|
|
66
|
+
hasChanges = true;
|
|
45
67
|
}
|
|
46
68
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
69
|
+
if (hasChanges) {
|
|
70
|
+
await fs_extra_1.default.writeFile(gitignorePath, content, 'utf-8');
|
|
71
|
+
}
|
|
50
72
|
}
|
|
51
73
|
/**
|
|
52
74
|
* Clean up scaffolded directories (for --force)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffolder.js","sourceRoot":"","sources":["../../src/utils/scaffolder.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAQH,4BAYC;
|
|
1
|
+
{"version":3,"file":"scaffolder.js","sourceRoot":"","sources":["../../src/utils/scaffolder.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@thanhvn14/csvibe",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "CSVibe CLI - GitHub Copilot Vibecoding Workflow",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"csvibe": "./bin/csvibe.js"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "tsc",
|
|
11
|
-
"dev": "tsx src/index.ts",
|
|
12
|
-
"test": "vitest",
|
|
13
|
-
"test:watch": "vitest --watch",
|
|
14
|
-
"test:coverage": "vitest --coverage",
|
|
15
|
-
"prepublishOnly": "tsc"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"csvibe",
|
|
19
|
-
"vibecoding",
|
|
20
|
-
"github-copilot",
|
|
21
|
-
"ai",
|
|
22
|
-
"cli"
|
|
23
|
-
],
|
|
24
|
-
"author": "Thanh Vu <thanhvu0895@gmail.com>",
|
|
25
|
-
"license": "MIT",
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": ">=16.0.0"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@clack/prompts": "^0.7.0",
|
|
31
|
-
"@octokit/rest": "^22.0.1",
|
|
32
|
-
"adm-zip": "^0.5.16",
|
|
33
|
-
"chalk": "^5.0.0",
|
|
34
|
-
"cli-progress": "^3.12.0",
|
|
35
|
-
"commander": "^11.0.0",
|
|
36
|
-
"execa": "^8.0.0",
|
|
37
|
-
"fs-extra": "^11.3.3",
|
|
38
|
-
"keytar": "^7.9.0",
|
|
39
|
-
"ora": "^6.0.0",
|
|
40
|
-
"p-retry": "^6.2.1",
|
|
41
|
-
"yaml": "^2.8.2"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@types/adm-zip": "^0.5.7",
|
|
45
|
-
"@types/cli-progress": "^3.11.6",
|
|
46
|
-
"@types/fs-extra": "^11.0.4",
|
|
47
|
-
"@types/node": "^20.0.0",
|
|
48
|
-
"@vitest/coverage-v8": "^1.0.0",
|
|
49
|
-
"tsx": "^4.0.0",
|
|
50
|
-
"typescript": "^5.0.0",
|
|
51
|
-
"vitest": "^1.0.0"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@thanhvn14/csvibe",
|
|
3
|
+
"version": "0.1.7",
|
|
4
|
+
"description": "CSVibe CLI - GitHub Copilot Vibecoding Workflow",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"csvibe": "./bin/csvibe.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"dev": "tsx src/index.ts",
|
|
12
|
+
"test": "vitest",
|
|
13
|
+
"test:watch": "vitest --watch",
|
|
14
|
+
"test:coverage": "vitest --coverage",
|
|
15
|
+
"prepublishOnly": "tsc"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"csvibe",
|
|
19
|
+
"vibecoding",
|
|
20
|
+
"github-copilot",
|
|
21
|
+
"ai",
|
|
22
|
+
"cli"
|
|
23
|
+
],
|
|
24
|
+
"author": "Thanh Vu <thanhvu0895@gmail.com>",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=16.0.0"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@clack/prompts": "^0.7.0",
|
|
31
|
+
"@octokit/rest": "^22.0.1",
|
|
32
|
+
"adm-zip": "^0.5.16",
|
|
33
|
+
"chalk": "^5.0.0",
|
|
34
|
+
"cli-progress": "^3.12.0",
|
|
35
|
+
"commander": "^11.0.0",
|
|
36
|
+
"execa": "^8.0.0",
|
|
37
|
+
"fs-extra": "^11.3.3",
|
|
38
|
+
"keytar": "^7.9.0",
|
|
39
|
+
"ora": "^6.0.0",
|
|
40
|
+
"p-retry": "^6.2.1",
|
|
41
|
+
"yaml": "^2.8.2"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/adm-zip": "^0.5.7",
|
|
45
|
+
"@types/cli-progress": "^3.11.6",
|
|
46
|
+
"@types/fs-extra": "^11.0.4",
|
|
47
|
+
"@types/node": "^20.0.0",
|
|
48
|
+
"@vitest/coverage-v8": "^1.0.0",
|
|
49
|
+
"tsx": "^4.0.0",
|
|
50
|
+
"typescript": "^5.0.0",
|
|
51
|
+
"vitest": "^1.0.0"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/test-jira-prompt.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Debug test for csvibe init - Jira prompt
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
console.log('Testing Jira prompt flow...\n');
|
|
8
|
-
|
|
9
|
-
// Load the actual compiled functions
|
|
10
|
-
const promptHandler = require('./dist/commands/init/phases/prompt-handler.js');
|
|
11
|
-
const prompts = require('./dist/utils/prompts.js');
|
|
12
|
-
|
|
13
|
-
console.log('✓ Loaded prompt-handler');
|
|
14
|
-
console.log('✓ Loaded prompts utils');
|
|
15
|
-
console.log('\nFunctions available:');
|
|
16
|
-
console.log(' - confirmJiraSetup:', typeof prompts.confirmJiraSetup);
|
|
17
|
-
console.log(' - promptConfiguration:', typeof promptHandler.promptConfiguration);
|
|
18
|
-
|
|
19
|
-
console.log('\n--- Starting promptConfiguration() ---\n');
|
|
20
|
-
|
|
21
|
-
// Call the actual function
|
|
22
|
-
promptHandler.promptConfiguration()
|
|
23
|
-
.then(result => {
|
|
24
|
-
console.log('\n--- Result ---');
|
|
25
|
-
console.log('Returned:', result);
|
|
26
|
-
process.exit(0);
|
|
27
|
-
})
|
|
28
|
-
.catch(err => {
|
|
29
|
-
console.error('\n--- Error ---');
|
|
30
|
-
console.error(err);
|
|
31
|
-
process.exit(1);
|
|
32
|
-
});
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Debug test for csvibe init - Jira prompt
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
console.log('Testing Jira prompt flow...\n');
|
|
8
|
+
|
|
9
|
+
// Load the actual compiled functions
|
|
10
|
+
const promptHandler = require('./dist/commands/init/phases/prompt-handler.js');
|
|
11
|
+
const prompts = require('./dist/utils/prompts.js');
|
|
12
|
+
|
|
13
|
+
console.log('✓ Loaded prompt-handler');
|
|
14
|
+
console.log('✓ Loaded prompts utils');
|
|
15
|
+
console.log('\nFunctions available:');
|
|
16
|
+
console.log(' - confirmJiraSetup:', typeof prompts.confirmJiraSetup);
|
|
17
|
+
console.log(' - promptConfiguration:', typeof promptHandler.promptConfiguration);
|
|
18
|
+
|
|
19
|
+
console.log('\n--- Starting promptConfiguration() ---\n');
|
|
20
|
+
|
|
21
|
+
// Call the actual function
|
|
22
|
+
promptHandler.promptConfiguration()
|
|
23
|
+
.then(result => {
|
|
24
|
+
console.log('\n--- Result ---');
|
|
25
|
+
console.log('Returned:', result);
|
|
26
|
+
process.exit(0);
|
|
27
|
+
})
|
|
28
|
+
.catch(err => {
|
|
29
|
+
console.error('\n--- Error ---');
|
|
30
|
+
console.error(err);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
});
|