metacoding 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/LICENSE +21 -0
  3. package/README.md +244 -0
  4. package/bin/metacoding.js +27 -0
  5. package/lib/cli.d.ts +2 -0
  6. package/lib/cli.d.ts.map +1 -0
  7. package/lib/cli.js +83 -0
  8. package/lib/cli.js.map +1 -0
  9. package/lib/commands/init.d.ts +15 -0
  10. package/lib/commands/init.d.ts.map +1 -0
  11. package/lib/commands/init.js +185 -0
  12. package/lib/commands/init.js.map +1 -0
  13. package/lib/commands/update.d.ts +5 -0
  14. package/lib/commands/update.d.ts.map +1 -0
  15. package/lib/commands/update.js +20 -0
  16. package/lib/commands/update.js.map +1 -0
  17. package/lib/commands/validate.d.ts +5 -0
  18. package/lib/commands/validate.d.ts.map +1 -0
  19. package/lib/commands/validate.js +20 -0
  20. package/lib/commands/validate.js.map +1 -0
  21. package/lib/services/filesystem.d.ts +13 -0
  22. package/lib/services/filesystem.d.ts.map +1 -0
  23. package/lib/services/filesystem.js +84 -0
  24. package/lib/services/filesystem.js.map +1 -0
  25. package/lib/services/project-detector.d.ts +12 -0
  26. package/lib/services/project-detector.d.ts.map +1 -0
  27. package/lib/services/project-detector.js +191 -0
  28. package/lib/services/project-detector.js.map +1 -0
  29. package/lib/services/template-manager.d.ts +15 -0
  30. package/lib/services/template-manager.d.ts.map +1 -0
  31. package/lib/services/template-manager.js +167 -0
  32. package/lib/services/template-manager.js.map +1 -0
  33. package/lib/services/vscode.d.ts +10 -0
  34. package/lib/services/vscode.d.ts.map +1 -0
  35. package/lib/services/vscode.js +108 -0
  36. package/lib/services/vscode.js.map +1 -0
  37. package/lib/types/index.d.ts +66 -0
  38. package/lib/types/index.d.ts.map +1 -0
  39. package/lib/types/index.js +3 -0
  40. package/lib/types/index.js.map +1 -0
  41. package/package.json +134 -0
  42. package/templates/general/files/code-review.instructions.md +111 -0
  43. package/templates/general/files/copilot-instructions.md.template +404 -0
  44. package/templates/general/files/docs-update.instructions.md +203 -0
  45. package/templates/general/files/release.instructions.md +72 -0
  46. package/templates/general/files/test-runner.instructions.md +107 -0
  47. package/templates/general/template.json +9 -0
  48. package/templates/node/files/code-review.instructions.md +222 -0
  49. package/templates/node/files/copilot-instructions.md.template +391 -0
  50. package/templates/node/files/docs-update.instructions.md +203 -0
  51. package/templates/node/files/release.instructions.md +72 -0
  52. package/templates/node/files/test-runner.instructions.md +108 -0
  53. package/templates/node/template.json +23 -0
  54. package/templates/python/files/code-review.instructions.md +215 -0
  55. package/templates/python/files/copilot-instructions.md.template +418 -0
  56. package/templates/python/files/docs-update.instructions.md +203 -0
  57. package/templates/python/files/release.instructions.md +72 -0
  58. package/templates/python/files/test-runner.instructions.md +108 -0
  59. package/templates/python/template.json +75 -0
  60. package/templates/react/files/code-review.instructions.md +160 -0
  61. package/templates/react/files/copilot-instructions.md.template +472 -0
  62. package/templates/react/files/docs-update.instructions.md +203 -0
  63. package/templates/react/files/release.instructions.md +72 -0
  64. package/templates/react/files/test-runner.instructions.md +108 -0
  65. package/templates/react/template.json +14 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,91 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2025-06-21
