dspot-trello-gantt 0.3.4 → 0.3.5
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 +135 -223
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,311 +1,223 @@
|
|
|
1
|
-
# dspot-trello-gantt
|
|
1
|
+
# Quick Guide: dspot-trello-gantt
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Optionally publishes the result directly to a [Google Apps Script](https://script.google.com) web app so clients can access it via a stable URL.
|
|
3
|
+
This document summarizes the real installation and publishing flow we validated, including common errors and how to fix them.
|
|
6
4
|
|
|
7
5
|
## Index
|
|
8
6
|
|
|
9
|
-
- [
|
|
10
|
-
- [
|
|
7
|
+
- [1) Install and validate the CLI](#1-install-and-validate-the-cli)
|
|
8
|
+
- [2) Initialize a local project](#2-initialize-a-local-project)
|
|
9
|
+
- [3) Configure Trello in `.env`](#3-configure-trello-in-env)
|
|
10
|
+
- [4) Generate a local report](#4-generate-a-local-report)
|
|
11
|
+
- [5) Configure publishing to Google Apps Script](#5-configure-publishing-to-google-apps-script)
|
|
12
|
+
- [6) Publish](#6-publish)
|
|
11
13
|
- [Commands](#commands)
|
|
12
|
-
- [
|
|
13
|
-
- [
|
|
14
|
-
- [Progress](#progress)
|
|
15
|
-
- [Milestones](#milestones)
|
|
16
|
-
- [Install + credentials (step by step)](#install--credentials-step-by-step)
|
|
17
|
-
- [Publish flow (Google Apps Script)](#publish-flow-google-apps-script)
|
|
18
|
-
- [MCP server](#mcp-server)
|
|
19
|
-
- [Programmatic usage](#programmatic-usage)
|
|
20
|
-
- [License](#license)
|
|
21
|
-
|
|
22
|
-
## Quick Start
|
|
14
|
+
- [Common errors (and fixes)](#common-errors-and-fixes)
|
|
15
|
+
- [Operational recommendation](#operational-recommendation)
|
|
23
16
|
|
|
24
|
-
|
|
25
|
-
npm install -g dspot-trello-gantt
|
|
26
|
-
trello-gantt-js init # creates a .env template in the current directory
|
|
27
|
-
# fill in .env with your credentials
|
|
28
|
-
trello-gantt-js generate # generates gantt.html
|
|
29
|
-
trello-gantt-js generate --timestamp-output # generates gantt-YYYYMMDDTHHMMSSZ.html
|
|
30
|
-
```
|
|
17
|
+
## 1) Install and validate the CLI
|
|
31
18
|
|
|
32
|
-
|
|
19
|
+
Requirement: Node.js `>=18` (recommended LTS versions: `18`, `20`, or newer).
|
|
33
20
|
|
|
34
21
|
```bash
|
|
22
|
+
node -v
|
|
23
|
+
npm -v
|
|
35
24
|
npm install -g dspot-trello-gantt
|
|
25
|
+
trello-gantt-js --help
|
|
36
26
|
```
|
|
37
27
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Commands
|
|
41
|
-
|
|
42
|
-
### `generate` (default)
|
|
43
|
-
|
|
44
|
-
Fetches Trello data and generates a standalone HTML file.
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
trello-gantt-js generate [options]
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
| Option | Env variable | Description |
|
|
51
|
-
|---|---|---|
|
|
52
|
-
| `--board-id <id>` | `GANTT_BOARD_ID` | Trello board ID or URL |
|
|
53
|
-
| `--title <title>` | `GANTT_TITLE` | Chart title (default: `Project Gantt Chart`) |
|
|
54
|
-
| `--lists <names>` | `GANTT_LISTS` | Comma-separated list names to include. Empty = all lists |
|
|
55
|
-
| `--milestone-list <names>` | `GANTT_MILESTONE_LISTS` | Lists to group as milestones |
|
|
56
|
-
| `--output <path>` | `GANTT_OUTPUT` | Output file path (default: `gantt.html`) |
|
|
57
|
-
| `--timestamp-output` | `GANTT_TIMESTAMP_OUTPUT` | Appends UTC timestamp to output filename |
|
|
28
|
+
If `trello-gantt-js --help` returns output, the global installation is correct.
|
|
58
29
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
Generates the HTML and uploads it to a Google Apps Script web app. Clients access a stable URL that always shows the latest version.
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
trello-gantt-js publish [options]
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Accepts the same options as `generate` (except `--output`). Requires additional environment variables:
|
|
68
|
-
|
|
69
|
-
| Env variable | Description |
|
|
70
|
-
|---|---|
|
|
71
|
-
| `GAPPS_SCRIPT_ID` | Apps Script project ID |
|
|
72
|
-
| `GAPPS_DEPLOYMENT_ID` | Deployment ID (stable URL) |
|
|
73
|
-
| `GAPPS_ALLOWED_EMAILS` | Comma-separated email allowlist. Empty = public access |
|
|
74
|
-
|
|
75
|
-
On first run, a browser window opens for Google OAuth authorization. The token is cached in `credentials/token.json` for subsequent runs.
|
|
76
|
-
|
|
77
|
-
### `init`
|
|
78
|
-
|
|
79
|
-
Creates a `.env` template in the current directory.
|
|
30
|
+
## 2) Initialize a local project
|
|
80
31
|
|
|
81
32
|
```bash
|
|
33
|
+
mkdir trello-gantt-report
|
|
34
|
+
cd trello-gantt-report
|
|
82
35
|
trello-gantt-js init
|
|
83
36
|
```
|
|
84
37
|
|
|
85
|
-
|
|
38
|
+
This creates the base `.env` file.
|
|
86
39
|
|
|
87
|
-
|
|
40
|
+
## 3) Configure Trello in `.env`
|
|
41
|
+
|
|
42
|
+
In `.env`:
|
|
88
43
|
|
|
89
44
|
```env
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
TRELLO_API_TOKEN=your_api_token
|
|
45
|
+
TRELLO_API_KEY=...
|
|
46
|
+
TRELLO_API_TOKEN=...
|
|
93
47
|
GANTT_BOARD_ID=https://trello.com/b/abc123/board-name
|
|
94
48
|
GANTT_LISTS=Backlog,To Do,Doing,Done
|
|
49
|
+
GANTT_MILESTONE_LISTS=Milestone 1,Milestone 2
|
|
50
|
+
GANTT_TITLE=Project Gantt Chart
|
|
95
51
|
GANTT_OUTPUT=output/gantt.html
|
|
96
52
|
GANTT_TIMESTAMP_OUTPUT=false
|
|
97
|
-
GANTT_TITLE=Project Gantt Chart
|
|
98
|
-
GANTT_MILESTONE_LISTS=Milestone 1,Milestone 2
|
|
99
|
-
|
|
100
|
-
# Google Apps Script (only needed for publish)
|
|
101
|
-
GAPPS_SCRIPT_ID=
|
|
102
|
-
GAPPS_DEPLOYMENT_ID=
|
|
103
|
-
GAPPS_ALLOWED_EMAILS=
|
|
104
53
|
```
|
|
105
54
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
**Google credentials:** download an OAuth 2.0 client JSON from [Google Cloud Console](https://console.cloud.google.com) and save it as `credentials/google_oauth_client.json`.
|
|
109
|
-
|
|
110
|
-
> **Important:** the `credentials/` folder is listed in `.gitignore` and must never be committed. It contains OAuth secrets and cached tokens.
|
|
55
|
+
How to get Trello credentials:
|
|
111
56
|
|
|
112
|
-
|
|
57
|
+
1. Open `https://trello.com/app-key` while logged into the Trello account that has access to your board.
|
|
58
|
+
2. Copy your **API Key** and use it as `TRELLO_API_KEY`.
|
|
59
|
+
3. On the same page, click the token link/button (usually "Token") to generate a user token.
|
|
60
|
+
4. Authorize access and copy the generated token.
|
|
61
|
+
5. Use that value as `TRELLO_API_TOKEN`.
|
|
62
|
+
6. Use your board URL (or board ID) as `GANTT_BOARD_ID`.
|
|
113
63
|
|
|
114
|
-
|
|
64
|
+
How to get `GANTT_MILESTONE_LISTS`:
|
|
115
65
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
66
|
+
1. Open your Trello board.
|
|
67
|
+
2. Identify the exact list names you want to treat as milestones (for example `Milestone 1`, `Milestone 2`).
|
|
68
|
+
3. Add them as a comma-separated value in `.env`, preserving the same spelling as in Trello.
|
|
69
|
+
4. Leave it empty if you prefer default milestone detection behavior.
|
|
120
70
|
|
|
121
|
-
|
|
71
|
+
How to get `GANTT_LISTS`:
|
|
122
72
|
|
|
123
|
-
|
|
73
|
+
1. Open your Trello board and review the list names.
|
|
74
|
+
2. Choose which lists should be included in the Gantt output.
|
|
75
|
+
3. Add those list names in `.env` as a comma-separated value (for example `Backlog,To Do,Doing,Done`).
|
|
76
|
+
4. Leave it empty to include all lists.
|
|
124
77
|
|
|
125
|
-
|
|
78
|
+
Progress percentage from Trello cards:
|
|
126
79
|
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
80
|
+
- The chart reads each card progress from a `## Progress` section in the card description.
|
|
81
|
+
- Example:
|
|
82
|
+
- `## Progress`
|
|
83
|
+
- `72`
|
|
84
|
+
- Accepted values are `0` to `100` (the `%` symbol is optional). If the section is missing, progress defaults to `0%`.
|
|
131
85
|
|
|
132
|
-
|
|
86
|
+
What `GANTT_TIMESTAMP_OUTPUT` is for:
|
|
133
87
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
88
|
+
- Controls whether each generated file uses a unique timestamped name.
|
|
89
|
+
- `false` (default): writes to a stable filename (for example `gantt.html`) and replaces it on each run.
|
|
90
|
+
- `true`: creates versioned files (for example `gantt-YYYYMMDDTHHMMSSZ.html`), useful for keeping history and avoiding overwrites.
|
|
137
91
|
|
|
138
|
-
|
|
92
|
+
What `GANTT_TITLE` is for:
|
|
139
93
|
|
|
140
|
-
|
|
94
|
+
- Sets the title shown in the generated Gantt chart.
|
|
95
|
+
- Use it to display a project/client-specific name (for example `Website Migration - Q2`).
|
|
96
|
+
- If not set, the tool uses its default chart title.
|
|
141
97
|
|
|
142
|
-
|
|
143
|
-
2. Verify:
|
|
98
|
+
What `GANTT_OUTPUT` is for:
|
|
144
99
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
```
|
|
100
|
+
- Defines where the generated HTML file is saved.
|
|
101
|
+
- Use it when you want the report in a specific folder or filename (for example `output/gantt.html`).
|
|
102
|
+
- If not set, the tool uses its default output path.
|
|
149
103
|
|
|
150
|
-
|
|
104
|
+
## 4) Generate a local report
|
|
151
105
|
|
|
152
106
|
```bash
|
|
153
|
-
|
|
107
|
+
trello-gantt-js generate
|
|
154
108
|
```
|
|
155
109
|
|
|
156
|
-
|
|
110
|
+
Optional with timestamp:
|
|
157
111
|
|
|
158
112
|
```bash
|
|
159
|
-
|
|
160
|
-
cd trello-gantt-report
|
|
161
|
-
trello-gantt-js init
|
|
113
|
+
trello-gantt-js generate --timestamp-output
|
|
162
114
|
```
|
|
163
115
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
### 3) Get Trello API key/token
|
|
116
|
+
## 5) Configure publishing to Google Apps Script
|
|
167
117
|
|
|
168
|
-
|
|
169
|
-
2. Copy API key.
|
|
170
|
-
3. Generate/copy token.
|
|
171
|
-
4. Save both in `.env`:
|
|
118
|
+
In `.env`:
|
|
172
119
|
|
|
173
120
|
```env
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### 4) Generate your first report
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
trello-gantt-js generate
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
Optional versioned filename:
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
trello-gantt-js generate --timestamp-output
|
|
121
|
+
GAPPS_SCRIPT_ID=...
|
|
122
|
+
GAPPS_DEPLOYMENT_ID=...
|
|
123
|
+
GAPPS_ALLOWED_EMAILS=
|
|
189
124
|
```
|
|
190
125
|
|
|
191
|
-
|
|
126
|
+
`GAPPS_ALLOWED_EMAILS` is the comma-separated list of email addresses allowed to access the published Gantt web app.
|
|
127
|
+
If left empty, access is public (based on your web app deployment settings).
|
|
192
128
|
|
|
193
|
-
|
|
194
|
-
GANTT_TIMESTAMP_OUTPUT=true
|
|
195
|
-
```
|
|
129
|
+
How to find `GAPPS_SCRIPT_ID`:
|
|
196
130
|
|
|
197
|
-
|
|
131
|
+
- Open your Apps Script project.
|
|
132
|
+
- Go to **Project Settings** (gear icon).
|
|
133
|
+
- Copy the value shown as **Script ID**.
|
|
134
|
+
- Paste it into `.env` as `GAPPS_SCRIPT_ID`.
|
|
198
135
|
|
|
199
|
-
|
|
136
|
+
How to find `GAPPS_DEPLOYMENT_ID`:
|
|
200
137
|
|
|
201
|
-
|
|
138
|
+
- Open your Apps Script project.
|
|
139
|
+
- Click **Deploy** -> **Manage deployments**.
|
|
140
|
+
- If no deployment exists yet, create one first:
|
|
141
|
+
- Click **New deployment**.
|
|
142
|
+
- Select type **Web app**.
|
|
143
|
+
- Configure access as needed and click **Deploy**.
|
|
144
|
+
- After deployment is created/updated, copy the value shown as **Deployment ID**.
|
|
145
|
+
- Paste it into `.env` as `GAPPS_DEPLOYMENT_ID`.
|
|
202
146
|
|
|
203
|
-
|
|
204
|
-
- `GAPPS_DEPLOYMENT_ID`: deployment ID of the web app
|
|
205
|
-
- `credentials/google_oauth_client.json`: OAuth client from Google Cloud
|
|
147
|
+
Also:
|
|
206
148
|
|
|
207
|
-
|
|
149
|
+
1. Create a credentials folder:
|
|
150
|
+
```bash
|
|
151
|
+
mkdir -p credentials
|
|
152
|
+
```
|
|
153
|
+
2. Download the OAuth Client JSON from Google Cloud and save it as:
|
|
154
|
+
`credentials/google_oauth_client.json`
|
|
208
155
|
|
|
209
|
-
|
|
156
|
+
## 6) Publish
|
|
210
157
|
|
|
211
158
|
```bash
|
|
212
|
-
|
|
159
|
+
trello-gantt-js publish
|
|
213
160
|
```
|
|
214
161
|
|
|
215
|
-
|
|
216
|
-
`credentials/google_oauth_client.json`
|
|
217
|
-
3. Set variables in `.env`:
|
|
162
|
+
On the first run, Google OAuth opens and `credentials/token.json` is saved.
|
|
218
163
|
|
|
219
|
-
|
|
220
|
-
GAPPS_SCRIPT_ID=...
|
|
221
|
-
GAPPS_DEPLOYMENT_ID=...
|
|
222
|
-
GAPPS_ALLOWED_EMAILS=
|
|
223
|
-
```
|
|
164
|
+
## Commands
|
|
224
165
|
|
|
225
|
-
|
|
166
|
+
- `trello-gantt-js init`: creates a base `.env` template in the current folder.
|
|
167
|
+
- `trello-gantt-js generate`: generates a local HTML Gantt report.
|
|
168
|
+
- `trello-gantt-js generate --timestamp-output`: generates a versioned output filename with UTC timestamp.
|
|
169
|
+
- `trello-gantt-js publish`: generates and uploads the report to Google Apps Script.
|
|
170
|
+
- `trello-gantt-js --help`: shows CLI help and available options.
|
|
226
171
|
|
|
227
|
-
|
|
228
|
-
trello-gantt-js publish
|
|
229
|
-
```
|
|
172
|
+
## Common errors (and fixes)
|
|
230
173
|
|
|
231
|
-
|
|
174
|
+
### Error 403: `access_denied` on Google screen
|
|
232
175
|
|
|
233
|
-
|
|
176
|
+
Typical message: _"only be accessed by developer-approved testers"_.
|
|
234
177
|
|
|
235
|
-
|
|
178
|
+
Most likely cause:
|
|
236
179
|
|
|
237
|
-
-
|
|
238
|
-
- Not shareable: `credentials/token.json` (user session token, generated per user).
|
|
180
|
+
- The OAuth app is in **Testing** mode and the email is not in **Test users**.
|
|
239
181
|
|
|
240
|
-
|
|
182
|
+
Fix:
|
|
241
183
|
|
|
242
|
-
1.
|
|
243
|
-
2.
|
|
244
|
-
3.
|
|
245
|
-
4.
|
|
184
|
+
1. Go to Google Cloud Console -> OAuth consent screen -> Test users.
|
|
185
|
+
2. Add the user email (for example `ymesa88@gmail.com`).
|
|
186
|
+
3. Verify `google_oauth_client.json` belongs to that same OAuth project.
|
|
187
|
+
4. Delete `credentials/token.json` and retry `trello-gantt-js publish`.
|
|
246
188
|
|
|
247
|
-
|
|
189
|
+
> Important: Giving IAM "Editor" in Google Cloud does **not replace** the Test users list in OAuth consent screen.
|
|
248
190
|
|
|
249
|
-
|
|
191
|
+
### Error: `The caller does not have permission`
|
|
250
192
|
|
|
251
|
-
|
|
193
|
+
If this appears during Apps Script upload:
|
|
252
194
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
195
|
+
- Check that `GAPPS_SCRIPT_ID` and `GAPPS_DEPLOYMENT_ID` are correct and from the same project.
|
|
196
|
+
- Share the Apps Script project with the user as **Editor**.
|
|
197
|
+
- Delete `credentials/token.json` to re-authenticate with the correct account.
|
|
256
198
|
|
|
257
|
-
###
|
|
258
|
-
|
|
259
|
-
Add to your `claude_desktop_config.json` or Claude Code settings:
|
|
260
|
-
|
|
261
|
-
```json
|
|
262
|
-
{
|
|
263
|
-
"mcpServers": {
|
|
264
|
-
"trello-gantt": {
|
|
265
|
-
"command": "npx",
|
|
266
|
-
"args": ["-y", "dspot-trello-gantt", "mcp"],
|
|
267
|
-
"env": {
|
|
268
|
-
"TRELLO_API_KEY": "your_api_key",
|
|
269
|
-
"TRELLO_API_TOKEN": "your_api_token",
|
|
270
|
-
"GANTT_BOARD_ID": "https://trello.com/b/abc123/board-name"
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
```
|
|
199
|
+
### Error: `Only users in the same domain as the script owner may deploy this script`
|
|
276
200
|
|
|
277
|
-
|
|
201
|
+
Cause:
|
|
278
202
|
|
|
279
|
-
|
|
203
|
+
- Google Apps Script/Workspace domain restriction for deployments.
|
|
280
204
|
|
|
281
|
-
|
|
282
|
-
|---|---|
|
|
283
|
-
| `generate_gantt` | Fetches a Trello board and generates a standalone Gantt HTML file |
|
|
284
|
-
| `publish_gantt` | Generates the Gantt HTML and publishes it to Google Apps Script |
|
|
205
|
+
What this means:
|
|
285
206
|
|
|
286
|
-
|
|
207
|
+
- Users outside the owner's domain may edit, but cannot necessarily deploy.
|
|
287
208
|
|
|
288
|
-
|
|
209
|
+
Options:
|
|
289
210
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
getCardsForLists,
|
|
294
|
-
mapCardsToGanttTasks,
|
|
295
|
-
validateTasks,
|
|
296
|
-
generateMermaidGantt,
|
|
297
|
-
renderHtml,
|
|
298
|
-
publishToAppsScript,
|
|
299
|
-
} from 'dspot-trello-gantt';
|
|
211
|
+
- Always publish with the script owner account.
|
|
212
|
+
- Create/transfer the script to an account in the same domain as the user who will publish.
|
|
213
|
+
- Ask the Google Workspace admin to review deployment/sharing policies.
|
|
300
214
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
```
|
|
215
|
+
## Operational recommendation
|
|
216
|
+
|
|
217
|
+
If you have external users (for example `@gmail.com` accounts) and your script is corporate-owned, use this flow:
|
|
218
|
+
|
|
219
|
+
1. External users generate locally (`generate`).
|
|
220
|
+
2. Only the owner account (or same-domain account) runs `publish`.
|
|
308
221
|
|
|
309
|
-
|
|
222
|
+
This avoids domain policy deployment blocks.
|
|
310
223
|
|
|
311
|
-
MIT
|