You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(plant): support custom dedication message on plantings
Add an optional message argument to /green:plant (and the treenation.sh
plant command). The message is sent to the Tree-Nation plant endpoint and
appears on the public certificate; it is also stored in usage.json.
When no message is given, a localized default is used:
"Offsetting {co2} kg CO2 - Claude Code AI usage - {date}" (fr/en).
The request body is now built with jq -n so messages with quotes, accents
or spaces are escaped safely. Bump to 1.1.0; docs and README updated.
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ On first launch, the plugin asks for your Tree-Nation API token and preferences.
28
28
|`/green:status`| View your carbon footprint and tree balance |
29
29
|`/green:plant`| Plant trees to offset accumulated CO2 |
30
30
|`/green:plant 3`| Plant a specific number of trees |
31
+
|`/green:plant 3 "message"`| Plant trees with a custom dedication message (shown on the certificate) |
31
32
|`/green:config`| View current configuration |
32
33
|`/green:config mode auto`| Switch to auto-plant mode |
33
34
@@ -63,7 +64,7 @@ Per-model base cost in Wh per **output** token. Other token types are derived as
63
64
64
65
### Tree-Nation
65
66
66
-
Trees are planted via the [Tree-Nation REST API](https://kb.tree-nation.com/knowledge/api-availability). You need a Tree-Nation account and API token.
67
+
Trees are planted via the [Tree-Nation REST API](https://kb.tree-nation.com/knowledge/api-availability). You need a Tree-Nation account and API token. Each planting carries a dedication message shown on the public certificate: pass your own (`/green:plant 3 "message"`) or let the plugin fill in a default (`Offsetting {co2} kg CO2 - Claude Code AI usage - {date}`).
Copy file name to clipboardExpand all lines: skills/plant/SKILL.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: plant
3
-
description: Plant trees via Tree-Nation to offset your AI carbon footprint. Use when the user wants to compensate their CO2 emissions. Accepts optional tree count argument.
3
+
description: Plant trees via Tree-Nation to offset your AI carbon footprint. Use when the user wants to compensate their CO2 emissions. Accepts optional tree count and message arguments.
4
4
---
5
5
6
6
# green-code: Plant Trees
@@ -21,9 +21,14 @@ Plant trees via Tree-Nation to compensate the user's AI carbon footprint.
21
21
4. Confirm with the user before planting:
22
22
"You're about to plant {N} tree(s) via Tree-Nation to offset {co2} kg of CO2. Proceed?"
23
23
24
-
5. If confirmed, run the planting script:
24
+
4b. Determine the dedication message (attached to each planting and shown on the public Tree-Nation certificate):
25
+
- If the user provided a message (e.g., `/green:plant 3 "merci pour la forêt"`), use it verbatim.
26
+
- If no message is provided, leave it empty: the script fills in a default
27
+
(`Compensation {co2} kg CO2 - usage IA Claude Code - {date}` / `Offsetting {co2} kg CO2 - Claude Code AI usage - {date}`).
28
+
29
+
5. If confirmed, run the planting script (the message is optional; wrap it in quotes):
0 commit comments