repositorypackage
0.1.0
Repository: https://github.com/slashtechno/generate-ddg.git
Documentation: pkg.go.dev
# README
Generate DDG
Go program that allows you to generate DuckDuckGo email aliases from the command line.
Setup and Usage
- Create a Duck Address if you don't already have one.
- Either pass in your Duck Address username (the part before the
@duck.com
) as a flag (--duck-address-username
/-d
) or set it as an environment variable (DUCK_ADDRESS_USERNAME
).- As
.env
is loaded, you can also set it there.
- As
- Run
generate-ddg
- In some cases, this may error if DuckDuckGo suspects you are a bot. If this happens, try to login normally (through DuckDuckGo) and when the magic link/phrase is sent to your email, run the program again with
--otp "<phrase>"
. - The refresh token will be stored in
<XDG_CONFIG_HOME>/generate-ddg/secrets.yaml
. The directory is dependent on your OS:- Linux: `~/.config/generate-ddg.
- Windows:
%APPDATA%\generate-ddg
- MacOS:
~/Library/Application Support/generate-ddg
- For more information, see adrg/xdg
- In some cases, this may error if DuckDuckGo suspects you are a bot. If this happens, try to login normally (through DuckDuckGo) and when the magic link/phrase is sent to your email, run the program again with
- The program will generate a new email alias and print it to the console.
Installation
Binary
Download the latest release from the releases page, ensuring you download the correct binary for your system.
Execute the binary from the command line! Optionally, you can move it to a directory in your PATH.
For example, on Linux, if you've downloaded generate-ddg_linux_amd64
to your Downloads directory:
mv ~/Downloads/generate-ddg_linux_amd64 /usr/local/bin/generate-ddg
chmod +x /usr/local/bin/generate-ddg
generate-ddg # Run it!
Building from source
Ensure you have Go installed on your system.
git clone https://github.com/slashtechno/generate-ddg.git
cd generate-ddg
go install
Contributing
Pull Requests are welcome!
Acknowledgements
- whatk233/ddg-email-panel
- Ended up looking through the source code to get a better understanding of how DuckDuckGo's authentication works.
- DuckDuckGo
- I've not run into any issues (at the time of writing) with their service and it's worked quite well for me.
- Bitwarden
- They have a feature wherein you can input the API token for DuckDuckGo (retrieved from DevTools' Network tab) allowing you to generate aliases from within the Bitwarden.