Tweet Generator
A content creation toolkit for social media writers. Draft tweets, edit copy, optimize for engagement, schedule posts, generate hashtags, craft hooks, write CTAs, rewrite content, translate text, adjust tone, create headlines, and build outlines — all with local logging and history.
Commands
| Command |
Description |
draft <text> |
Draft a tweet or content piece (saves to log; no args shows recent drafts) |
edit <text> |
Edit and refine existing content |
optimize <text> |
Optimize content for engagement and reach |
schedule <text> |
Log a scheduled post with timestamp |
hashtags <text> |
Generate or log hashtag ideas for content |
hooks <text> |
Craft attention-grabbing opening hooks |
cta <text> |
Create call-to-action lines |
rewrite <text> |
Rewrite content in a different style or angle |
translate <text> |
Translate content to another language |
tone <text> |
Adjust the tone of content (formal, casual, urgent, etc.) |
headline <text> |
Generate headline variations |
outline <text> |
Build a content outline or structure |
stats |
Show summary statistics across all command logs |
export <fmt> |
Export all data in json, csv, or txt format |
search <term> |
Search across all logs for a keyword |
recent |
Show the 20 most recent activity entries |
status |
Health check — version, data dir, entry count, disk usage |
help |
Show all available commands |
version |
Display current version (v2.0.0) |
Data Storage
All data is stored locally in ~/.local/share/tweet-generator/:
draft.log, edit.log, optimize.log, etc. — One log file per command, storing timestamped entries in YYYY-MM-DD HH:MM|content format
history.log — Global activity log tracking every command executed
export.json / export.csv / export.txt — Generated export files
Each command called without arguments shows the 20 most recent entries from its log. Data never leaves your machine.
Requirements
- Bash ≥ 4.0 (uses
set -euo pipefail and local variables)
- coreutils —
date, wc, du, head, tail, grep, basename, mkdir
- No API keys, no internet connection, no external dependencies
When to Use
- Daily content creation — Use
draft to capture tweet ideas throughout the day, then edit and optimize before posting
- Content calendar planning — Use
schedule to log planned posts with timestamps, then recent to review upcoming content
- Engagement optimization — Use
hashtags, hooks, and cta to systematically improve each piece of content before publishing
- Multilingual content — Use
translate and tone to adapt content for different audiences and platforms
- Content audit and analysis — Use
stats to see your output volume, search to find past content on a topic, and export to back up everything
Examples
# Draft a new tweet
tweet-generator draft "Just shipped v2.0 — faster, cleaner, better. Here's what changed:"
# Optimize content for engagement
tweet-generator optimize "We just launched our new product"
# Generate hashtag ideas
tweet-generator hashtags "AI productivity tools for developers"
# Craft an opening hook
tweet-generator hooks "Why most startups fail at content marketing"
# Rewrite in a different style
tweet-generator rewrite "Our Q4 results exceeded expectations by 40%"
# View all recent activity
tweet-generator recent
# Export everything as JSON
tweet-generator export json
# Search for past content about a topic
tweet-generator search "product launch"
# Check tool health and stats
tweet-generator status
tweet-generator stats
Tips
- Every command doubles as a log — call it with text to save, call it empty to review history
- Use
export json periodically to back up your content library
- Chain commands:
draft → edit → optimize → hashtags for a complete workflow
- Use
search to find and repurpose old content ideas
stats gives you a bird's-eye view of your content output over time
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
1---2name: tweet-generator3description: Craft tweets, threads, and viral hooks with schedule tips. Use when drafting copy, editing threads, optimizing engagement, scheduling posts.4---5# Tweet Generator
6
7A content creation toolkit for social media writers. Draft tweets, edit copy, optimize for engagement, schedule posts, generate hashtags, craft hooks, write CTAs, rewrite content, translate text, adjust tone, create headlines, and build outlines — all with local logging and history.
8
9## Commands
10
11| Command | Description |
12|---------|-------------|
13| `draft <text>` | Draft a tweet or content piece (saves to log; no args shows recent drafts) |
14| `edit <text>` | Edit and refine existing content |
15| `optimize <text>` | Optimize content for engagement and reach |
16| `schedule <text>` | Log a scheduled post with timestamp |
17| `hashtags <text>` | Generate or log hashtag ideas for content |
18| `hooks <text>` | Craft attention-grabbing opening hooks |
19| `cta <text>` | Create call-to-action lines |
20| `rewrite <text>` | Rewrite content in a different style or angle |
21| `translate <text>` | Translate content to another language |
22| `tone <text>` | Adjust the tone of content (formal, casual, urgent, etc.) |
23| `headline <text>` | Generate headline variations |
24| `outline <text>` | Build a content outline or structure |
25| `stats` | Show summary statistics across all command logs |
26| `export <fmt>` | Export all data in `json`, `csv`, or `txt` format |
27| `search <term>` | Search across all logs for a keyword |
28| `recent` | Show the 20 most recent activity entries |
29| `status` | Health check — version, data dir, entry count, disk usage |
30| `help` | Show all available commands |
31| `version` | Display current version (v2.0.0) |
32
33## Data Storage
34
35All data is stored locally in `~/.local/share/tweet-generator/`:
36
37- **`draft.log`**, **`edit.log`**, **`optimize.log`**, etc. — One log file per command, storing timestamped entries in `YYYY-MM-DD HH:MM|content` format
38- **`history.log`** — Global activity log tracking every command executed
39- **`export.json`** / **`export.csv`** / **`export.txt`** — Generated export files
40
41Each command called without arguments shows the 20 most recent entries from its log. Data never leaves your machine.
42
43## Requirements
44
45- **Bash** ≥ 4.0 (uses `set -euo pipefail` and `local` variables)
46- **coreutils** — `date`, `wc`, `du`, `head`, `tail`, `grep`, `basename`, `mkdir`
47- No API keys, no internet connection, no external dependencies
48
49## When to Use
50
511. **Daily content creation** — Use `draft` to capture tweet ideas throughout the day, then `edit` and `optimize` before posting
522. **Content calendar planning** — Use `schedule` to log planned posts with timestamps, then `recent` to review upcoming content
533. **Engagement optimization** — Use `hashtags`, `hooks`, and `cta` to systematically improve each piece of content before publishing
544. **Multilingual content** — Use `translate` and `tone` to adapt content for different audiences and platforms
555. **Content audit and analysis** — Use `stats` to see your output volume, `search` to find past content on a topic, and `export` to back up everything
56
57## Examples
58
59```bash
60# Draft a new tweet
61tweet-generator draft "Just shipped v2.0 — faster, cleaner, better. Here's what changed:"
62
63# Optimize content for engagement
64tweet-generator optimize "We just launched our new product"
65
66# Generate hashtag ideas
67tweet-generator hashtags "AI productivity tools for developers"
68
69# Craft an opening hook
70tweet-generator hooks "Why most startups fail at content marketing"
71
72# Rewrite in a different style
73tweet-generator rewrite "Our Q4 results exceeded expectations by 40%"
74
75# View all recent activity
76tweet-generator recent
77
78# Export everything as JSON
79tweet-generator export json
80
81# Search for past content about a topic
82tweet-generator search "product launch"
83
84# Check tool health and stats
85tweet-generator status
86tweet-generator stats
87```
88
89## Tips
90
91- Every command doubles as a log — call it with text to save, call it empty to review history
92- Use `export json` periodically to back up your content library
93- Chain commands: `draft` → `edit` → `optimize` → `hashtags` for a complete workflow
94- Use `search` to find and repurpose old content ideas
95- `stats` gives you a bird's-eye view of your content output over time
96
97---
98
99Powered by BytesAgain | bytesagain.com | hello@bytesagain.com