Select the types of activity you want to include in your feed.
A simple tool which lets you scrape twitter accounts and crosspost them to bluesky accounts! Comes with a CLI and a webapp for managing profiles! Works with images/videos/link embeds/threads.
···494494### Option B: manage PM2 directly
495495496496```bash
497497-pm2 start dist/index.js --name tweets-2-bsky --interpreter bun
497497+pm2 start "$HOME/.bun/bin/bun" --name tweets-2-bsky --cwd "$PWD" -- dist/index.js
498498pm2 logs tweets-2-bsky
499499pm2 restart tweets-2-bsky --update-env
500500pm2 save
501501+```
502502+503503+Do not use `--interpreter bun` with `dist/index.js` on PM2 installs that cannot `require()` async ESM modules. Use Bun as the process command instead (example above).
504504+505505+### PM2 migration help (older manual installs)
506506+507507+If you manually created PM2 processes on older versions, migrate once to the Bun binary launcher:
508508+509509+```bash
510510+pm2 delete tweets-2-bsky || true
511511+pm2 delete twitter-mirror || true
512512+pm2 start "$HOME/.bun/bin/bun" --name tweets-2-bsky --cwd "$PWD" -- dist/index.js
513513+pm2 save
514514+```
515515+516516+If your existing process must keep the legacy name:
517517+518518+```bash
519519+pm2 start "$HOME/.bun/bin/bun" --name twitter-mirror --cwd "$PWD" -- dist/index.js
501520```
502521503522### Option C: no PM2 (nohup)
···531550- rebuilds native modules when runtime/dependencies changed
532551- builds server + web dashboard
533552- restarts existing runtime for PM2 **or** nohup mode
553553+- normalizes PM2 runtime to Bun binary launcher mode (avoids Bun interpreter crash loops on some PM2 builds)
534554- preserves local `config.json` and `.env` with backup/restore
535555536556Useful update flags:
+20-3
TROUBLESHOOTING.md
···1717 ```
18181919### PM2 interpreter mismatch
2020-If PM2 logs show command/runtime errors after an update (for example old `npm`/`node` interpreter paths):
2020+If PM2 logs show command/runtime errors after an update (for example stale interpreter paths):
2121+2222+Common error signature:
2323+2424+```text
2525+TypeError: require() async module ".../dist/index.js" is unsupported. use "await import()" instead.
2626+```
212722281. Run the repair script:
2329 ```bash
2430 chmod +x repair_pm2.sh
2525- ./repair_pm2.sh
2626- ```
3131+ ./repair_pm2.sh
3232+ ```
3333+2. If needed, manually recreate PM2 with Bun as the process command:
3434+ ```bash
3535+ pm2 delete tweets-2-bsky || true
3636+ pm2 delete twitter-mirror || true
3737+ pm2 start "$HOME/.bun/bin/bun" --name tweets-2-bsky --cwd "$PWD" -- dist/index.js
3838+ pm2 save
3939+ ```
4040+3. Old crash lines remain in PM2 logs until log rotation/flush. Clear them if needed:
4141+ ```bash
4242+ pm2 flush
4343+ ```
27442845### `bun: command not found`
2946If Bun is missing on a source install host:
+4-7
install.sh
···406406 fi
407407408408 if pm2 describe "$APP_NAME" >/dev/null 2>&1; then
409409- echo "[pm2] Restarting existing process with updated env: $APP_NAME"
410410- pm2 restart "$APP_NAME" --update-env --interpreter "$BUN_BIN" || {
411411- echo "[pm2] Restart failed, recreating process with Bun interpreter"
412412- pm2 delete "$APP_NAME" || true
413413- pm2 start dist/index.js --name "$APP_NAME" --cwd "$SCRIPT_DIR" --interpreter "$BUN_BIN" --update-env
414414- }
409409+ echo "[pm2] Recreating existing process with Bun binary launcher: $APP_NAME"
410410+ pm2 delete "$APP_NAME" || true
415411 else
416412 echo "[pm2] Starting new process: $APP_NAME (cwd=$SCRIPT_DIR, script=dist/index.js)"
417417- pm2 start dist/index.js --name "$APP_NAME" --cwd "$SCRIPT_DIR" --interpreter "$BUN_BIN" --update-env
418413 fi
414414+415415+ pm2 start "$BUN_BIN" --name "$APP_NAME" --cwd "$SCRIPT_DIR" --update-env -- dist/index.js
419416420417 echo "[pm2] Saving PM2 process list"
421418 pm2 save || true
+5-2
repair_pm2.sh
···2233set -euo pipefail
4455+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
66+cd "$SCRIPT_DIR"
77+58echo "🔧 Repairing PM2 process environment..."
69710if ! command -v pm2 >/dev/null 2>&1; then
···7174echo "Deleting process..."
7275pm2 delete "$PROCESS_NAME" || true
73767474-echo "Starting process with fresh environment using Bun interpreter..."
7575-pm2 start dist/index.js --name "$PROCESS_NAME" --interpreter "$BUN_BIN"
7777+echo "Starting process with fresh environment using Bun binary launcher..."
7878+pm2 start "$BUN_BIN" --name "$PROCESS_NAME" --cwd "$SCRIPT_DIR" --update-env -- dist/index.js
76797780echo "Saving PM2 list..."
7881pm2 save