Menu

Build a disposable email alias CLI in 50 lines of Bash
πŸ“°

Build a disposable email alias CLI in 50 lines of Bash

DEV CommunityΒ·anon.liΒ·6 months ago
#l3iRpdZa
#bonus#bash#alias#anon#email
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 [email protected] 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.…

Continue reading β€” create a free account

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