-
Notifications
You must be signed in to change notification settings - Fork 0
Core CLI Implementation with init, config, and commit Commands #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ages • Enhanced ValidationError interface with rich context fields (fieldDisplay, userMessage, issue, etc.) • Fixed ConfigError import in loader.ts (separated type import from value import) • Updated all validator error creation with comprehensive context and user-friendly messages • Implemented character analysis for invalid ID formats (identifies uppercase, dashes, numbers, etc.) • Rewrote error formatting in loader.ts with structured, scannable output • Removed 'lab init' suggestion from validation errors (not appropriate for existing configs) • Added specific issue identification and actionable guidance for each error type • Tested validation with single and multiple errors - all working correctly
• Added commander@14.0.2 for CLI argument parsing • Updated package-lock with new dependencies • Provides type-safe CLI framework for command handling
• Created version.ts for package version retrieval • Created error-handler.ts for centralized error handling • Utilities support ESM with import.meta.url • ConfigError integration with formatted output • Debug mode support via DEBUG env variable
• Created config command with show subcommand • Displays loaded configuration with source info • Shows emoji mode detection status • Integrates with Step 3 validation error handling • Provides debugging utility for users
• Created init command structure with options • Added --force and --preset flags • Placeholder for Step 5 implementation • Documents planned interactive features • Non-destructive update support ready
• Created commit command structure with options • Added type, scope, message flags • Added commit alias 'c' for quick access • Placeholder for Step 6 implementation • Documents planned interactive workflow
• Created central export point for all commands • Simplifies imports in program.ts • Provides overview of available commands • Supports clean module organization
• Created main program instance with metadata • Added help text customization with examples • Configured version display from package.json • Set up command registration structure • Added error suggestions for unknown commands • Supports both labcommitr and lab aliases
• Rewrote index.ts as CLI orchestrator • Added shebang for executable npm package • Integrated program setup and error handling • Minimal orchestration logic only • Supports async command implementations • Global error handling for all commands
• Added multiple TypeScript build output directories (build/, out/) • Added coverage and testing directories • Added npm/yarn/pnpm debug logs and cache directories • Added OS-specific files (.DS_Store, Thumbs.db) • Added IDE/editor directories (.vscode/, .idea/, etc.) • Added temporary files and cache directories • Prevents accidental commits of generated artifacts
• Removed build artifacts from version control • dist/ directory properly ignored via .gitignore • Local dist/ files preserved for development • Follows Node.js/TypeScript best practices
• Added minor version bump for CLI framework • Documents new user-facing commands (--help, --version, config show) • Notes dual alias support (labcommitr and lab) • Describes foundation for future init and commit commands
- Added @clack/prompts for modern interactive prompts - Added picocolors for terminal color styling - Required for Step 5 init command implementation
- Created preset interface and registry structure - Implemented four presets: Conventional, Gitmoji, Angular, and Minimal - Added buildConfig function to generate complete configurations - Each preset includes commit types with descriptions and emojis - Presets provide sensible defaults for emoji and scope modes
- Created Clef character with full-body ASCII art frames - Implemented ANSI-based terminal animations using cursor control - Added walk animations for smooth horizontal movement - Implemented intro, processing, and outro sequences - Terminal capability detection for graceful degradation - Screen clearing between sections for clean output - Non-blocking animations that enhance UX without distraction
- Created compact color-coded label system for visual hierarchy - Implemented preset selection prompt with four options - Added emoji support preference prompt - Implemented scope configuration with multiple modes - Added selective scope type selection for custom rules - Display functions for summary and next steps - Clean minimal design without boxes or excessive whitespace
- YAML generation with proper formatting and indentation - Pre-write validation to ensure valid output - Header comments with documentation link - Integration with ConfigValidator for quality assurance - Clean file writing to project root directory
- Orchestrated full initialization experience with Clef animations - Project root detection with git repository priority - Existing configuration detection with force override option - Integration of prompts, preset selection, and config generation - Processing animation during config file creation - Clean screen transitions between sections - Comprehensive error handling with cursor cleanup - Removed old placeholder init command - Updated command exports and program registration
- Documented new interactive init command with Clef mascot - Listed key features: presets, animations, clean UI - Marked as minor version bump for new user-facing feature
- Applied consistent formatting across all files - Updated changeset formatting - Code style consistency maintained
- Implement stationary cat with animated legs instead of horizontal movement - Add typewriter effect with character-by-character positioning - Position text beside cat with proper cursor management for concurrent animations - Replace walk-off exit with Houston-style bottom-to-top fade out - Adjust spacing to match @clack/prompts UI (catX=1, textX=20) - Fix text positioning bug by repositioning cursor before each character - Ensure clean side-by-side layout with symmetric spacing
- Add custom ANSI 256 color system with bright, energetic palette - Bright label backgrounds (magenta, cyan, blue, yellow, green) - Normal white text for intro/outro messages (clean, readable) - Replace summary section with Astro-style processing checklist - Add dynamic title that changes from 'initializing' to 'initialized' in green - Implement stationary outro cat with side-by-side message display - Remove redundant summary displays for cleaner flow - Keep prompts visible throughout entire initialization - Add proper spacing between sections - Fix cursor positioning for dynamic title updates
- Move cat rendering from line 5 to line 1 (remove blank lines) - Cat now starts at same vertical position as prompt labels - Eliminates excessive whitespace in intro sequence
- Add 3 lines of padding above cat (starts at line 4) - Left-aligned cat at column 1 (no indentation) - Increase spacing between cat and text to 3 spaces - Vertically center text with cat (line 5) - Update fadeOut to use new line positions
…1 space - Cat starts at line 3 (was line 4) with 2-line top padding - Reduced spacing between cat and text from 3 to 1 space - Updated fadeOut to use new position (lines 3-6) - Creates more compact, cleaner layout
- Cat now starts at line 1 with zero padding - Text centered at line 3 (was line 5) to align with cat - Updated fadeOut to use line positions 1-4 (was 3-6) - Eliminates all blank lines above the animation
- Changed textY from line 3 to line 2 (face/eyes level) - Text now visually aligns with cat's expression - Creates more natural, eye-level reading position
- Changed catX from 1 to 8 (7 leading spaces + 1) - Cat now aligns with the intended left edge position - Left margin now matches the visual cat position
- Removed all leading and trailing spaces from cat ASCII art frames - Changed catX from 8 to 1 (left edge positioning) - Updated catWidth from 18 to 5 (actual visible width) - Cat now renders flush with left edge of terminal
- Add BodyConfig interface with editor_preference field - Support 'auto', 'inline', and 'editor' modes - Update defaults and presets to include body configuration
- Add editor detection (nvim, vim, vi) with / support - Implement editInEditor function with temp file management - Integrate editor option into promptBody based on editor_preference config - Support 'editor', 'inline', and 'auto' preference modes - Add validation and retry logic for editor input - Handle editor cancellation and fallback to inline input
- Remove placeholder implementation - Import and use commit handler from commit/index module
- Exclude scripts directory from TypeScript compilation - Remove unused test scripts from package.json - Keep only sandbox testing script
- Ignore all .md files except README.md and .changeset/*.md - Ignore scripts/ directory (testing utilities) - Keep documentation files local-only for reference
- Add renderWithConnector helper function for manual connector line rendering - Refactor displayStagedFiles to use @clack/prompts log.info() for connector line start - Replace manual waitForEnter with @clack/prompts select() for confirmation - All multi-line file content now displays with connector lines - Removes waitForEnter function and readline dependency from index.ts
- Refactor displayPreview to use @clack/prompts log.info() for connector line start - Apply renderWithConnector to all preview content lines - Maintain visual consistency with files display prompt
Remove manual spacing lines and log.info() calls from commit prompts. All prompts now use direct select()/text() calls with full messages for consistency with @clack/prompts default behavior.
Add color coding for Git file status characters (A, M, D, R, C) to match Git's default color scheme. Colors will be used in commit command file display for better visual distinction.
- Add --find-copies-harder -C50 flags to detect copied files - Improve regex parsing to handle renamed/copied file formats - Correctly parse R100\told\tnew and C100\toriginal\tcopy formats - Use new path for renamed/copied files in display
Add clearTerminal() function to provide clean display and maximum available space for commit prompts. Only clears in TTY environments.
Add npm script to reset commit testing sandbox environment.
Update label function to center text within 6-character width for better visual balance. Applies same centering logic as commit prompts for consistency.
- Change label width from 6 to 7 characters - Fixes truncation of 'subject' label (was showing 'subjec') - Accommodates all current labels including 'subject' and 'preview' - Applied to both commit and init command prompts
- Add promptBodyRequired() function to init prompts - Integrate body requirement prompt into init flow (after auto-stage) - Update buildConfig() to accept and use bodyRequired customization - Default to false (optional) for backward compatibility - 'Yes' option marked as recommended for better commit practices
- Replace VOXEL_GITHUB_TOKEN with secrets.GITHUB_TOKEN - Uses automatically available token with workflow permissions - Removes dependency on manually managed Personal Access Token - Fixes 'Bad credentials' error in release workflow - Aligns with GitHub Actions best practices
- Change access from 'restricted' to 'public' in changeset config - Matches package.json publishConfig.access setting - Ensures consistent configuration across project
- Add changeset for body requirement prompt feature - Add changeset for editor support in commit body - Add changeset for commit command UX improvements - Add changeset for label truncation fix - Documents user-facing changes for upcoming release
- Version bumped from 0.0.1 to 0.1.0 - Generated CHANGELOG.md with all consumed changesets - Removed consumed changeset files (cli-framework, config-loading, config-validation, init-command) - Applied formatting to source files - Result of running 'changeset version' command
- Remove CHANGELOG.md from .gitignore exceptions - CHANGELOG.md should be tracked to preserve release history - Allows Changesets to append to existing changelog entries - Ensures full changelog is available on GitHub and in releases
- Includes all consumed changesets from initial development - Documents CLI framework, config system, validation, and init command - Preserves release history for future reference - Generated by changeset version command
- Remove .labcommitr.config.yaml from git tracking - Add .labcommitr.config.yaml and .labcommitr.config.yml to .gitignore - Config file is user-specific and should not be committed - Similar to .env files - each developer generates their own config
🦋 Changeset detectedLatest commit: dac039c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is a summary of the highlights of this PR. Review specific commits for a detailed list of changes:
labcommitrandlabcommand: Created and registered the tool command.-hoption available.initcommand: Initialization command to quickly setup the.labcommitr.config.yamlfile. Currently, only basic presets available. Advanced pathway planned for future.configcommand: Quickly validate and verify a configuration following changes.commitcommand: Commit command used to create commits with type/scope/subject/body (depending on configuration requirements).