trello-cli-unofficial 0.7.6 โ 0.8.1
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 +85 -9
- package/bun.lock +225 -2
- package/dist/main.js +26490 -25401
- package/main.ts +6 -3
- package/package.json +19 -6
- package/src/application/use-cases/AuthenticateUserUseCase.ts +7 -6
- package/src/application/use-cases/CreateBoardUseCase.ts +19 -0
- package/src/application/use-cases/CreateCardUseCase.ts +2 -1
- package/src/application/use-cases/CreateListUseCase.ts +19 -0
- package/src/application/use-cases/GetBoardDetailsUseCase.ts +41 -0
- package/src/application/use-cases/UpdateCardUseCase.ts +2 -1
- package/src/application/use-cases/index.ts +3 -0
- package/src/domain/entities/Board.ts +10 -2
- package/src/domain/entities/Card.ts +12 -1
- package/src/domain/entities/Config.ts +3 -1
- package/src/domain/entities/List.ts +14 -2
- package/src/domain/repositories/TrelloRepository.ts +4 -0
- package/src/i18n/index.ts +62 -5
- package/src/i18n/locales/en.json +154 -17
- package/src/i18n/locales/pt-BR.json +154 -17
- package/src/infrastructure/repositories/FileConfigRepository.ts +6 -3
- package/src/infrastructure/repositories/TrelloApiRepository.ts +155 -10
- package/src/presentation/cli/AuthController.ts +2 -1
- package/src/presentation/cli/BoardController.ts +160 -17
- package/src/presentation/cli/CardController.ts +169 -45
- package/src/presentation/cli/CommandController.ts +293 -27
- package/src/presentation/cli/ConfigController.ts +4 -3
- package/src/presentation/cli/TrelloCliController.ts +10 -2
- package/src/shared/ErrorHandler.ts +233 -0
- package/src/shared/OutputFormatter.ts +210 -0
- package/src/shared/index.ts +2 -0
package/README.md
CHANGED
|
@@ -22,29 +22,70 @@ An unofficial Trello CLI using Power-Up authentication, built with Bun for maxim
|
|
|
22
22
|
- ๐ ๏ธ **Traditional CLI**: Also works as a command-line tool
|
|
23
23
|
- ๐ **Internationalization**: Support for Portuguese (pt-BR) and English (en) with auto-detection
|
|
24
24
|
- ๐ค **Automated CI/CD**: Semantic versioning and NPM publishing on every release
|
|
25
|
-
-
|
|
26
|
-
-
|
|
25
|
+
- ๐งช **Quality Gates**: 95% test coverage threshold enforced in CI/CD
|
|
26
|
+
- ๐ **Secure Publishing**: NPM provenance with GitHub Actions OIDC
|
|
27
27
|
|
|
28
28
|
## ๐ฆ Installation
|
|
29
29
|
|
|
30
30
|
### Prerequisites
|
|
31
31
|
|
|
32
|
-
- [Bun](https://bun.sh/) or Node.js installed
|
|
32
|
+
- **[Bun](https://bun.sh/) (Recommended)** or **Node.js 16+** installed
|
|
33
33
|
- Trello account with Power-Up enabled
|
|
34
|
+
- **Supported Platforms:** Linux, macOS, Windows
|
|
35
|
+
|
|
36
|
+
**Note:** Bun provides better performance, but Node.js works perfectly fine.
|
|
34
37
|
|
|
35
38
|
### NPM Installation (Recommended)
|
|
36
39
|
|
|
40
|
+
The CLI works with both Bun and Node.js. Choose the package manager you prefer:
|
|
41
|
+
|
|
37
42
|
```bash
|
|
38
|
-
#
|
|
43
|
+
# Option 1: Using NPM (works with both Bun and Node.js)
|
|
39
44
|
npm install -g trello-cli-unofficial
|
|
40
45
|
|
|
41
|
-
#
|
|
46
|
+
# Option 2: Using Bun (recommended for better performance)
|
|
42
47
|
bun add -g trello-cli-unofficial
|
|
43
48
|
|
|
49
|
+
# Option 3: Using Yarn
|
|
50
|
+
yarn global add trello-cli-unofficial
|
|
51
|
+
|
|
52
|
+
# Option 4: Using PNPM
|
|
53
|
+
pnpm add -g trello-cli-unofficial
|
|
54
|
+
|
|
44
55
|
# Verify installation
|
|
45
56
|
tcu --version
|
|
46
57
|
```
|
|
47
58
|
|
|
59
|
+
#### Windows Installation
|
|
60
|
+
|
|
61
|
+
For Windows users, you can install using any package manager:
|
|
62
|
+
|
|
63
|
+
**PowerShell (Recommended):**
|
|
64
|
+
```powershell
|
|
65
|
+
# Using NPM (works with both Node.js and Bun)
|
|
66
|
+
npm install -g trello-cli-unofficial
|
|
67
|
+
|
|
68
|
+
# Or using Bun (recommended for better performance)
|
|
69
|
+
bun add -g trello-cli-unofficial
|
|
70
|
+
|
|
71
|
+
# Or using Yarn
|
|
72
|
+
yarn global add trello-cli-unofficial
|
|
73
|
+
|
|
74
|
+
# Verify installation
|
|
75
|
+
tcu --version
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Command Prompt:**
|
|
79
|
+
```cmd
|
|
80
|
+
# Using NPM
|
|
81
|
+
npm install -g trello-cli-unofficial
|
|
82
|
+
|
|
83
|
+
# Verify installation
|
|
84
|
+
tcu --version
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Note:** On Windows, you may need to restart your terminal or run `refreshenv` in PowerShell after installation to update your PATH.
|
|
88
|
+
|
|
48
89
|
### Manual Installation (Development)
|
|
49
90
|
|
|
50
91
|
```bash
|
|
@@ -101,6 +142,33 @@ The token is automatically saved in `~/.trello-cli-unofficial/config.json`:
|
|
|
101
142
|
}
|
|
102
143
|
```
|
|
103
144
|
|
|
145
|
+
### Environment Variables
|
|
146
|
+
|
|
147
|
+
You can configure the CLI using environment variables instead of the configuration file:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Copy the example file
|
|
151
|
+
cp .env.example .env
|
|
152
|
+
|
|
153
|
+
# Edit with your credentials
|
|
154
|
+
nano .env
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Available environment variables:
|
|
158
|
+
|
|
159
|
+
- `TRELLO_API_KEY`: Your Trello API key (optional, defaults to built-in key)
|
|
160
|
+
- `TRELLO_TOKEN`: Your Trello token (optional, will be prompted if not set)
|
|
161
|
+
|
|
162
|
+
Example `.env` file:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Trello CLI Unofficial - Environment Variables
|
|
166
|
+
TRELLO_TOKEN=ATTA...
|
|
167
|
+
TRELLO_API_KEY=your-custom-api-key
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Security Note**: Never commit your `.env` file to version control. The `.env.example` file contains safe defaults.
|
|
171
|
+
|
|
104
172
|
## Internationalization (i18n)
|
|
105
173
|
|
|
106
174
|
The CLI automatically detects your system language and displays messages in the appropriate language.
|
|
@@ -134,7 +202,7 @@ changeLanguage("pt-BR");
|
|
|
134
202
|
changeLanguage("en");
|
|
135
203
|
```
|
|
136
204
|
|
|
137
|
-
##
|
|
205
|
+
## ๐ Usage
|
|
138
206
|
|
|
139
207
|
### Interactive Mode (Recommended)
|
|
140
208
|
|
|
@@ -325,9 +393,17 @@ bun run lint
|
|
|
325
393
|
|
|
326
394
|
### Installation Issues
|
|
327
395
|
|
|
328
|
-
- Ensure Bun or Node.js is installed
|
|
329
|
-
- Try `npm install -g trello-cli-unofficial` if Bun fails
|
|
330
|
-
- Check that `tcu` command is in your PATH
|
|
396
|
+
- **Runtime Required:** Ensure Bun or Node.js 16+ is installed
|
|
397
|
+
- **Package Manager Fallback:** Try `npm install -g trello-cli-unofficial` if Bun fails
|
|
398
|
+
- **PATH Issues:** Check that `tcu` command is in your PATH
|
|
399
|
+
- **Permission Issues:** Try running as administrator/sudo
|
|
400
|
+
|
|
401
|
+
#### Windows-specific Issues
|
|
402
|
+
|
|
403
|
+
- **PATH not updated:** Restart your terminal or run `refreshenv` in PowerShell
|
|
404
|
+
- **Permission errors:** Run PowerShell/Command Prompt as Administrator
|
|
405
|
+
- **Node.js version:** Ensure you have Node.js 16+ or Bun 1.0+
|
|
406
|
+
- **Antivirus blocking:** Some antivirus software may block global NPM installations
|
|
331
407
|
|
|
332
408
|
## ๐ค Contributing
|
|
333
409
|
|