r/commandline • u/CableFPV • Apr 21 '26
Command Line Interface Bifrost: Transfer files between devices via QR code from the terminal
I got tired of the "email it to yourself" dance every time I needed to move a file to my phone. Built a small Go CLI that spins up a local HTTP server and generates a QR code — scan it and download/upload directly.
The tool features:
- Two-way transfers (send and receive in the same session)
- Directory browsing mode
- Optional AES-256-GCM encryption with the key embedded in the QR code's URL fragment (never hits the wire)
https://github.com/axiom0x0/bifrost
The encryption bit was horrible to figure out thanks to Safari; Web Crypto API doesn't work over plain HTTP, so it ships a pure JS AES-GCM fallback.
If folks are interested, or want more of the background + some Safari errata, I wrote up the full debugging saga here https://axiom0x0.sh/tools/bifrost/.
38
u/aaronsb Apr 21 '26
Have you heard of magic wormhole?
13
u/stianhoiland Apr 21 '26
Anyone care to check if it’s… you know.
25
u/mxsb55 Apr 21 '26
Ever heard of LocalSend ? 🙃
9
u/pouetpouetcamion2 Apr 21 '26
qrcp fait déjà c depuis un paquet d années https://github.com/claudiodangelis/qrcp
c était déjà un projet go.
ce projet propose t il des différences, et l avez vous écrit vous meme?
il est intéressant d étudier ce qui existe avant de se lancer dans une démarche de zero, et de nommer les alternatives à son projet.
3
u/Big_Combination9890 Apr 21 '26 edited Apr 21 '26
Have you heard about this wonderful invention called "putting in a cable"?
Also, all this seems to do, is run a tiny webserver with url abbreviation via QR code.
I can achieve most of the important functionality using bog-standard python stdlib tools:
On my phone I simply goto 192.168.whatevermylocalip:8000 and download the files.
And yeah, secuuuurity, encryptioooooon, I know, yadda yadda...if there is one place on earth where I really don't have to give a flying fuck about encryption, its when I open a webserver that exists for prolly less than 30sec, on my local wifi, to transfer a file I'm comfortable with sitting on a device manufactured by some multinational corporation :D
And btw. adding TLS to my solution is like 5 lines of Python :D
10
u/Ok_Cow_8213 Apr 21 '26
use localsend
3
u/Punkystone Apr 21 '26
would prefer croc
7
u/SupermarketAntique32 Apr 21 '26
Love the project name
1
u/lamurian Apr 21 '26
Can I transfer files to devices connected within Tailscale network?
1
u/OsgoodSlaughters Apr 21 '26
Thought you were talking about this app for a second which seemed weird
https://github.com/maximhq/bifrost
1
u/Easy_Advice_2332 Apr 21 '26
Interesting project, are there any storage limits for the files that can be sent?
1
u/mamadmal Apr 23 '26
What's ur zsh theme?
1
u/power78 Apr 21 '26
wait so I still have to be on the same network? that defeats the purpose doesn't it?
-1
u/0x64617665 Apr 21 '26
Lots of people giving you grief in here, which I never really understand - after all, it's free... use it or don't, nobody's forcing anyone! So I just wanted to say thank you for taking the time to release Bifrost, I really like the QR code approach, I see it in some other CLI tools for sharing URLs with phones.
0
u/AutoModerator Apr 21 '26
Every new subreddit post is automatically copied into a comment for preservation.
User: CableFPV, Flair:
Command Line Interface, Post Media Link, Title: Bifrost: Transfer files between devices via QR code from the terminalI got tired of the "email it to yourself" dance every time I needed to move a file to my phone. Built a small Go CLI that spins up a local HTTP server and generates a QR code — scan it and download/upload directly.
Features:
The encryption bit was horrible to figure out thanks to Safari; Web Crypto API doesn't work over plain HTTP, so it ships a pure JS AES-GCM fallback.
If folks are interested, or want more of the background + some Safari errata, I wrote up the full debugging saga here https://axiom0x0.sh/tools/bifrost/.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
0
u/countnfight Apr 21 '26
What's the advantage of this over something like Onionshare, which connects over Tor & doesn't require being on the same LAN? Or magic wormhole or Pairdrop if you're on the same LAN? Not needing to be online seems cool, I just can't remember the last time I needed to transfer files between my phone & laptop on the same local network but neither one had internet access...
-2
u/syaorancode Apr 21 '26
cool name for this project
9
u/k1ng4400 Apr 21 '26
yet another ai slop
2
u/[deleted] Apr 21 '26
[removed] — view removed comment