1.0.2 ⢠Published 6 months ago
@bluefly/cli v1.0.2
Bluefly CLI - Optimized Edition
Enterprise-grade command line interface for the Bluefly LLM Platform. Built with TypeScript, featuring ecosystem-standard dependencies and professional CLI patterns.
š Quick Start
# Install dependencies
npm install
# Build the CLI
npm run build
# Run the CLI
npm run cli --help
# Test functionality
npm run cli workspace list
npm run cli dev test --coverage⨠Features
- Ecosystem-Standard Dependencies: Built with proven packages (commander, cosmiconfig, zod, ora, listr2)
- Type-Safe Configuration: Zod schema validation with auto-completion
- Professional UI: Rich progress indicators, colors, and formatted output
- Extensible Architecture: Command-based structure with dependency injection
- Development Tools: Comprehensive dev, test, and build commands
- Workspace Management: Multi-package workspace operations
š Project Structure
bfcli/
āāā src/
ā āāā cli-optimized.ts # Main CLI implementation
ā āāā types.d.ts # Type definitions
ā āāā commands/ # Command implementations
ā āāā services/ # Business logic services
ā āāā utils/ # Utility functions
ā āāā types/ # TypeScript types
āāā dist/ # Compiled output
āāā docs/ # Documentation
ā āāā guides/ # User guides
ā āāā api/ # API documentation
ā āāā archive/ # Legacy documentation
āāā scripts/ # Build and maintenance scripts
āāā tests/ # Test suites
āāā templates/ # Code templatesš§ Development
# Watch mode development
npm run build:watch
# Run tests
npm run test
npm run test:coverage
# Lint and format
npm run lint
npm run format
# Type checking
npm run type-check
# Full validation
npm run validateš Available Commands
Workspace Management
bfcli workspace list- List all packagesbfcli workspace info <package>- Package informationbfcli workspace create <name>- Create new package
Project Operations
bfcli project init [name]- Initialize new projectbfcli project status- Show project status
Development Tools
bfcli dev build- Build projectbfcli dev test- Run testsbfcli doctor- System diagnostics
Configuration
bfcli config get [key]- Get configurationbfcli config set <key> <value>- Set configurationbfcli config reset- Reset to defaults
šļø Architecture
The CLI follows modern patterns:
- Dependency Injection: Clean separation via CommandContext
- Command Pattern: Extensible command structure
- Configuration Management: Cosmiconfig with Zod validation
- Error Handling: Structured error boundaries
- Logging: Debug module with namespaces
š Dependencies
Core Dependencies
commander- CLI frameworkcosmiconfig- Configuration managementzod- Schema validationchalk- Terminal colorsora- Progress spinnerslistr2- Task executionenquirer- Interactive prompts
Development Dependencies
typescript- Type systemvitest- Testing frameworkeslint- Code lintingprettier- Code formatting
š License
MIT License - see LICENSE file for details.
š¤ Contributing
- Follow TypeScript strict mode
- Use ecosystem-standard patterns
- Add tests for new features
- Update documentation
- Run
npm run validatebefore commits
Documentation Structure
- CHANGELOG.md
- TODO_INNOVATION.md
- docs/: User guides, API documentation, and legacy docs
Changelog
See CHANGELOG.md for the full changelog.
Innovation TODO
See TODO_INNOVATION.md for the current innovation and enhancement backlog.
Part of the Bluefly LLM Platform - Enterprise AI orchestration with Drupal 11 as the control plane.