Archives your Bluesky posts and replies locally, and generates a static blog to browse them chronologically. Uses no external dependencies, just python3.
fetch_bsky.py- Crawls and archives your Bluesky posts and replies into local JSON files.gen.py- Generates a static website from the archived data with chronological navigation, dark/light theme, and responsive design.deploy_vercel.py- Deploys the generated site to Vercel as a production deployment.
BLUESKY_HANDLE=yourhandle.bsky.social
BLUESKY_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx
VERCEL_TOKEN=your_vercel_api_token
BLUESKY_HANDLE+BLUESKY_APP_PASSWORD-- app password from Bluesky Settings > App PasswordsVERCEL_TOKEN-- API token from https://vercel.com/account/tokens (only needed for deploying)
Be careful with VERCEL_TOKEN -- these tokens are account-level and don't have project-level granularity. Consider creating a separate Vercel account for this project so your other projects remain safe in case of a token compromise.
$ python3 fetch_bsky.py # fetch new posts from Bluesky
$ python3 gen.py # generate static site in dist/
$ python3 deploy_vercel.py # deploy dist/ to Vercel
$ ./run.sh # run all three in sequence
-
Clone the repository:
git clone --depth=1 https://github.com/toxdes/chronobsky.git cd chronobsky -
Get your Bluesky app password:
- Go to Bluesky Settings > App Passwords
- Click "Add App Password", give it a name, and copy the generated password
- Your handle is your Bluesky username (e.g.
user.bsky.socialoruser.comif you have a custom domain)
-
Get your Vercel API token:
- Go to https://vercel.com/account/tokens
- Create a new token with any name and copy it
-
Set up the environment:
cp .env.example .envThen edit
.envand fill in your handle, app password, and Vercel token. -
Register a cron job to run every 48 hours:
crontab -eAdd this line:
0 6 */2 * * /path/to/chronobsky/run.shThis runs the full pipeline (fetch, generate, deploy) at 6 AM every other day.