Source Code: https://github.com/browniebroke/netlify-builds
A command line utility to check build usage across multiple Netlify accounts
Recommended to install this via pipx:
pipx install netlify-builds
Create a .netlify-builds.json
in your home directory with the following shape:
{
"team-name-1": "access-token-1",
"team-name-2": "access-token-2",
...
}
To obtain the token for each team, open a private browsing session and login to your team dashboard and copy it from the local storage, it should be located under the key nf-session
.
DO NOT LOG OUT. Instead, simply close the private browsing session. If you log out, the token will be invalidated.
You're good to go, check all your accounts from the comfort of your terminal:
➜ netlify-builds
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━┓
┃ Team ┃ Mins ┃ Start Date ┃ End Date ┃ Elapsed ┃ Used ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━┩
│ team-blue │ 5 mins │ 2020-11-16 │ 2020-12-16 │ 11.6% │ 1.7% │
│ team-red │ 182 mins │ 2020-10-27 │ 2020-11-27 │ 75.9% │ 60.7% │
│ team-green │ 46 mins │ 2020-11-02 │ 2020-12-02 │ 58.3% │ 15.3% │
└───────────────────┴──────────┴────────────┴────────────┴─────────┴───────┘
If you're likely to exceed the free quota (300 mins) the rows will appear in red, otherwise in green.
Thanks goes to these wonderful people (emoji key):
Bruno Alla 💻 📖 🤔 |
This project follows the all-contributors specification. Contributions of any kind welcome!
This package was created with Cookiecutter and the browniebroke/cookiecutter-pypackage project template.