Menu

Build a disposable email alias CLI in 50 lines of Bash
📰
0

Build a disposable email alias CLI in 50 lines of Bash

DEV Community·anon.li·about 1 month ago
#l3iRpdZa
#bonus#bash#alias#anon#email#echo
Reading 0:00
15s threshold

I have a rule I keep breaking: never give a website my real email if I'm not sure I want a relationship with them. Five minutes later I'm on some forum, signup form open, and I'm typing me@gmail.com again because firing up a password manager, generating an alias, copying it, pasting it - it's just enough friction that I default to the lazy thing. So this weekend I built alias - a single shell command that spits out a fresh forwarding address I can paste anywhere. Took about an hour. The whole thing is curl, jq, and one POST request. I'm using anon.li as the backend because (a) it has a clean REST API, (b) it's open source, and (c) the free tier covers personal use. But the structure here works against any forwarding service that exposes an API - Addy, SimpleLogin, your own self-hosted thing. The endpoint The Alias API has a Bitwarden-compatible "just generate me one" endpoint. From the docs: POST https://anon.li/api/v1/alias?generate=true Authorization: Bearer ak_...…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More