Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

pojntfx/skysweeper

Repository files navigation

SkySweeper

Header

Automatically delete your old skeets from Bluesky.

hydrun CI Docker CI sweeper CI Go Version Go Reference Matrix

Overview

SkySweeper is a service which automatically deletes your old skeets from Bluesky, similarly to how TweetDeleter allows deleting old tweets on Twitter/X.

It enables you to ...

  • Increase your privacy: By decreasing your digital footprint, SkySweeper can help you more easily exercise your right to be forgotten.
  • Move on: By deleting your old skeets, SkySweeper makes it easier for you to move on from positions you no longer hold.
  • Configure what should be deleted: SkySweeper allows you to set the maximum post age, after which older skeets will be deleted.

Installation

SkySweeper is available to the public and can be used by opening it in a browser:

PWA badge

If you prefer to self-host, see contributing; static binaries for the manager and worker, a .tar.gz archive for the frontend and an OCI image for containerization are also available on GitHub releases and GitHub container registry respectively.

Screenshots

Click on an image to see a larger version.

Screenshot of the initial screen Screenshot of the initial dark screen Screenshot of the login screen Screenshot of the login dark screen Screenshot of the disabled screen Screenshot of the enabled screen Screenshot of the initial mobile screen Screenshot of the initial mobile dark screen Screenshot of the login mobile screen Screenshot of the login mobile dark screen

Reference

Command Line Arguments

$ skysweeper-server --help
Automatically delete your old skeets from Bluesky.
Find more information at:
https://github.com/pojntfx/skysweeper

Usage:
  skysweeper-server [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  manager     Start an SkySweeper manager
  worker      Start an SkySweeper worker

Flags:
  -h, --help                        help for skysweeper-server
      --postgres-url DATABASE_URL   PostgreSQL URL (can also be set using DATABASE_URL env variable) (default "postgresql://postgres@localhost:5432/skysweeper?sslmode=disable")

Use "skysweeper-server [command] --help" for more information about a command.
Expand subcommand reference

Manager

$ skysweeper-server manager --help
Start an SkySweeper manager

Usage:
  skysweeper-server manager [flags]

Aliases:
  manager, w

Flags:
  -h, --help            help for manager
      --laddr string    Listen address (default ":1337")
      --origin string   Allowed CORS origin (default "https://skysweeper.p8.lu")

Global Flags:
      --postgres-url DATABASE_URL   PostgreSQL URL (can also be set using DATABASE_URL env variable) (default "postgresql://postgres@localhost:5432/skysweeper?sslmode=disable")

Worker

$ skysweeper-server worker --help
Start an SkySweeper worker

Usage:
  skysweeper-server worker [flags]

Aliases:
  worker, w

Flags:
      --api-key string                       API key to check incoming requests for
      --apply-writes-limit int               Limit of records to apply writes for per API call (see https://atproto.com/blog/rate-limits-pds-v3; 10 as of September 2023) (default 10)
      --dry-run                              Whether to do a dry run (only fetch for posts to be deleted without actually deleting them) (default true)
  -h, --help                                 help for worker
      --laddr string                         Listen address (default ":1338")
      --list-records-limit int               Limit of records to return per API call (see https://atproto.com/blog/rate-limits-pds-v3; 100 as of September 2023) (default 100)
      --rate-limit-points-did int            Maximum amount of rate limit points to spend per DID (see https://atproto.com/blog/rate-limits-pds-v3; must be less than 1666 per hour as of September 2023) (default 200)
      --rate-limit-points-global int         Maximum amount of rate limit points to spend per rate limit reset interval for this IP (see https://atproto.com/blog/rate-limits-pds-v3; must be less than 3000 per hour as of September 2023) (default 2500)
      --rate-limit-reset-interval duration   Duration of a rate limit reset interval for this IP (see https://atproto.com/blog/rate-limits-pds-v3; 5 minutes as of September 2023) (default 5m0s)
      --verbose                              Whether to enable verbose logging

Global Flags:
      --postgres-url DATABASE_URL   PostgreSQL URL (can also be set using DATABASE_URL env variable) (default "postgresql://postgres@localhost:5432/skysweeper?sslmode=disable")

Environment Variables

All command line arguments described above can also be set using environment variables; for example, to set --dry-run to false with an environment variable, use SKYSWEEPER_DRY_RUN='false'. In addition to this, there are also some aliases in place for compatibility with Railway/Heroku conventions; for example, you can export PORT=3000 to listen on port 3000 as an alternative to setting the listen address, or export DATABASE_URL='postgresql://username:password@myhost:5432/mydb' to set the database URL. For more info, see the command line arguments.

Acknowledgements

Contributing

To contribute, please use the GitHub flow and follow our Code of Conduct.

To build and start a development version of SkySweeper locally, run the following:

$ git clone https://github.com/pojntfx/skysweeper.git
$ cd skysweeper

$ make depend
$ docker rm -f skysweeper-postgres && docker run -d --name skysweeper-postgres -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=skysweeper postgres
$ docker exec skysweeper-postgres bash -c 'until pg_isready; do sleep 1; done'

$ export SKYSWEEPER_ORIGIN='http://localhost:3000'
$ go run ./cmd/skysweeper-server manager # Starts the manager

# In another terminal
$ export SKYSWEEPER_API_KEY='supersecureapikey'
$ # export SKYSWEEPER_DRY_RUN='false' # Uncomment to actually delete posts instead of just logging the execution plan
$ go run ./cmd/skysweeper-server worker # Starts the worker

# In another terminal
$ export SKYSWEEPER_API_DEFAULT='http://localhost:1337'
$ cd frontend
$ bun dev # Now visit http://localhost:3000 to open the frontend and sign in

# In another terminal
$ export SKYSWEEPER_API_KEY='supersecureapikey'
$ curl -v -H "Authorization: Bearer ${SKYSWEEPER_API_KEY}" -X DELETE http://localhost:1338/posts # Scans for skeets and deletes them

Of course, you can also contribute to the utilities and VPNs like this.

Have any questions or need help? Chat with us on Matrix!

License

SkySweeper (c) 2023 Felicitas Pojtinger and contributors

SPDX-License-Identifier: AGPL-3.0