product-discovery-cli 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,236 +1,236 @@
1
- # Product Discovery CLI
2
-
3
- [![npm version](https://img.shields.io/npm/v/product-discovery-cli.svg)](https://www.npmjs.com/package/product-discovery-cli)
4
- [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
5
- [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](https://nodejs.org)
6
-
7
- A professional command-line interface to interact with the Product Discovery Agent API. Generate structured product discoveries powered by AI using an intuitive and colorful CLI experience.
8
-
9
- ## ✨ Features
10
-
11
- - 🌐 **Internationalization**: Support for Portuguese (pt-br) and English (en-us)
12
- - 🎨 **Professional UX**: Colorful output, interactive prompts, and loading spinners
13
- - 🏗️ **Clean Architecture**: Built with SOLID principles and layered architecture
14
- - 💾 **Auto-save**: Optional automatic JSON result saving
15
- - 🔄 **Iterative Improvement**: Refine discoveries with additional context
16
- - ⚙️ **Configurable**: CLI flags, config files, and environment variables
17
- - ✅ **Well-tested**: Comprehensive unit tests with 90%+ coverage
18
- - 📦 **Easy to install**: Available as a global npm package
19
-
20
- ## 📦 Installation
21
-
22
- ### Global Installation (Recommended)
23
-
24
- ```bash
25
- npm install -g product-discovery-cli
26
- ```
27
-
28
- ### Local Installation
29
-
30
- ```bash
31
- npm install product-discovery-cli
32
- ```
33
-
34
- ## 🚀 Quick Start
35
-
36
- After global installation, simply run:
37
-
38
- ```bash
39
- product-discovery
40
- ```
41
-
42
- The CLI will guide you through an interactive flow to generate product discoveries.
43
-
44
- ## 📖 Usage
45
-
46
- ### Basic Usage
47
-
48
- ```bash
49
- # Run with default settings (Portuguese)
50
- product-discovery
51
-
52
- # Run in English
53
- product-discovery --lang en-us
54
-
55
- # Specify API URL
56
- product-discovery --api-url http://localhost:3000/api/v1/discovery
57
-
58
- # Auto-save results without prompting
59
- product-discovery --save --output ./results
60
- ```
61
-
62
- ### CLI Options
63
-
64
- | Option | Alias | Description | Default |
65
- |--------|-------|-------------|---------|
66
- | `--api-url <url>` | `-u` | API endpoint URL | `http://localhost:3000/api/v1/discovery` |
67
- | `--lang <code>` | `-l` | Language (pt-br, en-us) | `pt-br` |
68
- | `--config <path>` | `-c` | Path to JSON config file | - |
69
- | `--save` | `-s` | Auto-save without prompting | `false` |
70
- | `--output <dir>` | `-o` | Default output directory | - |
71
- | `--file <name>` | `-f` | Default output filename | - |
72
- | `--no-save` | - | Disable saving prompt | - |
73
-
74
- ### Configuration File
75
-
76
- Create a JSON configuration file to set default options:
77
-
78
- ```json
79
- {
80
- "apiUrl": "http://localhost:3000/api/v1/discovery",
81
- "lang": "en-us",
82
- "autoSave": true,
83
- "defaultOutputDir": "./discoveries",
84
- "defaultFileName": "discovery.json"
85
- }
86
- ```
87
-
88
- Use it with:
89
-
90
- ```bash
91
- product-discovery --config ./config.json
92
- ```
93
-
94
- ### Environment Variables
95
-
96
- Set environment variables for configuration:
97
-
98
- ```bash
99
- export PRODUCT_DISCOVERY_API_URL=http://localhost:3000/api/v1/discovery
100
- product-discovery
101
- ```
102
-
103
- ## 🌍 Internationalization
104
-
105
- The CLI supports multiple languages:
106
-
107
- - **Portuguese (pt-br)**: Default language
108
- - **English (en-us)**: Full translation of all messages
109
-
110
- Switch languages using the `--lang` flag:
111
-
112
- ```bash
113
- product-discovery --lang en-us
114
- ```
115
-
116
- ## 🏗️ Architecture
117
-
118
- This project follows **Clean Architecture** principles with clear separation of concerns:
119
-
120
- ```
121
- src/
122
- ├── application/ # Use cases and business logic
123
- ├── domain/ # Domain entities and utilities
124
- ├── infrastructure/ # External dependencies (API, storage, i18n)
125
- ├── presentation/ # CLI controllers and routes
126
- └── config/ # Configuration and CLI options
127
- ```
128
-
129
- ### Key Principles
130
-
131
- - **SOLID**: Single Responsibility, Open/Closed, Dependency Inversion
132
- - **Dependency Injection**: All dependencies injected via constructors
133
- - **Testability**: Easy to mock and test each layer independently
134
-
135
- ## 🛠️ Development
136
-
137
- ### Prerequisites
138
-
139
- - Node.js >= 20
140
-
141
- ### Setup
142
-
143
- ```bash
144
- # Clone the repository
145
- git clone https://github.com/AuronForge/product-discovery-cli.git
146
- cd product-discovery-cli
147
-
148
- # Install dependencies
149
- npm install
150
-
151
- # Run locally
152
- npm start
153
-
154
- # Run tests
155
- npm test
156
-
157
- # Run tests with coverage
158
- npm run test:coverage
159
- ```
160
-
161
- ### Testing
162
-
163
- The project includes comprehensive unit tests with Jest:
164
-
165
- ```bash
166
- # Run all tests
167
- npm test
168
-
169
- # Run with coverage report
170
- npm run test:coverage
171
- ```
172
-
173
- Coverage thresholds are set to 90% for all metrics.
174
-
175
- ## 📝 Interactive Flow
176
-
177
- The CLI guides you through an intuitive workflow:
178
-
179
- 1. **Welcome**: Display branded banner with metadata
180
- 2. **Input**: Describe your idea/problem/application
181
- 3. **Processing**: Call the Product Discovery API
182
- 4. **Results**: View the generated JSON discovery
183
- 5. **Save**: Optionally save results to a file
184
- 6. **Improve**: Refine with additional context (optional)
185
- 7. **Repeat**: Run discovery for another idea (optional)
186
-
187
- ## 🎨 Output Example
188
-
189
- ```
190
- ╭────────────────────────────────────────────────────────────────────╮
191
- │ │
192
- │ ____ _ _ ____ _ │
193
- │ | _ \ _ __ ___ __| |_ _ ___| |_ | _ \(_)___ ___ ___ │
194
- │ | |_) | '__/ _ \ / _ | | | |/ __| __| | | | | / __|/ __/ _ \ │
195
- │ | __/| | | (_) | (_| | |_| | (__| |_ | |_| | \__ \ (_| (_) | │
196
- │ |_| |_| \___/ \__,_|\__,_|\___|\__| |____/|_|___/\___\___/ │
197
- │ │
198
- │ Product Discovery CLI │
199
- │ Generate a structured product discovery via the API. │
200
- │ │
201
- │ Author: AuronForge │
202
- │ Version: 0.0.2 │
203
- │ License: Apache-2.0 │
204
- │ │
205
- ╰────────────────────────────────────────────────────────────────────╯
206
- ```
207
-
208
- ## 📄 License
209
-
210
- This project is licensed under the Apache-2.0 License.
211
-
212
- ## 👤 Author
213
-
214
- **José Eduardo Trindade E Marques**
215
-
216
- - Company: AuronForge 🚀
217
- - Email: edu.temarques@gmail.com
218
- - LinkedIn: [linkedin.com/in/edu-marques29](https://linkedin.com/in/edu-marques29)
219
-
220
- ## 🤝 Contributing
221
-
222
- Contributions are welcome! Please feel free to submit a Pull Request.
223
-
224
- ## 🐛 Issues
225
-
226
- Found a bug or have a suggestion? Please open an issue on [GitHub](https://github.com/AuronForge/product-discovery-cli/issues).
227
-
228
- ## 🔗 Links
229
-
230
- - [npm Package](https://www.npmjs.com/package/product-discovery-cli)
231
- - [GitHub Repository](https://github.com/AuronForge/product-discovery-cli)
232
- - [Product Discovery Agent API](https://github.com/AuronForge/product-discovery-agent)
233
-
234
- ---
235
-
236
- Made with ❤️ by AuronForge
1
+ # Product Discovery CLI
2
+
3
+ [![npm version](https://img.shields.io/npm/v/product-discovery-cli.svg)](https://www.npmjs.com/package/product-discovery-cli)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
5
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](https://nodejs.org)
6
+
7
+ A professional command-line interface to interact with the Product Discovery Agent API. Generate structured product discoveries powered by AI using an intuitive and colorful CLI experience.
8
+
9
+ ## ✨ Features
10
+
11
+ - 🌐 **Internationalization**: Support for Portuguese (pt-br) and English (en-us)
12
+ - 🎨 **Professional UX**: Colorful output, interactive prompts, and loading spinners
13
+ - 🏗️ **Clean Architecture**: Built with SOLID principles and layered architecture
14
+ - 💾 **Auto-save**: Optional automatic JSON result saving
15
+ - 🔄 **Iterative Improvement**: Refine discoveries with additional context
16
+ - ⚙️ **Configurable**: CLI flags, config files, and environment variables
17
+ - ✅ **Well-tested**: Comprehensive unit tests with 90%+ coverage
18
+ - 📦 **Easy to install**: Available as a global npm package
19
+
20
+ ## 📦 Installation
21
+
22
+ ### Global Installation (Recommended)
23
+
24
+ ```bash
25
+ npm install -g product-discovery-cli
26
+ ```
27
+
28
+ ### Local Installation
29
+
30
+ ```bash
31
+ npm install product-discovery-cli
32
+ ```
33
+
34
+ ## 🚀 Quick Start
35
+
36
+ After global installation, simply run:
37
+
38
+ ```bash
39
+ product-discovery
40
+ ```
41
+
42
+ The CLI will guide you through an interactive flow to generate product discoveries.
43
+
44
+ ## 📖 Usage
45
+
46
+ ### Basic Usage
47
+
48
+ ```bash
49
+ # Run with default settings (Portuguese)
50
+ product-discovery
51
+
52
+ # Run in English
53
+ product-discovery --lang en-us
54
+
55
+ # Specify API URL
56
+ product-discovery --api-url http://localhost:3000/api/v1/discovery
57
+
58
+ # Auto-save results without prompting
59
+ product-discovery --save --output ./results
60
+ ```
61
+
62
+ ### CLI Options
63
+
64
+ | Option | Alias | Description | Default |
65
+ |--------|-------|-------------|---------|
66
+ | `--api-url <url>` | `-u` | API endpoint URL | `http://localhost:3000/api/v1/discovery` |
67
+ | `--lang <code>` | `-l` | Language (pt-br, en-us) | `pt-br` |
68
+ | `--config <path>` | `-c` | Path to JSON config file | - |
69
+ | `--save` | `-s` | Auto-save without prompting | `false` |
70
+ | `--output <dir>` | `-o` | Default output directory | - |
71
+ | `--file <name>` | `-f` | Default output filename | - |
72
+ | `--no-save` | - | Disable saving prompt | - |
73
+
74
+ ### Configuration File
75
+
76
+ Create a JSON configuration file to set default options:
77
+
78
+ ```json
79
+ {
80
+ "apiUrl": "http://localhost:3000/api/v1/discovery",
81
+ "lang": "en-us",
82
+ "autoSave": true,
83
+ "defaultOutputDir": "./discoveries",
84
+ "defaultFileName": "discovery.json"
85
+ }
86
+ ```
87
+
88
+ Use it with:
89
+
90
+ ```bash
91
+ product-discovery --config ./config.json
92
+ ```
93
+
94
+ ### Environment Variables
95
+
96
+ Set environment variables for configuration:
97
+
98
+ ```bash
99
+ export PRODUCT_DISCOVERY_API_URL=http://localhost:3000/api/v1/discovery
100
+ product-discovery
101
+ ```
102
+
103
+ ## 🌍 Internationalization
104
+
105
+ The CLI supports multiple languages:
106
+
107
+ - **Portuguese (pt-br)**: Default language
108
+ - **English (en-us)**: Full translation of all messages
109
+
110
+ Switch languages using the `--lang` flag:
111
+
112
+ ```bash
113
+ product-discovery --lang en-us
114
+ ```
115
+
116
+ ## 🏗️ Architecture
117
+
118
+ This project follows **Clean Architecture** principles with clear separation of concerns:
119
+
120
+ ```
121
+ src/
122
+ ├── application/ # Use cases and business logic
123
+ ├── domain/ # Domain entities and utilities
124
+ ├── infrastructure/ # External dependencies (API, storage, i18n)
125
+ ├── presentation/ # CLI controllers and routes
126
+ └── config/ # Configuration and CLI options
127
+ ```
128
+
129
+ ### Key Principles
130
+
131
+ - **SOLID**: Single Responsibility, Open/Closed, Dependency Inversion
132
+ - **Dependency Injection**: All dependencies injected via constructors
133
+ - **Testability**: Easy to mock and test each layer independently
134
+
135
+ ## 🛠️ Development
136
+
137
+ ### Prerequisites
138
+
139
+ - Node.js >= 20
140
+
141
+ ### Setup
142
+
143
+ ```bash
144
+ # Clone the repository
145
+ git clone https://github.com/AuronForge/product-discovery-cli.git
146
+ cd product-discovery-cli
147
+
148
+ # Install dependencies
149
+ npm install
150
+
151
+ # Run locally
152
+ npm start
153
+
154
+ # Run tests
155
+ npm test
156
+
157
+ # Run tests with coverage
158
+ npm run test:coverage
159
+ ```
160
+
161
+ ### Testing
162
+
163
+ The project includes comprehensive unit tests with Jest:
164
+
165
+ ```bash
166
+ # Run all tests
167
+ npm test
168
+
169
+ # Run with coverage report
170
+ npm run test:coverage
171
+ ```
172
+
173
+ Coverage thresholds are set to 90% for all metrics.
174
+
175
+ ## 📝 Interactive Flow
176
+
177
+ The CLI guides you through an intuitive workflow:
178
+
179
+ 1. **Welcome**: Display branded banner with metadata
180
+ 2. **Input**: Describe your idea/problem/application
181
+ 3. **Processing**: Call the Product Discovery API
182
+ 4. **Results**: View the generated JSON discovery
183
+ 5. **Save**: Optionally save results to a file
184
+ 6. **Improve**: Refine with additional context (optional)
185
+ 7. **Repeat**: Run discovery for another idea (optional)
186
+
187
+ ## 🎨 Output Example
188
+
189
+ ```
190
+ ╭────────────────────────────────────────────────────────────────────╮
191
+ │ │
192
+ │ ____ _ _ ____ _ │
193
+ │ | _ \ _ __ ___ __| |_ _ ___| |_ | _ \(_)___ ___ ___ │
194
+ │ | |_) | '__/ _ \ / _ | | | |/ __| __| | | | | / __|/ __/ _ \ │
195
+ │ | __/| | | (_) | (_| | |_| | (__| |_ | |_| | \__ \ (_| (_) | │
196
+ │ |_| |_| \___/ \__,_|\__,_|\___|\__| |____/|_|___/\___\___/ │
197
+ │ │
198
+ │ Product Discovery CLI │
199
+ │ Generate a structured product discovery via the API. │
200
+ │ │
201
+ │ Author: AuronForge │
202
+ │ Version: 0.0.2 │
203
+ │ License: Apache-2.0 │
204
+ │ │
205
+ ╰────────────────────────────────────────────────────────────────────╯
206
+ ```
207
+
208
+ ## 📄 License
209
+
210
+ This project is licensed under the Apache-2.0 License.
211
+
212
+ ## 👤 Author
213
+
214
+ **José Eduardo Trindade E Marques**
215
+
216
+ - Company: AuronForge 🚀
217
+ - Email: edu.temarques@gmail.com
218
+ - LinkedIn: [linkedin.com/in/edu-marques29](https://linkedin.com/in/edu-marques29)
219
+
220
+ ## 🤝 Contributing
221
+
222
+ Contributions are welcome! Please feel free to submit a Pull Request.
223
+
224
+ ## 🐛 Issues
225
+
226
+ Found a bug or have a suggestion? Please open an issue on [GitHub](https://github.com/AuronForge/product-discovery-cli/issues).
227
+
228
+ ## 🔗 Links
229
+
230
+ - [npm Package](https://www.npmjs.com/package/product-discovery-cli)
231
+ - [GitHub Repository](https://github.com/AuronForge/product-discovery-cli)
232
+ - [Product Discovery Agent API](https://github.com/AuronForge/product-discovery-agent)
233
+
234
+ ---
235
+
236
+ Made with ❤️ by AuronForge
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "product-discovery-cli",
3
- "version": "0.0.6",
4
- "description": "CLI to consume the Product Discovery Agent API",
5
- "license": "Apache-2.0",
6
- "author": "AuronForge",
7
- "keywords": [
8
- "product-discovery",
9
- "ai-agent",
10
- "copilot",
11
- "cli"
12
- ],
13
- "bin": {
14
- "product-discovery": "src/index.js"
15
- },
16
- "files": [
17
- "src",
18
- "package.json"
19
- ],
20
- "publishConfig": {
21
- "access": "public"
22
- },
23
- "scripts": {
24
- "start": "node src/index.js",
25
- "test": "jest",
26
- "test:coverage": "jest --coverage",
27
- "postinstall": "npm cache verify"
28
- },
29
- "engines": {
30
- "node": ">=20"
31
- },
32
- "dependencies": {
33
- "boxen": "^5.1.2",
34
- "chalk": "^4.1.2",
35
- "commander": "^11.1.0",
36
- "inquirer": "^8.2.6",
37
- "ora": "^5.4.1"
38
- },
39
- "devDependencies": {
40
- "jest": "^29.7.0"
41
- }
42
- }
1
+ {
2
+ "name": "product-discovery-cli",
3
+ "version": "0.0.8",
4
+ "description": "CLI to consume the Product Discovery Agent API",
5
+ "license": "Apache-2.0",
6
+ "author": "AuronForge",
7
+ "keywords": [
8
+ "product-discovery",
9
+ "ai-agent",
10
+ "copilot",
11
+ "cli"
12
+ ],
13
+ "bin": {
14
+ "product-discovery": "src/index.js"
15
+ },
16
+ "files": [
17
+ "src",
18
+ "package.json"
19
+ ],
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "scripts": {
24
+ "start": "node src/index.js",
25
+ "test": "jest",
26
+ "test:coverage": "jest --coverage",
27
+ "postinstall": "npm cache verify"
28
+ },
29
+ "engines": {
30
+ "node": ">=20"
31
+ },
32
+ "dependencies": {
33
+ "boxen": "^5.1.2",
34
+ "chalk": "^4.1.2",
35
+ "commander": "^11.1.0",
36
+ "inquirer": "^8.2.6",
37
+ "ora": "^5.4.1"
38
+ },
39
+ "devDependencies": {
40
+ "jest": "^29.7.0"
41
+ }
42
+ }