backlog-structurer-cli
v0.0.2
Published
CLI to consume the Backlog Structurer Agent API
Maintainers
Readme
Backlog Structurer CLI
A professional command-line interface to interact with the Backlog Structurer Agent API. Generate structured backlogs from product discoveries powered by AI using an intuitive and colorful CLI experience.
✨ Features
- 🌐 Internationalization: Support for Portuguese (pt-br) and English (en-us)
- 🎨 Professional UX: Colorful output, interactive prompts, and loading spinners
- 🏗️ Clean Architecture: Built with SOLID principles and layered architecture
- 💾 Auto-save: Optional automatic JSON result saving
- ⚙️ Configurable: CLI flags, config files, and environment variables
- ✅ Well-tested: Comprehensive unit tests with 90%+ coverage
- 📦 Easy to install: Available as a global npm package
📦 Installation
Global Installation (Recommended)
npm install -g backlog-structurer-cliLocal Installation
npm install backlog-structurer-cli🚀 Quick Start
After global installation, simply run:
backlog-structurerThe CLI will guide you through an interactive flow to generate structured backlogs.
For a more detailed quick start, see QUICKSTART.md
📖 Usage
Basic Usage
# Run with default settings (Portuguese)
backlog-structurer
# Run in English
backlog-structurer --lang en-us
# Specify API URL
backlog-structurer --api-url http://localhost:3002/api/v1/backlog/structure
# Auto-save results without prompting
backlog-structurer --save --output ./results
# Pass input directly via JSON string
backlog-structurer --input '{"productName":"My App","features":["Login","Dashboard"]}'
# Pass input from a file
backlog-structurer --input ./example-input.json --save --output ./resultsInput Options
The CLI accepts input data in three ways:
Interactive Mode (default): The CLI prompts you to enter data
backlog-structurerDirect JSON: Pass a JSON string via the
--inputoptionbacklog-structurer -i '{"productName":"My Product"}'File Path: Provide a path to a JSON or text file
backlog-structurer -i ./product-discovery.json
CLI Options
| Option | Alias | Description | Default |
|--------|-------|-------------|---------|
| --api-url <url> | -u | API endpoint URL | http://localhost:3002/api/v1/backlog/structure |
| --lang <code> | -l | Language (pt-br, en-us) | pt-br |
| --config <path> | -c | Path to JSON config file | - |
| --input <data> | -i | Input data (JSON, text, or file path) | - |
| --save | -s | Auto-save without prompting | false |
| --output <dir> | -o | Default output directory | - |
| --file <name> | -f | Default output filename | - |
| --no-save | - | Disable saving prompt | - |
Configuration File
Create a JSON configuration file to set default options:
{
"apiUrl": "http://localhost:3002/api/v1/backlog/structure",
"lang": "en-us",
"autoSave": true,
"defaultOutputDir": "./backlogs",
"defaultFileName": "backlog.json"
}Use it with:
backlog-structurer --config ./config.jsonEnvironment Variables
Set environment variables for configuration:
export BACKLOG_STRUCTURER_API_URL=http://localhost:3002/api/v1/backlog/structure
backlog-structurer🏗️ Architecture
The CLI is built following clean architecture principles with the following layers:
- Presentation Layer (
src/presentation/): CLI interface and user interaction - Application Layer (
src/application/): Use cases and business logic - Domain Layer (
src/domain/): Core entities and business rules - Infrastructure Layer (
src/infrastructure/): External services and persistence
For more details, see ARCHITECTURE.md
🧪 Testing
Run tests with coverage:
npm test
npm run test:coverage📚 Documentation
For comprehensive documentation, please refer to:
- QUICKSTART.md - Get started in 2 minutes
- ARCHITECTURE.md - Technical deep-dive
- CONTRIBUTING.md - How to contribute
- PROJECT_INDEX.md - Detailed project reference
- SUMMARY.md - Project overview
📝 License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
👥 Contributing
Contributions are welcome! Please refer to CONTRIBUTING.md for guidelines.
🙏 Acknowledgments
Built by the AuronForge team to empower product teams with AI-driven backlog structuring.
