Import Instagram archive to a Bluesky account
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update .env.dist and README with enhanced configuration and documentation

- Expand environment configuration with granular test modes for video and image imports
- Add LOG_LEVEL setting for configurable logging verbosity
- Completely rewrite README with comprehensive project overview
- Include detailed setup instructions, features, and usage guidelines
- Add sections on test modes, simulation, and platform limitations

+62 -30
+5 -2
.env.dist
··· 6 6 ARCHIVE_FOLDER=./transfer/instagram-username-2025-XX-XX-hash 7 7 # Limits number of uploads. 8 8 SIMULATE=1 9 - # video upload test 10 - TEST_MODE=1 9 + # Test modes for different media types 10 + TEST_VIDEO_MODE=0 11 + TEST_IMAGE_MODE=1 12 + # Logging level 13 + LOG_LEVEL=debug
+57 -28
README.md
··· 1 1 # Instagram To Bluesky 2 2 3 - Import all post exported from Instagram to a Bluesky account. 3 + Import posts exported from Instagram to a Bluesky account. 4 4 5 - They use the official archive export file format from Instagram, this utility reads the archive from the local disk and using the official Bluesky Typescript SDK imports the posts into the configured Bluesky account. 5 + This utility reads an Instagram archive from your local disk and uses the official Bluesky TypeScript SDK to import posts into your configured Bluesky account. 6 6 7 7 [**An example of an account used to import posts from Instagram**](https://bsky.app/profile/mm-instagram-arch.bsky.social) 8 8 9 9 ⚠️ We recommend creating a specific account to test the import and not using your main Bluesky account ⚠️ 10 10 11 + ## Features 11 12 12 - ## Which posts are NOT imported 13 + - Imports photos and videos from Instagram posts 14 + - Preserves original post dates and captions 15 + - Supports importing up to 4 images per post (Bluesky limit) 16 + - Test modes for verifying video and image imports 17 + - Simulation mode to estimate import time 18 + - Configurable date ranges for selective imports 13 19 14 - - Stories and post with videos, because videos are not currently supported by Bluesky. 20 + ## Prerequisites 15 21 16 - ## Prerequisite 22 + - Node.js >= 20.12.0 23 + - Your Instagram archive in JSON format ([download your archive here](https://www.instagram.com/download/request)) 24 + - A Bluesky account with an App Password 17 25 18 - - Nodejs >= 20.12x 19 - - The archive of your post from the Instagram (JSON format), unzipped in your local disk ([click here to download your personal archive](https://www.instagram.com/download/request)) 26 + ## Getting Started 20 27 21 - ## Getting started 28 + 1. Install dependencies: `npm install` 29 + 2. Copy `.env.dist` to `.env` and configure: 22 30 23 - 1. Install Typescript: `npm i -g typescript` 24 - 2. Install Node.js: `npm i -g ts-node` 25 - 3. In the project folder run: `npm i` 26 - 3. Create an .env file in the project folder by setting the following variables: 31 + ```shell 32 + # Your Bluesky username (e.g. "username.bsky.social") 33 + BLUESKY_USERNAME=username.bsky.social 34 + # App Password from Bluesky settings 35 + BLUESKY_PASSWORD=your-password 36 + # Path to your unzipped Instagram archive 37 + ARCHIVE_FOLDER=./transfer/instagram-username-2025-XX-XX-hash 27 38 28 - ```shell 29 - # username into which you want to import the posts (e.g. "test.bsky.social") 30 - BLUESKY_USERNAME=test.bsky.social 31 - # account password created via App Password 32 - BLUESKY_PASSWORD=pwd123 33 - # Where your archive is located 34 - ARCHIVE_FOLDER=./transfer/place 39 + # Optional settings 40 + SIMULATE=1 # Set to 1 to simulate import without posting 41 + TEST_VIDEO_MODE=0 # Set to 1 to test video imports 42 + TEST_IMAGE_MODE=0 # Set to 1 to test image imports 43 + LOG_LEVEL=debug # Set logging verbosity (debug, info, warn, error) 44 + MIN_DATE=2020-01-01 # Only import posts after this date 45 + MAX_DATE=2025-01-01 # Only import posts before this date 35 46 ``` 36 47 37 - **I highly recommend trying to simulate the import first and import a small range of posts, using the additional parameters documented below.** 48 + ## Running the Import 38 49 39 - ## Running the script 50 + You can run the script in two ways: 40 51 41 - You can run the script locally: `npm start` or `npm run start_log` to write an import.log file. 52 + - Standard output: `npm start` 53 + - With logging to file: `npm run start_log` 42 54 43 - ### Optional environment parameters 55 + ### Test Modes 44 56 45 - Additionally you can set these environment variables to customize behavior: 57 + The project includes two test modes to verify imports: 46 58 47 - - `SIMULATE` = if set to "1" simulates the import by counting the posts and indicating the estimated import time. 48 - - `MIN_DATE` = indicates the minimum date of posts to import, ISO format (e.g. '2011-01-01' or '2011-02-09T10:30:49.000Z'). 49 - - `MAX_DATE` = indicates the maximum date of posts to import, ISO format (e.g. '2012-01-01' or '2014-04-09T12:36:49.328Z'). 50 - - `LOG_LEVEL` = set to 'debug' for more verbose logging output or silet to mute logging (default is 'info') 59 + - `TEST_VIDEO_MODE`: Tests video import functionality 60 + - `TEST_IMAGE_MODE`: Tests image import functionality 61 + 62 + Enable these by setting the corresponding environment variable to 1. Note: You cannot enable both modes simultaneously. 63 + 64 + ### Simulation Mode 65 + 66 + Set `SIMULATE=1` to run a dry-run that: 67 + - Counts posts that would be imported 68 + - Estimates import time 69 + - Validates media files 70 + - Does not create any posts 71 + 72 + This is recommended before running an actual import. 73 + 74 + ## Limitations 75 + 76 + - Maximum 4 images per post (Bluesky platform limit) 77 + - Maximum video size of 100MB 78 + - Rate limiting enforced between posts 79 + - Stories, and likes can not be imported. 51 80 52 81 ## License 53 82