Skip to content

Commit 30daeb0

Browse files
authored
Merge pull request #61 from freshtechbro/cli-patch
Release v0.2.4: Unified Project Root Configuration
2 parents 65b7e11 + 745b4b7 commit 30daeb0

28 files changed

Lines changed: 1796 additions & 494 deletions

.env.example

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ OPENROUTER_API_KEY=YOUR_OPENROUTER_API_KEY_HERE
5959
# VIBE_SETUP_AUTO_RUN="true"
6060
# VIBE_SETUP_SKIP_VALIDATION="false"
6161

62+
# =============================================================================
63+
# 🆕 UNIFIED PROJECT ROOT CONFIGURATION (v0.2.4+) - RECOMMENDED
64+
# =============================================================================
65+
66+
# Single variable for all project operations (replaces separate tool configurations)
67+
# Set this to your project's root directory for unified configuration across all tools
68+
# VIBE_PROJECT_ROOT="/path/to/your/project"
69+
70+
# Enable automatic project root detection for CLI users
71+
# Set to "true" for CLI usage (zero configuration), "false" for MCP client usage
72+
# VIBE_USE_PROJECT_ROOT_AUTO_DETECTION="true"
73+
6274
# =============================================================================
6375
# DIRECTORY CONFIGURATION
6476
# =============================================================================
@@ -69,15 +81,20 @@ OPENROUTER_API_KEY=YOUR_OPENROUTER_API_KEY_HERE
6981
# LLM Configuration File Path (default: ./llm_config.json)
7082
# LLM_CONFIG_PATH="/absolute/path/to/llm_config.json"
7183

84+
# Port Allocator Instance Tracking Directory (default: OS temp directory)
85+
# VIBE_CODER_INSTANCE_DIR="/path/to/your/output/directory/.temp/instances"
86+
87+
# =============================================================================
88+
# LEGACY DIRECTORY CONFIGURATION (Still Supported for Backward Compatibility)
89+
# =============================================================================
90+
# These variables are used as fallbacks if VIBE_PROJECT_ROOT is not set
91+
7292
# Task Manager Read Directory (for file operations)
7393
# VIBE_TASK_MANAGER_READ_DIR="/path/to/your/project/directory"
7494

7595
# Code Map Allowed Directory (for code analysis)
7696
# CODE_MAP_ALLOWED_DIR="/path/to/your/codebase/directory"
7797

78-
# Port Allocator Instance Tracking Directory (default: OS temp directory)
79-
# VIBE_CODER_INSTANCE_DIR="/path/to/your/output/directory/.temp/instances"
80-
8198
# =============================================================================
8299
# SECURITY CONFIGURATION
83100
# =============================================================================
@@ -125,9 +142,28 @@ OPENROUTER_API_KEY=YOUR_OPENROUTER_API_KEY_HERE
125142
# ENABLE_PERFORMANCE_MONITORING="true"
126143

127144
# =============================================================================
128-
# NOTES
145+
# CONFIGURATION NOTES
129146
# =============================================================================
130147
#
148+
# 🆕 UNIFIED CONFIGURATION BENEFITS (v0.2.4+):
149+
# - One variable (VIBE_PROJECT_ROOT) replaces multiple tool-specific variables
150+
# - Zero configuration for CLI users with auto-detection enabled
151+
# - Context-aware behavior for different usage modes (CLI vs MCP client)
152+
# - Backward compatible with existing legacy configurations
153+
#
154+
# TRANSPORT-SPECIFIC BEHAVIOR:
155+
# - CLI Transport: Uses auto-detection if enabled, otherwise VIBE_PROJECT_ROOT
156+
# - STDIO/MCP Transport: Uses VIBE_PROJECT_ROOT from environment or client config
157+
# - Legacy variables (CODE_MAP_ALLOWED_DIR, VIBE_TASK_MANAGER_READ_DIR) used as fallbacks
158+
#
159+
# DIRECTORY RESOLUTION PRIORITY:
160+
# 1. Auto-detection (CLI only, if enabled)
161+
# 2. VIBE_PROJECT_ROOT environment variable
162+
# 3. MCP client configuration
163+
# 4. Legacy environment variables
164+
# 5. Current working directory (fallback)
165+
#
166+
# GENERAL NOTES:
131167
# 1. OPENROUTER_API_KEY is required for the server to function
132168
# 2. Most other variables have sensible defaults and are optional
133169
# 3. Directory paths should be absolute paths for best compatibility

.github/workflows/ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: CI Pipeline
22

3+
# Simplified CI pipeline focusing on essential checks for faster feedback
4+
# Performance: ~70% faster than previous full test suite (3 min vs 10+ min)
5+
# Runs: Type checking, linting, and build validation only
6+
# Tests: Unit tests run locally by developers before PR submission
7+
38
on:
49
push:
510
branches: [ main, master, develop, 'feature/**', 'fix/**', 'cli-fixes' ]
@@ -10,7 +15,8 @@ env:
1015
NODE_VERSION: '20.x'
1116

