Prompt
Read CHANGELOG.md and draft a Mastodon post for the 2.0 release of our backup CLI. Mention that the config format changed and link the migration guide at example.org/backy/migrate. Add #SysAdmin #CommandLine. Keep it under 450 characters. How to do it
- Mint a Mastodon agent key In https://app.socialhandoff.com, open Connections, connect your Mastodon account, then create an agent key scoped to Mastodon with draft permission only. Copy the key when it is shown; only its hash is stored.
- Edit settings.json In ~/.gemini/settings.json, add an mcpServers entry with httpUrl set to https://app.socialhandoff.com/mcp and a headers object carrying the Mastodon key as a bearer token.
- Check the connection Start gemini and run /mcp. The server should be listed as connected with its tools.
- Draft from the terminal Ask Gemini CLI to read the release notes or git log and draft a Mastodon post. It calls draft_post and the post appears in your approval inbox.
Example draft
backy 2.0 is out. The headline: incremental backups are now the default, and restores can pick a single file out of any snapshot. The config format changed from INI to TOML. backy migrate-config converts your old file, and the guide covers the edge cases: example.org/backy/migrate #SysAdmin #CommandLine
Gotchas
- Alt text is expected on the fediverse, and many people filter posts without it. The missing alt text guardrail flags drafts before they reach you.
- Read your instance rules on automated posting. Many ask that bot-driven accounts tick the automated account box in profile settings.
- Use CamelCase hashtags such as #OpenSource so screen readers say them correctly, and a content warning for long logs or spoilers.
- Gemini CLI reads settings.json at startup. If /mcp shows the server as disconnected, check the httpUrl and that the bearer header uses the Mastodon key.
- Character limit: 500 characters on a default Mastodon server. Each instance can raise it, so check yours.
- Links: Every URL counts as 23 characters, however long it is.
- Media per post: Up to 4 attachments on a default server.
- File sizes: Images up to 16 MB and video up to about 99 MB on a default install. Instances can set their own limits.
Frequently asked questions
Can Gemini CLI run this non-interactively?
Yes. Pass a prompt to gemini in non-interactive mode from a script. The result is still only a draft, so an unattended run cannot publish.
Does Gemini CLI know my instance's character limit?
Not by itself. Tell it in the prompt or brand memory, and set the per-network length guardrail so drafts over your limit are flagged.
Is posting to Mastodon from an agent good etiquette?
It can be, if the account is labeled as automated where your instance asks for it, posts carry alt text, and a person reviews each post. The approval inbox covers the last part.