Lodebit CLI
Deploy a site or a Discord bot from your terminal, follow the deploy as it runs, and tail a bot's logs.
npx @gg_studios/lodebit login npx @gg_studios/lodebit deploy ./dist
npx runs it without installing anything. To have a plain lodebit command, install it once with npm install -g @gg_studios/lodebit.
Log in
- In the dashboard, open Settings → API tokens and create a token. Copy it: it's shown once.
- Run
lodebit loginand paste it. The token is checked, then saved to a file only you can read (~/.config/lodebit/config.json, or%APPDATA%\lodebit\config.jsonon Windows).
A token can deploy and read logs for all your projects. If one leaks, revoke it in Settings and it stops working straight away.
Deploy
lodebit deploy ./dist # first time: pick a site, or make a new one lodebit deploy # later: same folder, site remembered lodebit deploy ./my-bot --project my-bot lodebit projects # list your sites and bots
- The first deploy of a folder asks which of your sites it's for, or creates a new one with a generated address (rename it in the dashboard any time).
--newskips the question;--new --name my-sitepicks the address. - The CLI zips the folder, uploads it and follows the deploy, printing each step. It exits with code 0 when the deploy is live and 1 if it fails.
- The choice is saved in
.lodebit.jsonin the folder, so you don't need--projectagain. - Left out of the zip:
node_modules,.git, virtual environments, build caches, OS clutter and.envfiles. Put secrets on the bot's Secrets page instead. --no-waituploads and returns straight away. Deploys count towards the same limit as dashboard deploys (20 an hour).- New sites made by the CLI are static sites. Create a bot in the dashboard first, then deploy to it.
Bot logs
lodebit logs my-bot # the latest 100 lines lodebit logs my-bot -f # keep following
In CI
Skip lodebit login and set LODEBIT_TOKEN as a secret in your CI. A token used only by CI is easy to revoke on its own. In CI the CLI never asks questions, so pass --project (or --new).
LODEBIT_TOKEN=${{ secrets.LODEBIT_TOKEN }} npx @gg_studios/lodebit deploy ./dist --project my-siteAll commands
lodebit login [--api <url>] | Save a token |
|---|---|
lodebit logout | Forget the saved token (revoke it in Settings to disable it everywhere) |
lodebit whoami | Check the saved token |
lodebit projects | List your sites and bots |
lodebit deploy [dir] [--project <slug>] [--new [--name <slug>]] [--no-wait] | Deploy a folder |
lodebit logs <bot> [-f] | Show or follow a bot's logs |