1217
jobs:
13-
# Type checking
18+
# Type checking - Critical for TypeScript ESM codebase
19+
# Ensures no 'any' types and strict typing requirements
1420
type-check:
1521
name: TypeScript Type Check
1622
runs-on: ubuntu-latest
@@ -30,7 +36,8 @@ jobs:
3036
- name: TypeScript compilation check
3137
run: npm run type-check
3238

33-
# Linting
39+
# Linting - Enforces code quality standards
40+
# Catches style issues and potential bugs early
3441
lint:
3542
name: Code Quality (Lint)
3643
runs-on: ubuntu-latest
@@ -50,7 +57,9 @@ jobs:
5057
- name: Run ESLint
5158
run: npm run lint
5259

53-
# Build validation
60+
# Build validation - Ensures package compiles correctly
61+
# Creates distributable artifacts for deployment
62+
# Dependencies: Runs after type-check and lint pass
5463
build:
5564
name: Build
5665
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 206 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,203 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
## [0.2.4] - 2025-08-14
11+
12+
### Added
13+
- **Unified Project Root Configuration**
14+
- Single `VIBE_PROJECT_ROOT` environment variable replaces multiple tool-specific variables
15+
- Automatic project root detection for CLI users with `VIBE_USE_PROJECT_ROOT_AUTO_DETECTION`
16+
- Transport context awareness for different runtime environments (CLI vs MCP clients)
17+
- Intelligent directory resolution priority chain
18+
- Full backward compatibility with legacy environment variables
19+
20+
- **Enhanced Setup Wizard**
21+
- Interactive configuration with intelligent defaults
22+
- Auto-detection toggle for zero-configuration CLI usage
23+
- Comprehensive validation before saving configurations
24+
- Improved user experience with clear prompts and descriptions
25+
26+
- **Documentation Improvements**
27+
- Comprehensive README updates with quick start guides
28+
- Enhanced tool-specific documentation for all major tools
29+
- Added troubleshooting section
30+
- Updated configuration examples with unified approach
31+
32+
### Changed
33+
- **UnifiedSecurityConfigManager Enhancement**
34+
- Added transport context support for CLI auto-detection
35+
- Implemented directory resolution priority chain
36+
- Maintained backward compatibility while simplifying configuration
37+
- Enhanced error messages and logging
38+
39+
- **Configuration Management**
40+
- Simplified `.env.example` with clear sections
41+
- Updated `example_claude_desktop_config.json` with unified variables
42+
- Improved configuration templates for setup wizard
43+
- Enhanced validation and error handling
44+
45+
- **CLI Improvements**
46+
- Fixed initialization sequence for proper service startup
47+
- Added proper singleton service initialization order
48+
- Improved error handling and user feedback
49+
- Enhanced version display functionality
50+
51+
### Fixed
52+
- CLI configuration persistence issues
53+
- Version display problems in CLI
54+
- Service initialization order for singleton managers
55+
- Directory resolution in various transport contexts
56+
- Security boundary validation in unified configuration
57+
58+
### Removed
59+
- Redundant `package-security-fix.sh` script
60+
- Outdated configuration complexity
61+
- Unnecessary directory resolution duplication
62+
63+
## [0.2.3] - 2025-08-13
64+
65+
### Added
66+
- **Configuration Infrastructure**
67+
- UserConfigManager for intelligent OS-specific configuration directory management
68+
- Windows: `%APPDATA%\vibe-coder`
69+
- macOS: `~/Library/Application Support/vibe-coder`
70+
- Linux: `~/.config/vibe-coder` (XDG compliant)
71+
- ConfigValidator with comprehensive Zod-based validation and actionable error messages
72+
- Automatic configuration backup system with timestamped archives
73+
- Configuration templates for new users:
74+
- `.env.template` with inline documentation
75+
- `llm_config.template.json` with complete model mappings
76+
- `mcp-config.template.json` with tool-specific configurations
77+
- First-time user detection with multiple indicators
78+
- Non-interactive setup support for CI/CD environments
79+
80+
- **Setup Wizard Enhancements**
81+
- ASCII art banner for visual polish
82+
- Improved user prompts and guidance for OpenRouter API setup
83+
- Multi-location configuration saving (user and project directories)
84+
- Smart detection of existing configurations
85+
- Streamlined onboarding flow for new users
86+
- Directory permissions setup assistance
87+
- Security mode selection (strict/permissive)
88+
- Model preferences configuration
89+
90+
- **Documentation**
91+
- NPM Publishing Guide for maintainers
92+
- Comprehensive Release Notes for v0.2.3
93+
- Updated package contents documentation
94+
95+
### Changed
96+
- **CI/CD Pipeline Simplification**
97+
- Simplified pipeline to run unit tests only (70% faster execution)
98+
- Adjusted coverage threshold to 70% for unit tests
99+
- Added proper NODE_OPTIONS configuration for memory optimization
100+
- Made integration tests available for manual runs only
101+
- Optimized GitHub Actions workflow for faster builds
102+
- Removed redundant test runs during publishing
103+
104+
- **Documentation Cleanup**
105+
- Removed outdated CI-CD-ANALYSIS.md after implementation
106+
- Removed CONFIG_ONBOARDING_PLAN.md after feature completion
107+
- Consolidated redundant documentation files
108+
- Updated inline code documentation for clarity
109+
110+
- **Configuration Updates**
111+
- Enhanced mcp-config.json with better default settings
112+
- Improved research-manager tool configuration
113+
- Updated default timeout settings for better performance
114+
115+
### Fixed
116+
- **CLI Configuration Issues**
117+
- CLI configuration persistence across sessions now works correctly
118+
- Version display in CLI commands (`--version` flag) now shows correct version
119+
- First-time user crash when API key is missing resolved
120+
- Interactive mode banner display in REPL fixed
121+
- Executable permissions for CLI binary in build process corrected
122+
123+
- **REPL Mode Improvements**
124+
- Fixed banner display timing in interactive mode
125+
- Resolved context preservation issues in REPL sessions
126+
- Fixed command history navigation
127+
- Corrected auto-completion behavior
128+
129+
- **Build Process**
130+
- Pre-publish validation script improvements
131+
- Better handling of package contents verification
132+
- Fixed asset copying during build process
133+
134+
### Improved
135+
- **Performance Optimizations**
136+
- CI pipeline execution time reduced by ~70%
137+
- Memory usage optimized for test runs
138+
- Faster npm package installation
139+
- Better resource cleanup in tests
140+
- Reduced package size through documentation cleanup
141+
142+
- **User Experience**
143+
- More intuitive first-run experience
144+
- Better error messages with actionable suggestions
145+
- Improved help system with contextual examples
146+
- Enhanced progress indicators during setup
147+
148+
- **Code Quality**
149+
- Better TypeScript type definitions
150+
- Enhanced error handling throughout the codebase
151+
- Improved test coverage for new features
152+
- Cleaner separation of concerns in configuration management
153+
154+
## [0.2.2] - 2025-08-11
155+
156+
### Added
157+
- **Interactive REPL Mode**
158+
- `--interactive` flag for unified CLI to enable REPL mode
159+
- Context-aware command processing in interactive sessions
160+
- Command history and auto-completion support
161+
- Persistent session state across commands
162+
- Multi-line input support for complex commands
163+
- Exit commands (`exit`, `quit`, `.exit`)
164+
165+
### Fixed
166+
- **CLI Integration Issues**
167+
- Fixed CLI mode detection in unified-cli.ts
168+
- Resolved path resolution for global installations
169+
- Corrected argument parsing for interactive mode
170+
171+
### Improved
172+
- **Developer Experience**
173+
- Better error messages in CLI mode
174+
- Enhanced help system with more examples
175+
- Improved command parsing and validation
176+
- Better handling of interrupted commands
177+
178+
## [0.2.1] - 2025-08-10
179+
180+
### Fixed
181+
- **CLI Binary Installation**
182+
- Fixed executable permissions for CLI binaries (`vibe`, `vibe-coder-mcp`)
183+
- Resolved npm global installation path issues
184+
- Corrected binary linking in package.json
185+
- Fixed post-install script execution
186+
187+
- **Build Process Issues**
188+
- Added proper chmod +x for CLI files during build
189+
- Fixed asset copying for binary distribution
190+
- Resolved TypeScript compilation issues for CLI
191+
192+
### Changed
193+
- **CI/CD Optimizations**
194+
- Disabled tests during npm publish to speed up releases
195+
- Optimized publishing pipeline for faster deployments
196+
- Added pre-publish validation script
197+
198+
### Improved
199+
- **Installation Process**
200+
- Better handling of global npm installations
201+
- Improved post-install scripts with error handling
202+
- Enhanced binary path resolution for different platforms
203+
- Added fallback mechanisms for permission issues
204+
8205
## [0.2.0] - 2025-08-09
9206

10207
### 🚀 Added
@@ -173,4 +370,12 @@ This release introduces a complete CLI system while maintaining full backward co
173370
- **Tool-Specific Documentation** with detailed examples
174371
- **Architecture Documentation** with clear patterns and conventions
175372
- **Contributing Guidelines** for community development
176-
- **Security Policy** with vulnerability reporting procedures
373+
- **Security Policy** with vulnerability reporting procedures
374+
375+
---
376+
377+
[0.2.3]: https://github.com/freshtechbro/Vibe-Coder-MCP/compare/v0.2.2...v0.2.3
378+
[0.2.2]: https://github.com/freshtechbro/Vibe-Coder-MCP/compare/v0.2.1...v0.2.2
379+
[0.2.1]: https://github.com/freshtechbro/Vibe-Coder-MCP/compare/v0.2.0...v0.2.1
380+
[0.2.0]: https://github.com/freshtechbro/Vibe-Coder-MCP/compare/v0.1.0...v0.2.0
381+
[0.1.0]: https://github.com/freshtechbro/Vibe-Coder-MCP/releases/tag/v0.1.0

0 commit comments

Comments
 (0)