Minerva

Disclaimer: This guide assumes you are comfortable using a command line.

Run locally (on your laptop)

For macOS and linux, use the "terminal" app. For windows, use "powershell".

Set up dependencies

  • Install uv for your platform using the instructions here: https://docs.astral.sh/uv/
  • Install python3 by running the following command: uv python install 3.15
  • Make a directory for minerva with the following command: mkdir minerva
  • Enter the directory: cd minerva
  • Create a virtual environment: uv venv --python 3.15
  • Activate virtual environment (command may vary, see output of the above command): source .venv/bin/activate
  • Install dependencies: uv pip install click httpx rich

Set up the script

Download the script:

curl -fLgRsS 'https://gist.github.com/bl791/d14f8d1b27492a17fbbbadc15797cb4b/raw/minerva.py' -o minerva.py

Test the script:

uv run minerva.py

Your output should look like this:

$ uv run minerva.py
Usage: minerva.py [OPTIONS] COMMAND [ARGS]...

  Minerva DPN Worker — help archive the internet.

Options:
  --help  Show this message and exit.

Commands:
  login   Authenticate with Discord.
  run     Start downloading and uploading files.
  status  Show login status.

Authenticate Discord

Run the following:

uv run minerva.py login

You will need to allow the script to access discord. Once that's done you should see "Login successful!"

Run Minerva

uv run minerva.py run

That's it, just leave it running!


Run remotely (on your server)

Very similar to the above workflow, but we will have to do a few things differently:

  • Most steps will be taken on your server instead of your laptop
  • Logging in to discord is going to be a bit different
  • You will want to run the final command in a screen so you don't have to worry about whether you are connected

Set up dependencies

  • Install uv for your platform using the instructions here: https://docs.astral.sh/uv/
  • Install python3 by running the following command: uv python install 3.15
  • Make a directory for minerva with the following command: mkdir minerva
  • Enter the directory: cd minerva
  • Create a virtual environment: uv venv --python 3.15
  • Activate virtual environment (command may vary, see output of the above command): source .venv/bin/activate
  • Install dependencies: uv pip install click httpx rich

Set up the script

Download the script:

curl -fLgRsS 'https://gist.githubusercontent.com/bl791/d14f8d1b27492a17fbbbadc15797cb4b/raw/d3e013329e8135b124202e264b120ebe9709eb80/minerva.py' -o minerva.py

Test the script:

uv run minerva.py

Your output should look like this:

$ uv run minerva.py
Usage: minerva.py [OPTIONS] COMMAND [ARGS]...

  Minerva DPN Worker — help archive the internet.

Options:
  --help  Show this message and exit.

Commands:
  login   Authenticate with Discord.
  run     Start downloading and uploading files.
  status  Show login status.

Authenticate Discord

Run the following:

uv run minerva.py login
  • You will see a URL.
  • Open that URL on your local computer where you are logged in to Discord, and authorize it.
  • You will be taken to a URL which does not load (that's okay)
  • Copy that URL that didn't load, it will look like http://127.0.0.1:11111/?token=12345...
  • Log in to your server on a separate terminal from the one you ran the minerva.py login
  • Run curl 'http://127.0.0.1:11111/?token=12345...' using the URL you copied. Quotes around the URL are helpful.
  • You should see a "Login successful!" message from your first terminal. The second terminal is no longer needed.

Run Minerva

screen -R minerva
uv run minerva.py run

Now you are running the downloader. To detach, do the following (not at the same time):

  • ctrl+a
  • d

And now you can log out of your session. To reconnect, log back in and run screen -R minerva again.

That's it, just leave it running! For custom options, see uv run ./minerva.py run --help

Example:

uv run ./minerva.py run -c 30 -b 5 --temp-dir ./archiver/
Report abuse