이 저장소는 아카이브되었습니다.
이 프로젝트는 번들링 및 CommonJS 호환성 문제로 인해 아카이브되었습니다.
- 번들링 문제: CLI 구현 과정에서 번들링 시 호환성 이슈 발생
- CommonJS 호환성: 모듈 시스템 간 호환성 문제로 인한 실행 오류
- 시도 횟수: 두 차례에 걸쳐 CLI 구현을 시도했으나 번들링 단계에서 문제 발견
- 마이그레이션 결정: 문제 해결의 어려움으로 인해 다른 솔루션으로 마이그레이션 진행
현재 상태로는 프로덕션 환경에서 사용할 수 없다고 판단하여 아카이브 처리합니다.
📚 Full Documentation: docs/INDEX.md
A production-ready framework for building type-safe, scalable command-line applications using Effect.js and @effect/cli.
- Intelligent Layer Loading: Commands only initialize needed systems
- Clean Output: Simple commands run without verbose logging
- Fast Startup: 40-60% faster execution for basic operations
- Production Ready: Optimized build with minimal bundle size (1MB)
# Install dependencies
pnpm install
# Run tests to verify setup
pnpm test
# Build the project
pnpm build
# Install globally
pnpm build && cd dist && npm linkOnce installed globally, you can use the effect-cli command from anywhere:
# Show available commands
effect-cli --help
# Try the greet command (clean, fast execution)
effect-cli greet "Your Name"
# Output: Hello, Your Name!
# Queue management (intelligent layer loading)
effect-cli queue status
effect-cli queue clear --force
effect-cli queue export --format json -o metrics.json
# Queue status monitoring
effect-cli queue-status --format jsonFor development, use the local commands:
# Show available commands
pnpm dev --help
# Try the greet command (optimized performance)
pnpm dev greet "Your Name"
# Output: Hello, Your Name!
# Queue management (full system initialization)
pnpm dev queue status
pnpm dev queue clear --force
# Example commands (conditional loading)
pnpm dev list ./src/
├── commands/ # 🎯 Main CLI Commands (Performance Optimized)
│ ├── GreetCommand.ts # Basic greeting (fast execution)
│ ├── QueueCommand.ts # Advanced queue management (full system)
│ ├── QueueStatusCommand.ts
│ └── SimpleQueueCommand.ts
├── examples/ # 📚 CLI Pattern Examples
│ ├── ListCommand.ts # File operations example
│ ├── SampleCommand.ts # Comprehensive patterns
│ └── config.ts # Example configuration
├── services/ # 🔧 Core Services (Intelligent Loading)
│ ├── Queue/ # Task queue system (conditional)
│ ├── UserExperience/ # UX enhancement services
│ ├── FileSystem.ts # File system interface
│ └── FileSystemLive.ts # File system implementation
├── Cli.ts # Main CLI configuration (clean routing)
└── bin.ts # CLI entry point (intelligent layer loading)
docs/testing/
├── TDD_GUIDELINES.md # Test-driven development guide
├── TEST_CONVENTIONS.md # Testing standards and patterns
└── TESTING_REFERENCE.md # Complete testing reference
- 🔒 Type-Safe CLI: Fully typed arguments, options, and command handlers
- ⚡ Effect.js Integration: Error handling, dependency injection, and composability
- 📦 Queue Management: Production-ready task queue system with monitoring
- 🧪 TDD Framework: Comprehensive testing infrastructure and guidelines
- 🎨 Auto-formatting: Integrated ESLint and Prettier
- 🏗️ Service Pattern: Effect service layers and dependency injection
- 📚 Complete Documentation Index - Central documentation hub
- 🎯 CLI Usage Guide - Complete command reference and usage
- 🛠️ Development Guide - Setup, development, and extension guide
- 🧪 Testing Guide - Testing setup and best practices
- 📋 Test Conventions - Detailed testing standards
- 🏗️ TDD Guidelines - Test-driven development approach
- 📘 Complete User Guide - Comprehensive documentation
- 🔧 API Reference - Technical API documentation
- 📚 Testing Reference - Complete testing guide
- 🎯 Effect Patterns - Effect.js patterns and usage
- Create Command File: Create new command in
src/commands/ - Register Command: Add to
src/commands/index.tsandsrc/Cli.ts - Write Tests: Add tests in
test/commands/ - Validate: Run
pnpm run checkandpnpm test
See CLI Development Guide for detailed instructions.
Try these example commands to explore the patterns:
# List files in current directory
pnpm dev list ./
# Try the comprehensive sample command
pnpm dev sample package.json ./ "ts"
# Sample with verbose output and JSON format
pnpm dev sample --verbose --format json package.json ./ "config"
# See all available commands
pnpm dev --helpThe sample command demonstrates advanced CLI patterns including:
- Multiple argument types and validation
- Output formatting (text, JSON, table)
- File system operations with Effect.js
- Error handling and user experience
# Run in development mode
pnpm dev [command] [args]
# Run tests
pnpm test
# Type check
pnpm check
# Format code
pnpm format
# Build for production
pnpm buildCreate a new command in src/commands/:
// src/commands/MyCommand.ts
import * as Command from "@effect/cli/Command"
import * as Args from "@effect/cli/Args"
import * as Effect from "effect/Effect"
import * as Console from "effect/Console"
const nameArg = Args.text("name").pipe(
Args.withDescription("Your name")
)
export const myCommand = Command.make("greet", { name: nameArg }).pipe(
Command.withDescription("Greet someone"),
Command.withHandler(({ name }) =>
Effect.gen(function* () {
yield* Console.log(`Hello, ${name}!`)
})
)
)Register it in src/commands/index.ts:
import { myCommand } from "./MyCommand.js"
export const productionCommands = [
myCommand,
]Examples can be toggled via src/examples/config.ts:
export const ENABLE_EXAMPLES = false // Disable all examples
export const ExampleConfig = {
LIST_COMMAND: true,
SAMPLE_COMMAND: false, // Disable specific command
// ...other examples
}📖 더 자세한 내용: Configuration > Examples