Categorygithub.com/slashtechno/generate-ddg
modulepackage
0.1.0
Repository: https://github.com/slashtechno/generate-ddg.git
Documentation: pkg.go.dev

# README

Generate DDG

GitHub Actions Build Workflow Status Static Badge

Go program that allows you to generate DuckDuckGo email aliases from the command line. Demo

Setup and Usage

  1. Create a Duck Address if you don't already have one.
  2. 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.
  3. 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
  4. 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.

# Packages

Copyright © 2024 Angad Behl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
No description provided by the author