A fast Rust CLI that manages multiple Freebuff accounts and switches between them from the terminal.
Keep every login in its own profile. Pick one. Launch Freebuff with it.
Unofficial community project. Not affiliated with or endorsed by Freebuff. The official Freebuff CLI handles login and account sessions.
- Why Freebuff Auth?
- Install
- Quick start
- Commands
- How profiles are kept separate
- Configuration
- FAQ
- Limitations
- Contributing
- License
Freebuff Auth is a multi-account manager for the Freebuff CLI. Instead of swapping credential files by hand when you want to use a different Freebuff account, you register each login once and switch with a single command. The official Freebuff CLI stays responsible for authentication, so this tool never touches your tokens.
| Separate profiles | Every account lives in its own configuration directory. |
| Fast switching | Choose by number, email, alias, or account ID. |
| One-step launch | Start Freebuff with the selected account in one command. |
| Token-conscious | Never prints, copies, or rewrites bearer tokens. |
| Honest output | Shows no invented quota, plan, or reset information. |
| Native and small | Two Rust binaries, no runtime or framework. |
Works on Linux, macOS, and Windows, with static Linux builds and a Nix flake for reproducible installs.
Requirements
- The official Freebuff CLI, available as
freebuffon yourPATH. Install it separately using its current vendor instructions. - To build from source: Rust 1.74 or newer, including Cargo.
Download the asset for your platform from the latest release. Every archive holds both freebuff-auth and freebuff-switch, plus a matching .sha256 checksum.
| Platform | Asset |
|---|---|
| Windows x86_64 | freebuff-auth-v*-x86_64-pc-windows-msvc.zip |
| Linux x86_64 | freebuff-auth-v*-x86_64-unknown-linux-musl.tar.gz (static, any distro) |
| Linux arm64 | freebuff-auth-v*-aarch64-unknown-linux-musl.tar.gz (static, Raspberry Pi / ARM servers) |
| macOS Apple Silicon | freebuff-auth-v*-aarch64-apple-darwin.tar.gz |
| macOS Intel | freebuff-auth-v*-x86_64-apple-darwin.tar.gz |
Linux and macOS
sha256sum -c freebuff-auth-v0.2.0-x86_64-unknown-linux-musl.tar.gz.sha256
tar xzf freebuff-auth-v0.2.0-x86_64-unknown-linux-musl.tar.gz
install -m755 freebuff-auth-v0.2.0-x86_64-unknown-linux-musl/bin/* ~/.local/bin/On macOS use shasum -a 256 -c <file>.sha256 for the first step. Make sure ~/.local/bin is on your PATH.
Windows
Get-FileHash -Algorithm SHA256 .\freebuff-auth-v0.2.0-x86_64-pc-windows-msvc.zip
Expand-Archive .\freebuff-auth-v0.2.0-x86_64-pc-windows-msvc.zip -DestinationPath .Then add the extracted bin folder to your PATH. The executables are freebuff-auth.exe and freebuff-switch.exe.
git clone https://github.com/deactivated0/freebuff-auth.git
cd freebuff-auth
cargo install --path .Cargo installs freebuff-auth and freebuff-switch into its binary directory, usually ~/.cargo/bin. Add that directory to your PATH if needed.
You can also install the latest tagged release directly:
cargo install --git https://github.com/deactivated0/freebuff-auth --tag v0.2.0This repository is a Nix flake. It packages both binaries, exports a NixOS module, and can build a live installer ISO.
nix run github:deactivated0/freebuff-auth # freebuff-auth
nix run github:deactivated0/freebuff-auth#freebuff-switch
nix profile install github:deactivated0/freebuff-authOn an existing NixOS system, add the flake as an input and enable the module in your own flake.nix:
{
inputs.freebuff-auth.url = "github:deactivated0/freebuff-auth";
outputs = { nixpkgs, freebuff-auth, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
freebuff-auth.nixosModules.default
{
programs.freebuff-auth.enable = true;
nixpkgs.overlays = [ freebuff-auth.overlays.default ];
}
];
};
};
}Then apply it:
sudo nixos-rebuild switch --flake /etc/nixos#myhostThis puts freebuff-auth and freebuff-switch on PATH system-wide. The official freebuff CLI is not packaged here; install it separately.
The flake can build a bootable live ISO that installs a NixOS system with Freebuff Auth already enabled. Build it, write it to a USB stick, boot it, and install onto a disk:
nix build .#installer-iso
sudo dd if=result/iso/*.iso of=/dev/sdX bs=4M status=progress oflag=syncOn the booted ISO:
sudo freebuff-install /dev/nvme0n1 # ERASES that diskThe script creates a 1 GiB EFI partition at /boot and an ext4 root, copies this flake to /etc/nixos, and runs nixos-install --flake /mnt/etc/nixos#freebuff. It needs network access to fetch nixpkgs. The installed system boots with systemd-boot, enables flakes, and includes freebuff-auth and freebuff-switch.
The first account is freebuff with password freebuff; change it with passwd. Afterwards the system is managed with:
sudo nixos-rebuild switch --flake /etc/nixos#freebuff1. Register the account you already use
freebuff-auth add --alias personal2. Sign in to a second account
This opens the official Freebuff browser login inside a new isolated profile.
freebuff-auth login --alias work3. See what you have
freebuff-auth list4. Switch and launch
freebuff-auth switch work
freebuff-auth runOr do both at once:
freebuff-auth switch work --runPrefer a menu to typing commands? Run the interactive picker:
freebuff-switch # pick an account
freebuff-switch --run # pick an account and launch FreebuffEvery command is available from freebuff-auth. freebuff-switch is the interactive picker for switch and run.
| Command | What it does |
|---|---|
list |
Show registered accounts and the selected profile |
login |
Sign in through the official Freebuff CLI in a new isolated profile |
add |
Register the existing default Freebuff profile |
import PATH |
Register an existing profile without copying credentials |
switch [QUERY] |
Select by number, alias, email, ID, or - for the previous account |
rotate |
Select the next profile in registration order; not quota-aware |
current |
Show the selected account |
alias set QUERY NAME |
Set an account nickname |
alias clear QUERY |
Remove an account nickname |
status |
Show registry and selected-profile health |
path |
Show configuration paths |
run -- ARGS... |
Launch the official Freebuff CLI and pass it arguments |
remove QUERY --yes |
Unregister an account without deleting its profile files |
usage |
Explain the usage-stat limitations |
Run freebuff-auth --help or freebuff-auth COMMAND --help for all options.
A Freebuff process that is already running keeps its current session. Restart it through freebuff-auth run to use a different account.
Freebuff Auth sets FREEBUFF_CONFIG_DIR when it launches Freebuff. Each registered account gets its own config directory, so the official CLI manages credentials and the OS keychain entry for that profile, independently of the others.
Default paths:
~/.config/manicode/credentials.json existing Freebuff profile
~/.config/freebuff-auth/accounts.json account metadata and profile paths
~/.config/freebuff-auth/profiles/<profile-id>/ isolated profiles
The registry stores metadata and paths, not bearer tokens. On Unix its directory is restricted to the current user. remove unregisters an account but leaves profile files and keychain entries intact.
| Variable | Purpose |
|---|---|
FREEBUFF_BIN |
Path to the official Freebuff executable |
FREEBUFF_CONFIG_DIR |
Existing/default profile directory to register |
FREEBUFF_AUTH_HOME |
Alternate Freebuff Auth data directory |
NO_COLOR=1 |
Disable colored output |
Can I use several Freebuff accounts on one machine?
Yes. Each account lives in its own profile directory, and freebuff-auth switch decides which one freebuff-auth run launches.
Does switching accounts log me out? No. Profiles are isolated, and each keeps its own session managed by the official Freebuff CLI. Switching only changes which profile is used next.
Does Freebuff Auth store or read my tokens? No. It stores profile paths and metadata, and never prints, copies, or rewrites bearer tokens. Login and OAuth remain with the official CLI.
Why does it not show quota or plan usage? There is no verified, supported usage API for this tool to rely on, so it reports nothing rather than guessing.
Does it work on Windows, macOS, and Linux? Yes. Prebuilt Windows, macOS, and static Linux binaries are published on every release, and the Nix flake covers Linux and NixOS.
- Login and OAuth are handled by the official Freebuff CLI.
- Tokens are not extracted, migrated, or rewritten.
- Quotas and plan limits are not shown, because no verified supported usage API is available here.
- Switching does not change an already-running Freebuff process.
Issues and pull requests are welcome. Never include real credentials, account exports, tokens, or private profile data in issues, screenshots, or test fixtures.
MIT. See LICENSE.
