CLI Tool
Afribase Command Line Interface
Manage your African infrastructure directly from your terminal. The Afribase CLI is a cross-platform native binary that allows you to deploy edge functions, push database migrations, and manage environments with a single command.
Installation
The CLI is written in Go and supports macOS, Linux, and Windows natively.
macOS
via Homebrew
bash
brew install afribase/tap/afribaseLinux
via Install Script
bash
curl -sSL https://useafribase.app/install.sh | shWindows
via PowerShell
powershell
powershell -Command & { iwr https://useafribase.app/install.ps1 | iex }Any OS
via Go Toolchain
bash
go install github.com/afribase/cli@latestGetting Started
01
Login
Authenticate the CLI with your Afribase account.
bash
afribase login02
List Projects
View all your active projects and their identifiers.
bash
afribase projects list03
Init Project
Initialize a new Afribase context in your local directory.
bash
afribase initCommand Reference
Authentication
afribase loginStarts the interactive login process.
afribase logoutRemoves credentials from your local machine.
Database
afribase db push --project PID --file migration.sqlApply a local SQL migration to your remote project.
afribase db migrations --project PIDList all migration history for a project.
Edge Functions
afribase functions deploy --project PID --name my-fn --entry index.tsBundle and deploy a local function to the African edge.
afribase functions list --project PIDList all deployed functions and their endpoints.
Environment
afribase env set --project PID --key API_KEY --value "..."Set non-secret configuration variables for your functions.
afribase env list --project PIDList all environment variables for a project.
Running into issues? Use the
--help flag on any command to see available flags and subcommands.