Hey everyone,
Today I'm sharing a new tool I've been working on called Badger. It's an auto-follow manager designed specifically for "badge" accounts or curation projects on Hive. The script automatically follows (and optionally unfollows) accounts based on their token holdings or Hive Power delegations, helping you keep your follow list in sync with your community's stakeholders.
The idea was expanded after a request from @hivepakistan to add a feature to follow accounts based on their HP delegations, which is now included.
What Can Badger Do?
Badger is highly configurable. You can set it to manage your follows based on several metrics:
stake
: Follows users based on their staked amount of a specific token.balance
: Follows based on the liquid balance of a token.total
: Follows based on the combined total of staked and liquid tokens.delegation
: Follows accounts based on their incoming HP delegations to your account.
You can set a minimum threshold for any of these metrics, and the script will handle the rest.
How to Use Badger
The script is designed to be run easily and safely. Here’s a quick walkthrough.
1. Create a Configuration File
First, you'll want to create a default badger.yaml
configuration file. You can do this by running the script with the --create-config
flag.
uv run https://gist.github.com/TheCrazyGM/f24014d61d4b1284687b2c11f4a333e3 --create-config
This will generate a badger.yaml
file in your current directory.
2. Edit Your Settings
Next, open badger.yaml
and edit the settings to match your needs. You'll need to set your account name, the token you want to track, the metric, and the minimum threshold. You also need to provide your posting key, either in the file or as an environment variable (POSTING_WIF
).
3. Run a Dry Run
Before making any changes, it's always best to perform a dry run. You can override any setting from your config file using command-line flags.
For example, to see who you would follow from the PIMP token holders with a total of at least 100,000 tokens:
./badger.py --dry-run --account thecrazygm.bank --token pimp --metric total --min-token 100000
Or, to see who you would follow based on a minimum of 500 HP delegated to the hivepakistan
account:
./badger.py --dry-run --account hivepakistan --metric delegation --min-tokens 500
Once you are happy with the dry run, you can run the command without the --dry-run
flag to have Badger actually perform the follows and unfollows. You can see all available options by running the script with the -h
flag.
Get the Script
You can find the script and run it directly from the Gist below.
As always,
Michael Garcia a.k.a. TheCrazyGM