9
+
10
+ ### Added
11
+
12
+ - **NPM Package Distribution**: Complete transformation from manual file copying to professional npm package
13
+ - **Interactive CLI Tool**: `metacoding` command with init, validate, and update subcommands
14
+ - **Template System**: Configurable templates for different project types (general, react, node, python)
15
+ - **Project Detection**: Automatic detection of project type, tech stack, and existing configuration
16
+ - **VS Code Integration**: Automatic VS Code settings configuration for GitHub Copilot
17
+ - **Interactive Setup**: Guided project configuration with prompts for project details
18
+ - **TypeScript Implementation**: Full TypeScript codebase with comprehensive type definitions
19
+ - **Test Suite**: Unit and integration tests with >80% coverage target
20
+ - **Professional CLI Experience**: Color output, progress indicators, and helpful error messages
21
+
22
+ ### Changed
23
+
24
+ - **Installation Method**: From manual file download to simple `npm install -g metacoding`
25
+ - **Setup Process**: From 6-step manual process to single `metacoding init` command
26
+ - **User Experience**: From error-prone manual setup to guided, validated automation
27
+ - **Template Processing**: Dynamic variable substitution for project-specific customization
28
+ - **File Management**: Automatic directory creation, file validation, and conflict resolution
29
+
30
+ ### Technical Details
31
+
32
+ - **Dependencies**: Commander.js for CLI, Inquirer for prompts, Chalk for colors, fs-extra for file operations
33
+ - **Build System**: TypeScript compilation with source maps and declarations
34
+ - **Testing**: Jest test framework with coverage reporting
35
+ - **Code Quality**: ESLint, Prettier, and strict TypeScript configuration
36
+ - **Distribution**: Professional npm package with proper semver and release management
37
+
38
+ ### Breaking Changes
39
+
40
+ - **Installation**: Manual setup method is deprecated in favor of npm package
41
+ - **File Structure**: Templates now use `{{VARIABLE}}` syntax instead of `[placeholder]` format
42
+
43
+ ### Migration Guide
44
+
45
+ Existing manual installations can be migrated by:
46
+
47
+ 1. Installing the npm package: `npm install -g metacoding`
48
+ 2. Running `metacoding validate` to check current setup
49
+ 3. Running `metacoding update` to migrate to latest format
50
+
51
+ ## [Unreleased]
52
+
53
+ ### Added
54
+
55
+ - **Mandatory Development Workflow**: 7-step enforced process for all development tasks
56
+ - Task understanding and planning with user confirmation
57
+ - Task management with status tracking
58
+ - Test-Driven Development (TDD) approach
59
+ - Implementation and verification steps
60
+ - Documentation and status updates
61
+ - Version control requirements
62
+ - Workflow completion checks
63
+ - **Status Transparency Guidelines**: Documentation standards for clear status indication
64
+ - Prohibition of "planned" or "to-do" in titles and headers
65
+ - Standardized status indicators (✅ 🚧 ❌ ⚠️ 🔄)
66
+ - Checkbox format for task status tracking
67
+ - Present-tense headers reflecting current state
68
+ - **Workflow Enforcement Rules**: Quality gates and violation handling procedures
69
+ - **Enhanced Role and Persona**: Updated to emphasize strict workflow adherence
70
+
71
+ ### Changed
72
+
73
+ - **Main Template**: Updated `copilot-instructions.md` with comprehensive workflow section
74
+ - **Documentation Instructions**: Enhanced `docs-update.instructions.md` with status guidelines
75
+ - **README**: Expanded to include workflow details and status transparency standards
76
+ - **File Structure**: Added `/_meta` and `/test` directories for task and test documentation
77
+
78
+ ### Enhanced
79
+
80
+ - Code quality through mandatory TDD approach
81
+ - Documentation accuracy with status-transparent language
82
+ - Team collaboration with consistent workflow enforcement
83
+ - Risk mitigation through incremental, tested changes
84
+
85
+ ## [1.0.0] - 2025-06-21
86
+
87
+ ### Added
88
+
89
+ - Initial project structure
90
+ - Core documentation files
91
+ - Basic instruction templates
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 GitHub Copilot Instructions Template
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,244 @@
1
+ # metacoding: Guided Development Workflow for GitHub Copilot
2
+
3
+ [![Version](https://img.shields.io/npm/v/metacoding.svg)](https://www.npmjs.com/package/metacoding)
4
+ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+ [![GitHub Copilot](https://img.shields.io/badge/GitHub%20Copilot-Compatible-brightgreen.svg)](https://github.com/features/copilot)
6
+
7
+ Transform your development experience with AI-guided coding standards, structured workflows, and quality practices that help you build better software from day one.
8
+
9
+ ## Table of Contents
10
+
11
+ - [🎯 What is metacoding?](#-what-is-metacoding)
12
+ - [🛠 Installation Guide](#-installation-guide)
13
+ - [📦 Using the metacoding CLI](#-using-the-metacoding-cli)
14
+ - [💬 How to Use metacoding with GitHub Copilot](#-how-to-use-metacoding-with-github-copilot)
15
+ - [🆘 Getting Help](#-getting-help)
16
+ - [🤝 Contributing](#-contributing)
17
+ - [📄 License](#-license)
18
+
19
+ ## 🎯 What is metacoding?
20
+
21
+ metacoding is a **guided development methodology** that uses GitHub Copilot's custom instruction capabilities to help developers at any level follow established best practices. Instead of just getting code suggestions, you get:
22
+
23
+ - **Structured workflows** that guide you through proven development practices
24
+ - **Quality standards** that help you avoid common mistakes
25
+ - **Test-driven development** that's encouraged and guided step-by-step
26
+ - **Documentation guidance** that keeps your projects maintainable
27
+
28
+ ## 🛠 Installation Guide
29
+
30
+ ### Prerequisites
31
+
32
+ Before installing metacoding, make sure you have:
33
+
34
+ 1. **Visual Studio Code** installed ([download here](https://code.visualstudio.com/))
35
+ 2. **GitHub Copilot extension** installed and configured in VS Code
36
+ 3. **Active GitHub Copilot subscription** ([get one here](https://github.com/features/copilot))
37
+ 4. **Node.js** (version 16 or higher) for the CLI tool
38
+
39
+ ### Quick Setup (Recommended)
40
+
41
+ The easiest way to get started with metacoding is using our npm package:
42
+
43
+ 1. **Install globally:** `npm install -g metacoding`
44
+ 2. **Navigate to your project:** `cd your-project`
45
+ 3. **Initialize metacoding:** `metacoding init`
46
+ 4. **Follow the interactive prompts and you're done!**
47
+
48
+ **Available templates:** You can also specify a template during initialization:
49
+
50
+ - `metacoding init --template react` - Use React template
51
+ - `metacoding init --template node` - Use Node.js/Backend template
52
+ - `metacoding init --template python` - Use Python template
53
+ - `metacoding init --force` - Overwrite existing files
54
+
55
+ **Note:** The CLI will automatically configure VS Code settings for custom instructions. If you need to configure manually, add these settings to your VS Code settings.json:
56
+
57
+ ```json
58
+ {
59
+ "github.copilot.chat.codeGeneration.useInstructionFiles": true,
60
+ "chat.promptFiles": true
61
+ }
62
+ ```
63
+
64
+ After you finished, your project should now look like this:
65
+
66
+ ```
67
+ my-awesome-project/
68
+ ├── .github/
69
+ │ ├── copilot-instructions.md
70
+ │ └── instructions/
71
+ │ ├── test-runner.instructions.md
72
+ │ ├── release.instructions.md
73
+ │ ├── docs-update.instructions.md
74
+ │ └── code-review.instructions.md
75
+ ```
76
+
77
+ ### Test Your Setup
78
+
79
+ 1. **Restart VS Code** to ensure all settings are applied
80
+ 2. **Create a new file** in your project (e.g., `test.js` or `main.py`)
81
+ 3. **Open GitHub Copilot Chat:**
82
+ - Press `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (Mac)
83
+ - Type "GitHub Copilot: Open Chat"
84
+ - Press Enter
85
+ 4. **Test the setup:**
86
+ - In GitHub Copilot, ask: "What is the development workflow for this project?"
87
+ - Copilot should reference your custom instructions and provide project-specific guidance!
88
+
89
+ ## ✅ You're Ready to Go!
90
+
91
+ ## 📦 Using the metacoding CLI
92
+
93
+ Once installed, you can use these commands:
94
+
95
+ ### `metacoding validate`
96
+
97
+ Check your current metacoding setup:
98
+
99
+ - `metacoding validate` - Basic validation
100
+ - `metacoding validate --strict` - Strict validation rules
101
+ - `metacoding validate --fix` - Auto-fix issues where possible
102
+
103
+ ### `metacoding update`
104
+
105
+ Update your metacoding setup to the latest version:
106
+
107
+ - `metacoding update` - Update to latest version
108
+ - `metacoding update --backup` - Create backup before updating
109
+
110
+ ### Help and Version
111
+
112
+ - `metacoding --help` - Show all commands
113
+ - `metacoding --version` - Show version number
114
+
115
+ ## 💬 How to Use metacoding with GitHub Copilot
116
+
117
+ Once you have metacoding set up, you can leverage its power in several ways:
118
+
119
+ ### Automatic Context Application
120
+
121
+ GitHub Copilot automatically applies relevant instruction files based on the files you're editing:
122
+
123
+ - **Editing test files** → `test-runner.instructions.md` automatically applies
124
+ - **Editing Markdown files** → `docs-update.instructions.md` automatically applies
125
+ - **Editing any code file** → `code-review.instructions.md` is available for manual use
126
+ - **Editing package.json** → `release.instructions.md` automatically applies
127
+
128
+ ### Attaching Instruction Files
129
+
130
+ 1. **Open GitHub Copilot Chat** (`Ctrl+Shift+P` → "GitHub Copilot: Open Chat")
131
+ 2. **Click the paperclip icon** (attach button) in the Copilot input
132
+ 3. **Select "Instructions..."** from the menu
133
+ 4. **Choose the instruction file** you want to reference
134
+ 5. **Type your prompt** and Copilot will use that instruction context
135
+
136
+ Examples of effective prompts:
137
+
138
+ - "Run tests and prepare for publishing changes"
139
+ - "Bump version and commit following release workflow"
140
+ - "Review this code for security vulnerabilities"
141
+
142
+ ### Manual Instruction Reference
143
+
144
+ You can explicitly reference specific instruction files in GitHub Copilot:
145
+
146
+ - "Use release.instructions.md to help me bump the version to 2.1.0"
147
+
148
+ - "Apply code-review.instructions.md guidelines to review this function"
149
+
150
+ - "Following test-runner.instructions.md, help me write tests for this component"
151
+
152
+ ## Best Practices for Using GitHub Copilot
153
+
154
+ ### Choose the Right Mode for Your Task
155
+
156
+ - **Agent Mode (Default)**: Use for complex workflows, multi-step tasks, and when you want Copilot to handle the entire process
157
+ - Examples: "Implement user authentication with tests and documentation" or "Prepare release with version bump and changelog"
158
+ - **Ask Mode**: Use for questions, explanations, and when you need information without taking action
159
+ - Examples: "Explain how this algorithm works" or "What are the best practices for error handling?"
160
+ - **Edit Mode**: Use for focused code modifications when you want direct file editing
161
+ - Examples: "Refactor this function to use async/await" or "Add error handling to this method"
162
+
163
+ ### Effective Prompting Strategies
164
+
165
+ - **Start with simple prompts** like "Let's plan feature X" to test your setup
166
+ - **Be specific about context** when manually referencing instructions
167
+ - **Reference multiple instructions** when needed for complex tasks
168
+ - **Provide necessary context**: include documentation, task list, test cases and related files and folders in your prompt (use the "Attach" menu)
169
+
170
+ ## 🆘 Getting Help
171
+
172
+ ### Common Questions
173
+
174
+ **Q: Do I need to be an experienced developer?**
175
+ A: No! metacoding provides guidance and structure to help developers at any level adopt proven practices and improve their skills.
176
+
177
+ **Q: What if I don't have GitHub Copilot?**
178
+ A: You'll need an active GitHub Copilot subscription to use metacoding. Students can get it free through GitHub Education.
179
+
180
+ **Q: Can I use this without the CLI tool?**
181
+ A: The CLI tool provides the easiest setup experience. For manual setup, you can download instruction files from our GitHub repository.
182
+
183
+ **Q: Will this work with my preferred programming language?**
184
+ A: Yes! The general metacoding template (set of instructions) works with any language supported by GitHub Copilot.
185
+
186
+ **Q: Can I customize the workflow for my team's needs?**
187
+ A: Absolutely! All instruction files can be modified to match your team's specific requirements.
188
+
189
+ **Q: Does this replace learning to code?**
190
+ A: No, it enhances your learning by providing guidance on proven practices while you develop your coding skills.
191
+
192
+ **Q: What VS Code settings are required?**
193
+ A: The CLI automatically configures required settings, but you need `github.copilot.chat.codeGeneration.useInstructionFiles: true` and `chat.promptFiles: true`.
194
+
195
+ ## Troubleshooting
196
+
197
+ **Installation Issues:**
198
+
199
+ - Make sure Node.js (version 16+) is installed: `node --version`
200
+ - Verify npm is working: `npm --version`
201
+ - Try clearing npm cache: `npm cache clean --force`
202
+
203
+ **GitHub Copilot not responding to instructions:**
204
+
205
+ - Make sure you've restarted VS Code after installation
206
+ - Verify your GitHub Copilot subscription is active
207
+ - Check that the instruction files are in the correct `.github/` folder
208
+ - Ensure VS Code settings include the required custom instruction settings
209
+
210
+ **Instructions not applying automatically:**
211
+
212
+ - Ensure file names match exactly (including the `.instructions.md` extension)
213
+ - Verify the folder structure is correct
214
+ - Try manually referencing instructions in GitHub Copilot
215
+ - Run `metacoding validate` to check your setup
216
+
217
+ **CLI Command Issues:**
218
+
219
+ - Ensure metacoding is installed globally: `npm list -g metacoding`
220
+ - Try reinstalling: `npm uninstall -g metacoding && npm install -g metacoding`
221
+ - Check PATH configuration if command not found
222
+
223
+ ## Official Resources
224
+
225
+ Learn more about GitHub Copilot custom instructions:
226
+
227
+ - **[VS Code Custom Instructions Guide](https://code.visualstudio.com/blogs/2025/03/26/custom-instructions)** - **Official comprehensive guide** from the VS Code team on custom instructions
228
+ - **[GitHub Copilot Documentation](https://docs.github.com/en/copilot/using-github-copilot/best-practices-for-using-github-copilot)** - Official GitHub Copilot best practices
229
+ - **[VS Code Copilot Customization](https://code.visualstudio.com/docs/copilot/copilot-customization)** - Technical documentation for advanced customization
230
+
231
+ ## 🤝 Contributing
232
+
233
+ We welcome contributions to make metacoding even better! Whether you have:
234
+
235
+ - Improvements to existing workflows
236
+ - New instruction patterns for specific technologies
237
+ - Documentation enhancements
238
+ - Bug fixes or clarifications
239
+
240
+ Feel free to open an issue or submit a pull request.
241
+
242
+ ## 📄 License
243
+
244
+ This project is open source and available under the [MIT License](https://opensource.org/licenses/MIT). Use it freely in personal or commercial projects.
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * metacoding CLI Entry Point
5
+ *
6
+ * This file serves as the main entry point for the metacoding CLI tool.
7
+ * It delegates to the compiled TypeScript code in the lib directory.
8
+ */
9
+
10
+ const { main } = require('../lib/cli');
11
+
12
+ // Handle uncaught exceptions gracefully
13
+ process.on('uncaughtException', (error) => {
14
+ console.error('Unexpected error:', error.message);
15
+ process.exit(1);
16
+ });
17
+
18
+ process.on('unhandledRejection', (reason) => {
19
+ console.error('Unhandled promise rejection:', reason);
20
+ process.exit(1);
21
+ });
22
+
23
+ // Run the main CLI function
24
+ main().catch((error) => {
25
+ console.error('CLI Error:', error.message);
26
+ process.exit(1);
27
+ });
package/lib/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare function main(): Promise<void>;
2
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAWA,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA4F1C"}
package/lib/cli.js ADDED
@@ -0,0 +1,83 @@
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.main = main;
7
+ const commander_1 = require("commander");
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const init_1 = require("./commands/init");
10
+ const validate_1 = require("./commands/validate");
11
+ const update_1 = require("./commands/update");
12
+ const packageJson = require('../package.json');
13
+ const version = packageJson.version;
14
+ async function main() {
15
+ const program = new commander_1.Command();
16
+ program
17
+ .name('metacoding')
18
+ .description('Guided Development Workflow for GitHub Copilot')
19
+ .version(version)
20
+ .addHelpText('after', `
21
+ ${chalk_1.default.cyan('Examples:')}
22
+ ${chalk_1.default.dim('$')} metacoding init # Initialize metacoding in current directory
23
+ ${chalk_1.default.dim('$')} metacoding init --template react # Initialize with React template
24
+ ${chalk_1.default.dim('$')} metacoding validate # Validate current metacoding setup
25
+ ${chalk_1.default.dim('$')} metacoding update # Update to latest metacoding version
26
+
27
+ ${chalk_1.default.cyan('Learn more:')}
28
+ Documentation: https://github.com/anton-g-kulikov/metacoding
29
+ Issues: https://github.com/anton-g-kulikov/metacoding/issues
30
+ `);
31
+ program
32
+ .command('init')
33
+ .description('Initialize metacoding in the current project')
34
+ .option('-t, --template <type>', 'project template (general, react, node, python)', 'general')
35
+ .option('-f, --force', 'overwrite existing files without confirmation')
36
+ .option('--skip-vscode', 'skip VS Code settings configuration')
37
+ .option('--skip-git', 'skip Git repository initialization check')
38
+ .action(async (options) => {
39
+ try {
40
+ const initCommand = new init_1.InitCommand();
41
+ await initCommand.execute(options);
42
+ }
43
+ catch (error) {
44
+ console.error(chalk_1.default.red('Error during initialization:'), error instanceof Error ? error.message : error);
45
+ process.exit(1);
46
+ }
47
+ });
48
+ program
49
+ .command('validate')
50
+ .description('Validate current metacoding setup')
51
+ .option('--fix', 'automatically fix issues where possible')
52
+ .option('--strict', 'use strict validation rules')
53
+ .action(async (options) => {
54
+ try {
55
+ const validateCommand = new validate_1.ValidateCommand();
56
+ await validateCommand.execute(options);
57
+ }
58
+ catch (error) {
59
+ console.error(chalk_1.default.red('Error during validation:'), error instanceof Error ? error.message : error);
60
+ process.exit(1);
61
+ }
62
+ });
63
+ program
64
+ .command('update')
65
+ .description('Update existing metacoding setup to latest version')
66
+ .option('--template <type>', 'update to specific template type')
67
+ .option('--backup', 'create backup of existing files before updating')
68
+ .action(async (options) => {
69
+ try {
70
+ const updateCommand = new update_1.UpdateCommand();
71
+ await updateCommand.execute(options);
72
+ }
73
+ catch (error) {
74
+ console.error(chalk_1.default.red('Error during update:'), error instanceof Error ? error.message : error);
75
+ process.exit(1);
76
+ }
77
+ });
78
+ if (process.argv.length <= 2) {
79
+ program.help();
80
+ }
81
+ await program.parseAsync(process.argv);
82
+ }
83
+ //# sourceMappingURL=cli.js.map
package/lib/cli.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;AAWA,oBA4FC;AAvGD,yCAAoC;AACpC,kDAA0B;AAC1B,0CAA8C;AAC9C,kDAAsD;AACtD,8CAAkD;AAClD,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC/C,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;AAK7B,KAAK,UAAU,IAAI;IACxB,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,YAAY,CAAC;SAClB,WAAW,CAAC,gDAAgD,CAAC;SAC7D,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CACV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 @@
1
+ import { InitOptions } from '../types';
2
+ export declare class InitCommand {
3
+ private templateManager;
4
+ private fileSystem;
5
+ private vscodeService;
6
+ private projectDetector;
7
+ constructor();
8
+ execute(options: InitOptions): Promise<void>;
9
+ private getProjectConfiguration;
10
+ private setupProject;
11
+ private getDefaultTestFramework;
12
+ private getDefaultBuildTool;
13
+ private displayNextSteps;
14
+ }
15
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAiB,MAAM,UAAU,CAAC;AAStD,qBAAa,WAAW;IACtB,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,UAAU,CAAoB;IACtC,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,eAAe,CAAkB;;IAYnC,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;YAqCpC,uBAAuB;YAgGvB,YAAY;IAyC1B,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,gBAAgB;CAezB"}