Account and sync

Invites

Accounts are invite-only during early access. An invite is a code, optionally bound to an email address. Open https://app.kubefit.com/signin?invite=CODE, create the account, and confirm the email Supabase sends. The same account signs in on the site and approves the CLI.

CLI sign-in

kubefit login starts a browser approval:

  1. The CLI asks the site for a ten-character code and prints a link.
  2. You open the link, sign in if needed, confirm the code matches, and approve.
  3. The CLI collects a token and stores it in ~/.kubefit.

Codes expire after ten minutes and work once. Tokens are long-lived; kubefit logout forgets the local copy. The site stores only a hash of each token.

What syncs

  • Reps upload after every recorded drill or mock task, and on kubefit sync.
  • Notes upload the same way, and kubefit sync also pulls notes written on the site so kubefit notes shows both.
  • Packs download on kubefit packs and refresh when a new version is published.

Uploads are idempotent: a rep or note is identified by a client id, so retrying never duplicates it.

Quotas

The API applies per-account daily limits that are generous for one person training: pack downloads, rep uploads, note uploads and CLI logins each have their own count. If you hit one you will see a 429 with the limit named.

Local files

Everything the CLI keeps lives under ~/.kubefit:

PathContents
config.jsonServer origin and token
packs/Cached, verified packs
reps.jsonlEvery recorded rep
notes.jsonlNotes written in the terminal
work/Seeded exercise files
bin/Helper shims the graders expect on macOS

Set KUBEFIT_SERVER to point the CLI at a different API origin.