Quickstart
Install the mybase CLI, sign in, create a project, and connect an app to its database and storage.
Install the CLI
Standalone binary (Linux, macOS; no runtime needed):
curl -fsSL https://raw.githubusercontent.com/landonharter/mybase/master/scripts/install.sh | shOr with Bun: bun add -g @mybase-dev/cli (or run once with bunx @mybase-dev/cli <command>).
Check it: mybase version prints the CLI and server versions and warns when they differ.
No server yet? mybase server setup installs one on this machine (Docker needed); see Self-hosting. It signs the CLI in at the end, so you can skip the next step.
Sign in
mybase login --url https://mybase.example.com
mybase whoamilogin saves a token to ~/.config/mybase/config.json. In CI or for agents, set MYBASE_API_URL and MYBASE_TOKEN (an API key) instead; env vars win over the saved login.
Create a project
mybase project create shopThis prints the Postgres URL and the S3 credentials once. Put them in your app's .env (never commit it):
DATABASE_URL=postgres://shop:<password>@<host>:5432/shop
S3_ENDPOINT=…
S3_REGION=garage
S3_BUCKET=shop
S3_ACCESS_KEY_ID=…
S3_SECRET_ACCESS_KEY=…Turn on what you need
mybase queue enable shop
mybase cron enable shop # prints the signing secret for MYBASE_CRON_SECRET
mybase cache enable shop # prints the cache password once
mybase ratelimit enable shop
mybase analytics enable shop # prints the public write key and a script tagGive your app an API key
The SDK authenticates with an API key limited to what the app uses:
mybase token create shop-app --project shop --perm queue:write,cron:write,cache:write,ratelimit:writePut it in the app's server-side env as MYBASE_API_KEY, then npm install @mybase-dev/sdk. Start with the SDK guide.
See what you have
mybase context shop # services, tables, jobs, queues, env vars (no secrets)
mybase docs --search "dead letter"Agent notes
- Use
--jsonon every command you parse; errors come as JSON on stderr with anexitCode(1 failure, 2 usage, 3 auth, 4 not found). - Commands that delete data need
--yeswhen there's no terminal. Ask the user first. mybase agent init --project <name>sets up AGENTS.md, a Claude skill, and.mcp.jsonin an app repo.