🌊 Nami
An open-source CLI media downloader for Instagram, TikTok, Facebook, and X
Nami is a lightweight, open-source media archiver designed for seamless multi-platform media extraction. Combining gallery-dl (primary gallery/archiving engine) and yt-dlp (video/specialized engine) with an interactive Rich terminal interface, Nami orchestrates two powerful extraction engines with deterministic fallback rules, deduplication, and secure authentication.
Installation • Usage Flow • Extractor Architecture • Supported Platforms • Directory Layout • Configuration
Features
- 2-Engine Architecture: Powered by
gallery-dlandyt-dlpwith deterministic capability mapping. - Instagram Gallery-DL Archiving: Uses
gallery-dlas the primary extraction engine for Instagram profiles, photos, videos, reels, stories, and highlights. - Video & Fallback Engine: Uses
yt-dlpas the primary video engine for TikTok, Facebook, and X, and controlled fallback for Instagram videos/reels. - Failure-Aware Fallback Policy: Automatic engine fallback is allowed only for
EXTRACTORandUNSUPPORTEDerrors. Rate limits (429), authentication errors, and network failures halt safely without hammering platforms. - Smart Deduplication & Archive Safety: Historical download state in
archive.txtis preserved and never automatically deleted when media directories are emptied. - Authentication Security: Supports Netscape cookie files (
<platform>.com_cookies.txt) and browser cookies. Credentials are strictly masked from logs. - Terminal UI: Powered by
richwith explicit status indicators (✓ downloaded,⚠ Rate limited,✗ Failed,N/A Unsupported).
Extractor Architecture
┌─────────────────────┐
│ NAMI CLI │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ Platform Router │
└──────────┬──────────┘
│
┌──────────────────────┼──────────────────────┐
▼ ▼ ▼
Instagram TikTok Facebook / X
│ │ │
▼ ▼ ▼
Extraction Plan Extraction Plan Extraction Plan
│ │ │
▼ ▼ ▼
Extractor Manager Extractor Manager Extractor Manager
│ │ │
┌───┴───┐ ┌───┴───┐ ┌───┴───┐
▼ ▼ ▼ ▼ ▼ ▼
GD YTDLP YTDLP GD YTDLP GD
│ │
└───┬───┘
▼
Failure Classifier
│
┌──────┼─────────┐
▼ ▼ ▼
Retry Fallback Stop
Engine Assignment
- Instagram:
gallery-dl(Primary) $\rightarrow$yt-dlp(Controlled Video Fallback) - TikTok:
yt-dlp(Primary) $\rightarrow$gallery-dl(Fallback) - Facebook:
yt-dlp(Primary) $\rightarrow$gallery-dl(Fallback) - X (Twitter):
yt-dlp(Primary) $\rightarrow$gallery-dl(Fallback)
Supported Platforms
| Platform | Photos | Videos | Stories | Highlights | Extractor Engines | Authentication Mode |
|---|---|---|---|---|---|---|
| Included | Included | Included | Included | gallery-dl / yt-dlp | Netscape Cookie / Anonymous | |
| TikTok | Included | Included | N/A | N/A | yt-dlp / gallery-dl | Browser DB / Netscape Cookie |
| Included | Included | N/A | N/A | yt-dlp / gallery-dl | Netscape Cookie / Anonymous | |
| X (Twitter) | Included | Included | N/A | N/A | yt-dlp / gallery-dl | Netscape Cookie / Anonymous |
Installation
Install nami directly via pip:
pip install nami
All extraction engines (gallery-dl, yt-dlp) and rich are automatically installed.
To upgrade to the latest release:
pip install -U --no-cache-dir nami
Usage Flow
1. Project Workspace Initializer
When you launch nami for the first time, it automatically creates your local workspace structure:
Nami/
├── downloads/ # Extracted media organized by platform & account
├── cookies/ # Netscape cookie files (*_cookies.txt)
└── profiles/ # Target account URL text files (*_profiles.txt)
2. Configure Profile Sources
Add your target account URLs into the designated text files inside Nami/profiles/:
Nami/profiles/
├── instagram_profiles.txt # Add Instagram profile URLs (one per line)
├── tiktok_profiles.txt # Add TikTok profile URLs
├── facebook_profiles.txt # Add Facebook profile URLs
└── x_profiles.txt # Add X / Twitter profile URLs
3. Session Authentication
Place Netscape-formatted cookie files inside Nami/cookies/:
instagram.com_cookies.txt(Netscape cookie file)facebook.com_cookies.txtx.com_cookies.txt
4. Interactive Execution & Filtering
Launch the application to run batch downloads across your configured profile lists:
nami
Troubleshooting
- HTTP 429 Rate Limit: Nami automatically halts cleanly without hammering platforms with multiple extractors. Wait a few minutes before retrying.
- urllib3 namespace conflicts: Run
python -m pip install -U nami gallery-dl yt-dlp urllib3to align dependencies. - Missing Cookie File: Ensure Netscape cookie files are placed in
<workspace>/Nami/cookies/and match the expected naming format (<platform>.com_cookies.txt).
Privacy & Security
- No Passwords Stored: Passwords are never logged or stored in
nami_config.json. - Log Masking: Sensitive session tokens, raw cookies, and authentication headers are masked from debug logs.
- File Permissions: Secure permissions (
0600for files,0700for directories) are applied on Unix systems.
License
Distributed under the MIT License. Developed and maintained by Igect under OpenSelena.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nami-3.0.0.tar.gz.
File metadata
- Download URL: nami-3.0.0.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e392b4b8a010db239a68d966db18a5a54421778dbd794b3497f01110ed2befda
|
|
| MD5 |
519d8c1b423e46cc2481b7546cd50d9e
|
|
| BLAKE2b-256 |
903801e1e3935b5d197ea0993f2cfe78bfcc954bc7dd95e5e90183b65617fed5
|
Provenance
The following attestation bundles were made for nami-3.0.0.tar.gz:
Publisher:
publish.yml on OpenSelena/nami
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nami-3.0.0.tar.gz -
Subject digest:
e392b4b8a010db239a68d966db18a5a54421778dbd794b3497f01110ed2befda - Sigstore transparency entry: 2447686216
- Sigstore integration time:
-
Permalink:
OpenSelena/nami@aa231b3b7312d0a07121e6fd6a7d085e6162b856 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/OpenSelena
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@aa231b3b7312d0a07121e6fd6a7d085e6162b856 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nami-3.0.0-py3-none-any.whl.
File metadata
- Download URL: nami-3.0.0-py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8670d58765b466da9c1edc06f36e480dc26a67dbfa43c7e20dbdf506cee9c48f
|
|
| MD5 |
cf7cbd316568bfee04d5d3bc48eff383
|
|
| BLAKE2b-256 |
889ef6f9c62e87c2452e479a6d47498c50af422602552aba9fa677ec785150b9
|
Provenance
The following attestation bundles were made for nami-3.0.0-py3-none-any.whl:
Publisher:
publish.yml on OpenSelena/nami
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nami-3.0.0-py3-none-any.whl -
Subject digest:
8670d58765b466da9c1edc06f36e480dc26a67dbfa43c7e20dbdf506cee9c48f - Sigstore transparency entry: 2447687312
- Sigstore integration time:
-
Permalink:
OpenSelena/nami@aa231b3b7312d0a07121e6fd6a7d085e6162b856 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/OpenSelena
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@aa231b3b7312d0a07121e6fd6a7d085e6162b856 -
Trigger Event:
release
-
Statement type: