Skip to main content

CLI tool to download images and videos from Instagram posts

Project description

igdl

A small command-line tool to download images and videos from Instagram posts, reels, and IGTV links. Files are saved as <username>_<shortcode>_<mmddyy>[_<n>].<ext>.

Install

pipx install igdl

For First-time Terminal Users

For macOS users who new to terminal, you’ll need to install two things first. Takes less than 3 minutes if you just read the bold text below and paste in the commands.

Do not run these commands all at once or close terminal. Homebrew need some seconds to install.

  1. Homebrew/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Just follow the prompts in terminal. It’ll ask you to hit enter a few times, and enter your Mac password, which is normal. After Homebrew finishes, it prints a "Next steps" section with two or three commands mentioning brew shellenv. Copy those exact lines and run them. Now your computer recognizes the brew command.

  2. pipx — brew install pipx, then pipx ensurepath, then restart the terminal.

  3. igdl — pipx install igdl. Now quit and restart terminal. and done! Sign into instagram via your browser (Chrome by default, it doesn’t need to stay open) and try igdl 'https://www.instagram.com/p/XXXXXXXXXXX/' with quotes around the link. You can see how to set the output directory below in the usage section.

This is a standalone CLI, so pipx (which installs it in its own isolated environment - Python venv) is the recommended way. It pulls in its downloader engine, gallery-dl, automatically.

Usage

igdl 'https://www.instagram.com/p/XXXXXXXXXXX/'

Don’t forget quotes around the link!

On first run, igdl asks where to save downloads and remembers your choice. Change it anytime:

igdl config --dir ~/Pictures/instagram
igdl config                       # show current settings

Login / authentication

Instagram blocks most anonymous downloads, so igdl reuses the Instagram session from a browser you're already signed in to — you never type a password into igdl and there is no login step. By default it reads cookies from Chrome; pick another browser with:

igdl config --browser firefox     # or: safari, edge, brave, chromium, ...
igdl <url> --browser safari        # one-off override
igdl <url> --no-cookies            # attempt a fully anonymous download

Supported browsers: brave, chrome, chromium, edge, opera, thorium, vivaldi, firefox, librewolf, zen, floorp, safari, orion.

Safari on macOS: reading Safari's cookies may require granting your terminal app Full Disk Access in System Settings → Privacy & Security.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

igdl-0.2.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

igdl-0.2.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file igdl-0.2.0.tar.gz.

File metadata

  • Download URL: igdl-0.2.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for igdl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ef32c97b5e9c7b2f96ee73cbef8a4852d5ebed04bcd68bef5d875e79f50e1352
MD5 9b0cfb291e3305bc69c0704be3facee0
BLAKE2b-256 3fef175aab8eb548c68e5ed67670b98efc57a862504a0a8c8de085e127eb29bc

See more details on using hashes here.

File details

Details for the file igdl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: igdl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for igdl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4987fcbe9b7f766213cc683f622ab8f2e3688f82bf80727bc93664323ee541c8
MD5 bd9b500667a958191c19de225a105ee7
BLAKE2b-256 0bc7fdef687b566bfa9fe54d088247ebf2a2a9588e72043fd36c6c91e379646b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page