Store and retrieve files on the ATmosphere (like Bluesky)
Written entirely in Bash Shell. No NodeJS here!
⬇️ Get ATFile | 💣 Submit Issue | 🦋 @zio.sh
curl -sSL https://raw.githubusercontent.com/ziodotsh/atfile/refs/heads/main/atfile-install.sh | bash
echo 'ATFILE_USERNAME="<your-atproto-username>"' > ~/.config/atfile.env # e.g. alice.bsky.social, did:plc:vdjlpwlhbnug4fnjodwr3vzh
echo 'ATFILE_PASSWORD="<your-atproto-password>"' >> ~/.config/atfile.env
atfile help
- OS¹
- 🟡 Linux: GNU, MinGW and Termux only; musl² not supported
- 🟢 macOS: Compatible with built-in version of Bash (3.2)
- 🟡 Windows: MinGW (Cygwin, Git Bash, MSYS2, etc.) and WSL (see Linux caveats above)
- This repository does not provide a native version for Windows
- 🟢 BSD: FreeBSD, NetBSD and OpenBSD; other non-detected BSDs should work (see ¹)
- 🟢 Haiku: Yes, really
- 🔴 Solaris: Has issues; low priority
- Bash³: 3.x or later
- Packages
curl
- ExifTool (
exiftool
) (optional: setATFILE_SKIP_NI_EXIFTOOL=1
to ignore) file
(only on *BSD, macOS, or Linux)- GnuPG (
gpg
) (optional: needed forupload-crypt
,fetch-crypt
) jq
- MediaInfo (
mediainfo
) (optional: setATFILE_SKIP_NI_MEDIAINFO=1
to ignore) - md5sum (optional: set
ATFILE_SKIP_NI_MD5SUM=1
to ignore)- Both GNU and BusyBox versions supported
websocat
(optional: needed forstream
)
- PDS: Bluesky PDS
- Other PDSs (such asmillipds) remain untested, but if they implement standard
com.atproto.*
endpoints, there should be no reason these won't work - Filesize limits cannot be automatically detected. By default, this is 50MB
- To change this on Bluesky PDS, set
PDS_BLOB_UPLOAD_LIMIT=<bytes>
- If the PDS is running behind Cloudflare, the Free plan imposes a 100MB upload limit
- This tool, nor setting a higher filesize limit, does not workaround video upload limits on Bluesky. Videos are served via a CDN, and adding larger videos to post records yields errors on the app
- To change this on Bluesky PDS, set
- Other PDSs (such asmillipds) remain untested, but if they implement standard
- ATProto account
bsky.network
(*.bsky.social
) accounts supported
If you can, limit the amount of files you upload to Bluesky's servers. It's a miracle this even works with, what's currently, an entirely free service. Heed the copyright warning too: do not upload copyrighted files.did:web
is supported!
(Seriously, it ain't hard)
(Todo)
(Todo)
(Todo)
- Paul Frazee — 🦋 @pfrazee.com
His kind words - Laurens Hof — 🦋 @laurenshof.online
Featuring ATFile on The Fediverse Report: "Last Week in the ATmosphere – Oct 2024 week 4" - Samir — 🐙 @bdotsamir
Testing, and diagnosing problems with, support for macOS (macos
) - Astra — 🦋 @astra.blue
Various PRs; testing, and diagnosing problems with, support for MinGW (linux-mingw
) and Termux (linux-termux
). - (Forgot about you? You know what to do)
- ¹ You can bypass OS detection in one of two ways:
- Set
ATFILE_SKIP_UNSUPPORTED_OS=1
Be careful! There's a reason some OSes are not supported - Set
ATFILE_FORCE_OS=<os>
This overrides the OS detected. Possible values:bsd-freebsd
,bsd-netbsd
,bsd-openbsd
,haiku
,linux
,linux-mingw64
,linux-musl
,linux-termux
,macos
,solaris
,unknown
- Set
- ² musl-powered distros do not use GNU/glibc packages, and have problems currently
- Known musl distros: Alpine, Chimera, Dragora, Gentoo (musl), Morpheus, OpenWrt, postmarketOS, Sabotage, Void
- Bypassing OS detection (see ¹) will work, but dates will not be handled correctly
- ³ As long as you have Bash installed, running from another shell will not be problematic (
#!/usr/bin/env bash
forces Bash)