social-autoposter 1.0.3 → 1.0.4

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/.env.example CHANGED
@@ -1,15 +1,11 @@
1
1
  # social-autoposter environment variables
2
- # Copy to .env and fill in your values:
3
- # cp .env.example .env
2
+ # This file is created automatically by: npx social-autoposter init
3
+ # Fill in your values and save as .env
4
4
 
5
5
  # Moltbook API key (required for Moltbook posting/scanning)
6
6
  # Get it from: https://www.moltbook.com/settings/api
7
7
  MOLTBOOK_API_KEY=
8
8
 
9
- # Neon Postgres connection string (optional only needed if using syncfield.sh to sync SQLite → Postgres)
10
- # Get it from: https://console.neon.tech
11
- DATABASE_URL=
12
-
13
- # Google Gemini API key (optional — only needed if using Gemini-based features)
14
- # Get it from: https://aistudio.google.com/apikey
15
- GEMINI_API_KEY=
9
+ # Shared Neon Postgres databasepre-filled, read/write access, no delete
10
+ # All social-autoposter users write to this shared DB (used by syncfield.sh)
11
+ DATABASE_URL=postgresql://social_autoposter_public:sap_public_2026@ep-empty-bird-ai7uh8cy-pooler.c-4.us-east-1.aws.neon.tech/neondb?sslmode=require
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "social-autoposter",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Automated social posting pipeline for Reddit, X/Twitter, LinkedIn, and Moltbook. Install as a Claude Code agent skill.",
5
5
  "bin": {
6
6
  "social-autoposter": "bin/cli.js"
package/setup/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: social-autoposter-setup
3
- description: "Set up social-autoposter for a new user. Interactive wizard that creates the database, configures accounts, verifies browser logins, and optionally sets up scheduled automation. Use when: 'set up social autoposter', 'install social autoposter', 'configure social posting'."
3
+ description: "Set up social-autoposter for a new user. Interactive wizard that installs via npm, creates the database, configures accounts, verifies browser logins, and optionally sets up scheduled automation. Use when: 'set up social autoposter', 'install social autoposter', 'configure social posting'."
4
4
  ---
5
5
 
6
6
  # Social Autoposter Setup
@@ -15,15 +15,18 @@ Interactive setup wizard for social-autoposter. Walk the user through configurat
15
15
 
16
16
  ## Prerequisites
17
17
 
18
+ - Node.js 16+ (for `npx`)
18
19
  - `sqlite3` available on PATH
19
- - A browser automation tool (Playwright MCP, Selenium, etc.) for platform login verification
20
20
  - Python 3.9+ for running helper scripts
21
+ - A browser automation tool (Playwright MCP, Selenium, etc.) for platform login verification
22
+
23
+ ---
21
24
 
22
25
  ## Setup Flow
23
26
 
24
27
  Run these steps in order. Ask the user for input at each step. Don't skip ahead.
25
28
 
26
- ### Step 1: Locate the installation
29
+ ### Step 1: Install via npm
27
30
 
28
31
  Check if already installed:
29
32
 
@@ -31,33 +34,41 @@ Check if already installed:
31
34
  ls ~/social-autoposter/schema.sql 2>/dev/null && echo "FOUND" || echo "NOT_FOUND"
32
35
  ```
33
36
 
34
- If NOT_FOUND, install it:
37
+ If NOT_FOUND, install:
35
38
  ```bash
36
39
  npx social-autoposter init
37
40
  ```
38
41
 
39
- Set `SKILL_DIR` to `~/social-autoposter`.
40
-
41
- ### Step 2: Create the database
42
+ This copies all scripts, schema, skill files, and config templates to `~/social-autoposter/`. It also:
43
+ - Creates `config.json` from `config.example.json` (if missing)
44
+ - Creates `.env` from `.env.example` (if missing) — includes pre-filled Neon DATABASE_URL
45
+ - Creates `social_posts.db` from `schema.sql` (if missing)
46
+ - Symlinks `~/.claude/skills/social-autoposter` → `~/social-autoposter/skill`
42
47
 
48
+ To update scripts later without touching config/data:
43
49
  ```bash
44
- sqlite3 "$SKILL_DIR/social_posts.db" < "$SKILL_DIR/schema.sql"
50
+ npx social-autoposter update
45
51
  ```
46
52
 
47
- Verify it worked:
53
+ Set `SKILL_DIR=~/social-autoposter` for the rest of this wizard.
54
+
55
+ ### Step 2: Verify the database
56
+
48
57
  ```bash
49
58
  sqlite3 "$SKILL_DIR/social_posts.db" "SELECT name FROM sqlite_master WHERE type='table';"
50
59
  ```
51
60
 
52
61
  Expected tables: `posts`, `threads`, `our_posts`, `thread_comments`, `replies`.
53
62
 
54
- ### Step 3: Configure accounts
55
-
56
- Copy the example config:
63
+ If missing, create it:
57
64
  ```bash
58
- cp "$SKILL_DIR/config.example.json" "$SKILL_DIR/config.json"
65
+ sqlite3 "$SKILL_DIR/social_posts.db" < "$SKILL_DIR/schema.sql"
59
66
  ```
60
67
 
68
+ ### Step 3: Configure accounts
69
+
70
+ `config.json` already exists at `$SKILL_DIR/config.json`. Edit it with the user's accounts.
71
+
61
72
  Ask the user for each platform they want to use:
62
73
 
63
74
  **Reddit:**
@@ -75,8 +86,8 @@ Ask the user for each platform they want to use:
75
86
  **Moltbook** (optional):
76
87
  - "Do you want to set up Moltbook? (y/n)"
77
88
  - If yes: "What's your Moltbook username?" and "What's your Moltbook API key?"
78
- - Edit `$SKILL_DIR/.env` (template already created from `.env.example`): set `MOLTBOOK_API_KEY=<key>`
79
- - Set `accounts.moltbook.username` and `accounts.moltbook.api_key_env`
89
+ - Edit `$SKILL_DIR/.env` and set `MOLTBOOK_API_KEY=<key>` (the file already exists from init)
90
+ - Set `accounts.moltbook.username` and `accounts.moltbook.api_key_env` in `config.json`
80
91
 
81
92
  ### Step 4: Configure content
82
93
 
@@ -84,7 +95,7 @@ Ask the user:
84
95
 
85
96
  **Subreddits:**
86
97
  - "Which subreddits do you want to post in? (comma-separated)"
87
- - Default suggestion: `ClaudeAI, programming, webdev, devops`
98
+ - Default suggestion: `ClaudeAI, ClaudeCode, programming, webdev, devops`
88
99
 
89
100
  **Content angle:**
90
101
  - "Describe your unique experience/perspective in 1-2 sentences. This helps the agent write authentic comments from your point of view."
@@ -102,7 +113,7 @@ For each configured platform, verify the user is logged in:
102
113
  **Reddit:**
103
114
  - Navigate to `https://old.reddit.com` using browser automation
104
115
  - Check if a username appears in the top-right (logged in) or a "login" link (not logged in)
105
- - If not logged in, tell the user: "Please log into Reddit in your browser, then say 'done'"
116
+ - If not logged in: "Please log into Reddit in your browser, then say 'done'"
106
117
  - Re-check after they confirm
107
118
 
108
119
  **X/Twitter:**
@@ -115,8 +126,12 @@ For each configured platform, verify the user is logged in:
115
126
  - Check if the feed loads or a login page appears
116
127
 
117
128
  **Moltbook:**
118
- - Test the API key: `curl -s -H "Authorization: Bearer $MOLTBOOK_API_KEY" "https://www.moltbook.com/api/v1/posts?limit=1"`
119
- - Check for a successful response
129
+ - Source the env file and test the API key:
130
+ ```bash
131
+ source ~/social-autoposter/.env
132
+ curl -s -H "Authorization: Bearer $MOLTBOOK_API_KEY" "https://www.moltbook.com/api/v1/posts?limit=1"
133
+ ```
134
+ - Check for a successful response (not an auth error)
120
135
 
121
136
  Report which platforms are ready and which need attention.
122
137
 
@@ -129,24 +144,24 @@ python3 "$SKILL_DIR/scripts/find_threads.py" --limit 3
129
144
 
130
145
  Show the user the candidate threads found. Don't post anything — just verify the pipeline works.
131
146
 
132
- ### Step 7: Install the skill
147
+ Rate limit is 40 posts per 24 hours (enforced by the script).
133
148
 
134
- Create the skill symlink so the agent can find it:
135
- ```bash
136
- mkdir -p ~/.claude/skills
137
- rm -rf ~/.claude/skills/social-autoposter
138
- ln -s "$SKILL_DIR" ~/.claude/skills/social-autoposter
139
- ```
140
-
141
- ### Step 8: Set up automation (optional)
149
+ ### Step 7: Set up automation (optional)
142
150
 
143
151
  Ask: "Do you want posts to run automatically on a schedule? (y/n)"
144
152
 
145
153
  If yes, and on macOS:
146
- - Update the launchd plist templates in `$SKILL_DIR/launchd/` with the user's paths
147
- - Symlink into `~/Library/LaunchAgents/`
148
- - Load with `launchctl load`
149
- - Explain: "Posting runs every hour, stats update every 6 hours, reply engagement every 2 hours"
154
+ - The launchd plists are already in `$SKILL_DIR/launchd/`
155
+ - Symlink into `~/Library/LaunchAgents/`:
156
+ ```bash
157
+ ln -sf "$SKILL_DIR/launchd/com.m13v.social-autoposter.plist" ~/Library/LaunchAgents/
158
+ ln -sf "$SKILL_DIR/launchd/com.m13v.social-stats.plist" ~/Library/LaunchAgents/
159
+ ln -sf "$SKILL_DIR/launchd/com.m13v.social-engage.plist" ~/Library/LaunchAgents/
160
+ launchctl load ~/Library/LaunchAgents/com.m13v.social-autoposter.plist
161
+ launchctl load ~/Library/LaunchAgents/com.m13v.social-stats.plist
162
+ launchctl load ~/Library/LaunchAgents/com.m13v.social-engage.plist
163
+ ```
164
+ - Schedule: posting runs hourly, stats every 6 hours, reply engagement every 2 hours
150
165
 
151
166
  If yes, and on Linux:
152
167
  - Generate crontab entries:
@@ -158,14 +173,16 @@ If yes, and on Linux:
158
173
 
159
174
  If no: "You can run manually anytime with `/social-autoposter`"
160
175
 
161
- ### Step 9: Summary
176
+ ### Step 8: Summary
162
177
 
163
178
  Print a summary:
164
179
  ```
165
180
  Social Autoposter Setup Complete
166
181
 
182
+ Installed: ~/social-autoposter (v1.0.3 via npm)
167
183
  Database: ~/social-autoposter/social_posts.db
168
184
  Config: ~/social-autoposter/config.json
185
+ Env: ~/social-autoposter/.env
169
186
  Skill: ~/.claude/skills/social-autoposter
170
187
 
171
188
  Platforms:
@@ -174,7 +191,9 @@ Social Autoposter Setup Complete
174
191
  LinkedIn: NAME ✓
175
192
  Moltbook: USERNAME ✓
176
193
 
194
+ Rate limit: 40 posts per 24 hours
177
195
  Automation: launchd (hourly post, 6h stats, 2h engage)
178
196
 
179
197
  Try it: /social-autoposter
198
+ Update: npx social-autoposter update
180
199
  ```