trello-cli-unofficial 0.15.1 → 0.17.0
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/CHANGELOG.md +28 -0
- package/README.md +122 -6
- package/bin/cli.js +25 -117
- package/bun.lock +448 -1
- package/dist/main.js +2557 -2387
- package/package.json +9 -5
- package/src/application/use-cases/SearchCardsUseCase.ts +41 -0
- package/src/application/use-cases/index.ts +1 -0
- package/src/domain/repositories/TrelloRepository.ts +8 -0
- package/src/i18n/locales/en.json +21 -1
- package/src/i18n/locales/pt-BR.json +21 -1
- package/src/infrastructure/repositories/TrelloApiRepository.ts +17 -1
- package/src/presentation/cli/AuthController.ts +26 -11
- package/src/presentation/cli/CardController.ts +27 -69
- package/src/presentation/cli/CommandController.ts +25 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
# [0.17.0](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.16.0...v0.17.0) (2026-04-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* handle SIGINT in auth setup prompt with translated cancel message ([f352e4f](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/f352e4f5c4fe62b77573cbdb915cddbd4ae275cb))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **search:** support advanced card search filters and pagination ([a5ebf31](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/a5ebf31c434b4168d9745be1a99331dd536704a8))
|
|
12
|
+
|
|
13
|
+
# [0.16.0](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.15.1...v0.16.0) (2026-04-09)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* bun version on runner ([503fc7a](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/503fc7a1c49957add117473a25f061450bdf1d61))
|
|
19
|
+
* bun version on runner 2 ([d025133](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/d0251337bbbc6dbe0bfa0bd496dcaf07ca503736))
|
|
20
|
+
* bun version on runner 3 ([ca5d4f7](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/ca5d4f730b42e4c9cd073968fff764f173430fbf))
|
|
21
|
+
* bun version on runner 4 ([2b5f561](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/2b5f561ed028b5398655a8d6f7dc3d3d724f0d6c))
|
|
22
|
+
* **tests:** add pt-BR language setup in GetBoardDetailsUseCase test ([0ad8441](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/0ad844153845297e34f391d9e5c3b59211d4f646))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* support Node production runtime and improve Trello auth ([283219f](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/283219f0171fb6e92748c51990f8d43bb12426e4))
|
|
28
|
+
|
|
1
29
|
## [0.15.1](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.15.0...v0.15.1) (2026-04-06)
|
|
2
30
|
|
|
3
31
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Trello CLI Unofficial
|
|
2
2
|
|
|
3
|
+
*Read this in other languages: [English](#-english) | [Português](#-português)*
|
|
4
|
+
|
|
3
5
|
[](https://www.npmjs.com/package/trello-cli-unofficial)
|
|
4
6
|
[](https://opensource.org/licenses/MIT)
|
|
5
7
|
[](https://bun.sh)
|
|
@@ -8,9 +10,93 @@
|
|
|
8
10
|
[](https://github.com/JaegerCaiser/trello-cli-unofficial/actions)
|
|
9
11
|
[](https://github.com/JaegerCaiser/trello-cli-unofficial/actions)
|
|
10
12
|
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 🇺🇸 English
|
|
16
|
+
|
|
17
|
+
An unofficial Trello CLI with Power-Up authentication, built with Bun and TypeScript. It allows you to manage boards, lists, and cards with modern outputs and multi-profile support.
|
|
18
|
+
|
|
19
|
+
### Quick Start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install -g trello-cli-unofficial
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
tcu setup
|
|
27
|
+
tcu interactive
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 🔑 Configuring the Trello Token
|
|
31
|
+
|
|
32
|
+
On the first run, the CLI will ask for your Trello token (via Power-Up authentication). Follow these steps:
|
|
33
|
+
|
|
34
|
+
**Step 1 — Access the Power-Ups admin dashboard:**
|
|
35
|
+
Open in your browser: **https://trello.com/power-ups/admin**
|
|
36
|
+
Log in to Trello if necessary.
|
|
37
|
+
|
|
38
|
+
**Step 2 — Create a new Power-Up:**
|
|
39
|
+
Click on **"New"** and fill in any name (e.g., `My CLI`). The name doesn't matter — it's just to identify the app in your account.
|
|
40
|
+
> If you have created a Power-Up before, simply select it from the list.
|
|
41
|
+
|
|
42
|
+
**Step 3 — Generate the token manually:**
|
|
43
|
+
Inside your Power-Up's page, you will see a message on the right panel:
|
|
44
|
+
> *"Most developers will need to ask each user to authorize their app. If you are building an app for yourself or doing local testing, you can manually generate a **token**."*
|
|
45
|
+
|
|
46
|
+
Click on the highlighted word **token** in that message. A new page will open asking for confirmation — click **"Allow"**.
|
|
47
|
+
|
|
48
|
+
**Step 4 — Copy the token:**
|
|
49
|
+
The page will display a long sequence of characters starting with `ATTA`. Copy the entire string.
|
|
50
|
+
|
|
51
|
+
**Step 5 — Paste it into the terminal:**
|
|
52
|
+
When the CLI asks `Please enter your Trello token:`, paste the token and press Enter.
|
|
53
|
+
|
|
54
|
+
> **Tip:** The token must always start with `ATTA`. If the CLI rejects your input, make sure you copied the full token without any extra spaces.
|
|
55
|
+
|
|
56
|
+
> **Security:** The token is saved locally in `~/.trello-cli-unofficial/config.json`. To revoke access, go to [trello.com/account](https://trello.com/account) → **Power-Ups & Tokens** and revoke the token for this application.
|
|
57
|
+
|
|
58
|
+
### Features
|
|
59
|
+
|
|
60
|
+
- 🚀 Interactive mode with a guided menu
|
|
61
|
+
- 📊 Output in JSON, table, and CSV formats
|
|
62
|
+
- 🌍 i18n support (English / pt-BR)
|
|
63
|
+
- 🔐 Power-Up authentication for Trello
|
|
64
|
+
- 👤 Multi-profile support with persistent configuration
|
|
65
|
+
|
|
66
|
+
### Commands
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
tcu boards
|
|
70
|
+
|
|
71
|
+
tcu lists
|
|
72
|
+
|
|
73
|
+
tcu cards
|
|
74
|
+
|
|
75
|
+
tcu checklists
|
|
76
|
+
|
|
77
|
+
tcu config
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
*To see all available parameters and options, run `tcu <command> --help` in your terminal.*
|
|
81
|
+
|
|
82
|
+
### 📚 Full Documentation
|
|
83
|
+
|
|
84
|
+
- [./docs/commands.md](./docs/commands.md)
|
|
85
|
+
- [./docs/architecture.md](./docs/architecture.md)
|
|
86
|
+
- [./docs/migration-guide.md](./docs/migration-guide.md)
|
|
87
|
+
- [./docs/troubleshooting.md](./docs/troubleshooting.md)
|
|
88
|
+
|
|
89
|
+
### Contributing
|
|
90
|
+
|
|
91
|
+
Want to help improve the project? See our [Contributing Guide](CONTRIBUTING.md).
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 🇧🇷 Português
|
|
96
|
+
|
|
11
97
|
Um CLI não-oficial para Trello com autenticação Power-Up, feito em Bun e TypeScript. Permite gerenciar boards, lists e cards com saídas modernas e suporte a múltiplos perfis.
|
|
12
98
|
|
|
13
|
-
|
|
99
|
+
### Quick Start
|
|
14
100
|
|
|
15
101
|
```bash
|
|
16
102
|
npm install -g trello-cli-unofficial
|
|
@@ -21,7 +107,35 @@ tcu setup
|
|
|
21
107
|
tcu interactive
|
|
22
108
|
```
|
|
23
109
|
|
|
24
|
-
|
|
110
|
+
### 🔑 Configurando o Token do Trello
|
|
111
|
+
|
|
112
|
+
Na primeira execução o CLI vai pedir seu token do Trello (autenticação via Power-Up). Siga os passos abaixo:
|
|
113
|
+
|
|
114
|
+
**Passo 1 — Acesse o painel de administração de Power-Ups:**
|
|
115
|
+
Abra no navegador: **https://trello.com/power-ups/admin**
|
|
116
|
+
Faça login no Trello se necessário.
|
|
117
|
+
|
|
118
|
+
**Passo 2 — Crie um novo Power-Up:**
|
|
119
|
+
Clique em **"New"** e preencha com qualquer nome (ex: `Meu CLI`). O nome não importa — é só para identificar o app na sua conta.
|
|
120
|
+
> Se você já criou um Power-Up antes, basta selecioná-lo na lista.
|
|
121
|
+
|
|
122
|
+
**Passo 3 — Gere o token manualmente:**
|
|
123
|
+
Dentro da página do seu Power-Up, você verá no painel à direita a mensagem:
|
|
124
|
+
> *"A maioria dos desenvolvedores precisará solicitar a cada usuário que autorize seu aplicativo. Se você deseja criar um aplicativo para si mesmo ou está fazendo testes locais, é possível gerar um **token** manualmente."*
|
|
125
|
+
|
|
126
|
+
Clique na palavra **token** destacada nessa mensagem. Uma nova página abrirá pedindo confirmação — clique em **"Permitir"**.
|
|
127
|
+
|
|
128
|
+
**Passo 4 — Copie o token:**
|
|
129
|
+
A página exibirá uma longa sequência de caracteres começando com `ATTA`. Copie tudo.
|
|
130
|
+
|
|
131
|
+
**Passo 5 — Cole no terminal:**
|
|
132
|
+
Quando o CLI perguntar `Por favor, insira seu token do Trello:`, cole o token e pressione Enter.
|
|
133
|
+
|
|
134
|
+
> **Dica:** O token começa obrigatoriamente com `ATTA`. Se o CLI rejeitar sua entrada, verifique se copiou o token completo sem espaços extras.
|
|
135
|
+
|
|
136
|
+
> **Segurança:** O token fica salvo localmente em `~/.trello-cli-unofficial/config.json`. Para revogar o acesso, acesse [trello.com/account](https://trello.com/account) → **Power-Ups & Tokens** e revogue o token desta aplicação.
|
|
137
|
+
|
|
138
|
+
### Features
|
|
25
139
|
|
|
26
140
|
- 🚀 Modo interativo com menu guiado
|
|
27
141
|
- 📊 Saída em JSON, table e CSV
|
|
@@ -29,7 +143,7 @@ tcu interactive
|
|
|
29
143
|
- 🔐 Autenticação Power-Up para Trello
|
|
30
144
|
- 👤 Suporte a múltiplos perfis e configuração persistente
|
|
31
145
|
|
|
32
|
-
|
|
146
|
+
### Commands
|
|
33
147
|
|
|
34
148
|
```bash
|
|
35
149
|
tcu boards
|
|
@@ -38,18 +152,20 @@ tcu lists
|
|
|
38
152
|
|
|
39
153
|
tcu cards
|
|
40
154
|
|
|
155
|
+
tcu checklists
|
|
156
|
+
|
|
41
157
|
tcu config
|
|
42
158
|
```
|
|
43
159
|
|
|
44
160
|
*Para ver todos os parâmetros e opções, execute `tcu <comando> --help` no seu terminal.*
|
|
45
161
|
|
|
46
|
-
|
|
162
|
+
### 📚 Documentação Completa
|
|
47
163
|
|
|
48
164
|
- [./docs/commands.md](./docs/commands.md)
|
|
49
165
|
- [./docs/architecture.md](./docs/architecture.md)
|
|
50
166
|
- [./docs/migration-guide.md](./docs/migration-guide.md)
|
|
51
167
|
- [./docs/troubleshooting.md](./docs/troubleshooting.md)
|
|
52
168
|
|
|
53
|
-
|
|
169
|
+
### Contribuição
|
|
54
170
|
|
|
55
|
-
Quer ajudar a melhorar o projeto? Veja nosso [Guia de Contribuição](CONTRIBUTING.md).
|
|
171
|
+
Quer ajudar a melhorar o projeto? Veja nosso [Guia de Contribuição](CONTRIBUTING.md).
|
package/bin/cli.js
CHANGED
|
@@ -1,126 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { execSync, spawn } from 'node:child_process';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
4
3
|
import path from 'node:path';
|
|
5
4
|
import process from 'node:process';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
7
6
|
|
|
8
7
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
|
|
10
|
-
// Detect language from environment
|
|
11
|
-
function detectLanguage() {
|
|
12
|
-
const langVars = ['LANG', 'LANGUAGE', 'LC_ALL', 'LC_MESSAGES'];
|
|
13
|
-
for (const varName of langVars) {
|
|
14
|
-
const value = process.env[varName];
|
|
15
|
-
if (value && value.toLowerCase().includes('pt')) {
|
|
16
|
-
return 'pt';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return 'en';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const lang = detectLanguage();
|
|
23
|
-
|
|
24
|
-
const messages = {
|
|
25
|
-
pt: {
|
|
26
|
-
bunRequired: '❌ Bun é necessário para executar o Trello CLI Unofficial',
|
|
27
|
-
bunNotFound: 'Bun não foi encontrado no sistema',
|
|
28
|
-
installBun: '📦 Instale o Bun primeiro:',
|
|
29
|
-
installCommand: 'curl -fsSL https://bun.sh/install | bash',
|
|
30
|
-
windowsInstall: 'powershell -c "irm bun.sh/install.ps1 | iex"',
|
|
31
|
-
afterInstall: 'Após instalar, reinicie o terminal e execute novamente',
|
|
32
|
-
versionCommand: 'Verifique com: bun --version',
|
|
33
|
-
},
|
|
34
|
-
en: {
|
|
35
|
-
bunRequired: '❌ Bun is required to run Trello CLI Unofficial',
|
|
36
|
-
bunNotFound: 'Bun was not found on the system',
|
|
37
|
-
installBun: '📦 Please install Bun first:',
|
|
38
|
-
installCommand: 'curl -fsSL https://bun.sh/install | bash',
|
|
39
|
-
windowsInstall: 'powershell -c "irm bun.sh/install.ps1 | iex"',
|
|
40
|
-
afterInstall: 'After installation, restart your terminal and run again',
|
|
41
|
-
versionCommand: 'Check with: bun --version',
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const msg = messages[lang];
|
|
46
|
-
|
|
47
|
-
// Check if Bun is available (local or global)
|
|
48
|
-
function isBunAvailable() {
|
|
49
|
-
try {
|
|
50
|
-
// First try local Bun
|
|
51
|
-
execSync('node_modules/.bin/bun --version', { stdio: 'pipe' });
|
|
52
|
-
return 'local';
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
try {
|
|
56
|
-
// Then try global Bun
|
|
57
|
-
execSync('bun --version', { stdio: 'pipe' });
|
|
58
|
-
return 'global';
|
|
59
|
-
}
|
|
60
|
-
catch {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Main execution
|
|
67
|
-
const bunType = isBunAvailable();
|
|
68
|
-
if (!bunType) {
|
|
69
|
-
console.log(msg.bunRequired);
|
|
70
|
-
console.log(msg.bunNotFound);
|
|
71
|
-
console.log('');
|
|
72
|
-
console.log(msg.installBun);
|
|
73
|
-
|
|
74
|
-
// Detect platform for appropriate install command
|
|
75
|
-
const platform = process.platform;
|
|
76
|
-
if (platform === 'win32') {
|
|
77
|
-
console.log(`Windows: ${msg.windowsInstall}`);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
console.log(`Unix/Linux/macOS: ${msg.installCommand}`);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
console.log('');
|
|
84
|
-
console.log(msg.afterInstall);
|
|
85
|
-
console.log(msg.versionCommand);
|
|
86
|
-
process.exit(1);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Bun is available, execute the main script
|
|
90
8
|
const mainScript = path.join(__dirname, '..', 'dist', 'main.js');
|
|
91
|
-
const args = process.argv.slice(2);
|
|
92
9
|
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
10
|
+
if (!existsSync(mainScript)) {
|
|
11
|
+
const lang = ['LANG', 'LANGUAGE', 'LC_ALL', 'LC_MESSAGES']
|
|
12
|
+
.map(v => process.env[v] || '')
|
|
13
|
+
.some(v => v.toLowerCase().includes('pt'))
|
|
14
|
+
? 'pt'
|
|
15
|
+
: 'en';
|
|
16
|
+
|
|
17
|
+
const messages = {
|
|
18
|
+
pt: [
|
|
19
|
+
'❌ Build não encontrado. O pacote pode ter sido corrompido.',
|
|
20
|
+
' Tente reinstalar: npm install -g trello-cli-unofficial',
|
|
21
|
+
' Ou, se for desenvolvedor: bun run build',
|
|
22
|
+
],
|
|
23
|
+
en: [
|
|
24
|
+
'❌ Build not found. The package may be corrupted.',
|
|
25
|
+
' Try reinstalling: npm install -g trello-cli-unofficial',
|
|
26
|
+
' Or, if you are a developer: bun run build',
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
console.error(messages[lang].join('\n'));
|
|
31
|
+
process.exit(1);
|
|
106
32
|
}
|
|
107
33
|
|
|
108
|
-
|
|
109
|
-
const bunCommand = bunType === 'local'
|
|
110
|
-
? path.join(__dirname, '..', 'node_modules', '.bin', 'bun')
|
|
111
|
-
: 'bun';
|
|
112
|
-
|
|
113
|
-
const child = spawn(bunCommand, [mainScript, ...args], {
|
|
114
|
-
stdio: 'inherit',
|
|
115
|
-
cwd: process.cwd(),
|
|
116
|
-
env: { ...process.env, VERBOSE_ERRORS: process.env.VERBOSE_ERRORS || 'false' },
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
child.on('exit', (code) => {
|
|
120
|
-
process.exit(code);
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
child.on('error', (error) => {
|
|
124
|
-
console.error('Failed to start Bun:', error.message);
|
|
125
|
-
process.exit(1);
|
|
126
|
-
});
|
|
34
|
+
await import(pathToFileURL(mainScript).href);
|