Install and use the Anythink CLI
Install the Anythink CLI with Homebrew or a binary, sign in, switch projects safely, and find every command group with a key example.
Last updated
The anythink command-line tool manages a project from your terminal: entities, fields, records, search, users, roles, API keys, workflows, integrations, secrets, files, menus and payments. It talks to the same REST API as the Anythink dashboard, so a command succeeds only if you could make the same request yourself.
This page covers installing the CLI, signing in, managing profiles and the command groups. For a guided build, follow Build your first app.
Install#
Pick one method. Each puts an anythink command on your PATH.
| Method | Command | Notes |
|---|---|---|
| Homebrew (macOS and Linux) | brew install anythink-cloud/tap/anythink |
Recommended. Installs anythink and the anythink-mcp server. Upgrade with brew upgrade anythink. |
| Binary download (macOS, Linux and Windows) | See below | No package manager needed. |
Homebrew taps anythink-cloud/tap automatically when you use the full name. To tap it first, run brew tap anythink-cloud/tap, then brew install anythink.
Download a binary#
Each GitHub release publishes a standalone binary per platform:
| Platform | File |
|---|---|
| macOS, Apple Silicon | anythink-osx-arm64 |
| macOS, Intel | anythink-osx-x64 |
| Linux, x86_64 | anythink-linux-x64 |
| Linux, ARM64 | anythink-linux-arm64 |
| Windows, x64 | anythink-win-x64.exe |
| Windows, ARM64 | anythink-win-arm64.exe |
curl -Lo anythink https://github.com/anythink-cloud/anythink-cli/releases/latest/download/anythink-osx-arm64
chmod +x anythink
sudo mv anythink /usr/local/bin/
Check the download against checksums.txt from the same release with sha256sum -c checksums.txt --ignore-missing.
Note: The npm package @anythink-cloud/mcp and the anythink-mcp .NET tool install the MCP server only, not the anythink CLI. See Connect Claude to your backend with MCP for those.
Check it works#
anythink --version
anythink --help
--version prints the version number. --help lists every command group, and anythink <group> --help lists a group's subcommands and options.
Sign up, sign in and pick a project#
The CLI uses two kinds of credential. A platform session, from signup or login, lets you manage billing accounts and projects. A project profile, created by projects use or an API-key login, lets you work on one project's data.
anythink signup
anythink login
anythink accounts use
anythink projects create "My App" --region lon1
anythink projects use my-app
| Step | What it does |
|---|---|
signup |
Creates your account. It prompts for your name, email and password, or takes --first-name, --last-name, --email, --password and --referral. Confirm your email address before you sign in. |
login |
Signs in to the platform with an email and password. Add --email to skip the first prompt. |
login --google |
Opens your browser for Google sign-in and waits for you to approve it. If the browser doesn't open, the CLI prints the address to visit. |
accounts list, accounts create, accounts use |
Lists, creates (--name, --email, --currency gbp|usd|eur) and selects the billing account that owns your projects. Omit the id to pick from a list. |
projects list |
Lists the projects in the active billing account with their status. |
projects create |
Creates a project. Without --plan it shows the plans (also in anythink plans) and asks you to choose. Without --region it prompts for one. Provisioning takes a moment, so check projects list for an active status. |
projects use |
Connects to a project by name, org id or id prefix. It saves a profile named after the project in lower case with hyphens, makes it the active profile and gets a project access token. Add --api-key to store an API key instead. |
projects delete |
Deletes a project. Add --yes to skip the confirmation. |
logout |
Removes the saved credentials for the active profile. |
Your credentials live in ~/.anythink/config.json. Treat that file like a password.
Sign in with an API key#
If you already have a project's org id and an API key, skip the billing steps:
anythink login --org-id <org-id> --api-key <api-key>
This saves a profile named after the org id and makes it active. An API key needs no browser or password prompt, so it's the sign-in to use for scripts and CI. See API keys for creating one.
Profiles#
A profile holds the credentials for one project. List them with config show, which also shows the platform sessions and marks the active profile.
| Command | What it does | Example |
|---|---|---|
config show |
Lists every profile (org id, whether it uses a key or a token, and the API address) and the platform sessions | anythink config show |
config use <profile> |
Makes a profile the active one | anythink config use my-app |
config remove <profile> |
Deletes a saved profile | anythink config remove my-app-staging |
config reset |
Asks for confirmation, then resets the CLI configuration to its defaults. You sign in again afterwards. | anythink config reset |
The active profile is shared#
config use and projects use write the active profile to ~/.anythink/config.json, so every terminal and every tool on the machine uses it. If you switch to a staging project in one terminal, a command already queued in another terminal runs against staging too. An editor integration or an AI assistant using the anythink-mcp server shares the same setting.
To avoid running a command against the wrong project, name the profile on each command:
anythink --profile my-app-staging data list orders --limit 5
anythink --profile my-app-production entities list
--profile <name> (or -p <name>) applies to that command only and never changes the active profile. It works anywhere in the command line and on every command that talks to a project. If the profile doesn't exist, the command stops with Profile '<name>' not found. The commands that use your platform session (signup, login, accounts, projects and plans) don't take a project profile.
Keep one profile per environment, give each a clear name, and use --profile in scripts. Run config show before any command that changes or deletes data if you rely on the active profile.
Global options and output#
| Option | What it does |
|---|---|
-h, --help |
Prints help for the CLI, a group or a command |
-v, --version |
Prints the version |
--profile <name>, -p <name> |
Runs one command against a named profile |
--json |
Prints the raw JSON response instead of a table. Available on data list, search query, search similar, search audit, plans, api, docs, api-keys create and integrations execute. |
--all |
With data list --json, streams every page to standard output as one JSON object per page, so memory use stays flat. |
--page <n>, --limit <n> |
Pages through data list, search query, files list and pay payments. |
-y, --yes |
Skips the confirmation prompt on commands that delete or overwrite data. |
Commands that ask for confirmation, such as entities delete, data delete, files delete and projects delete, stop and wait without --yes. Add it for scripts. Delete commands remove data permanently.
The CLI colours tables and messages for a terminal. When you pipe or redirect the output, it writes plain text without colour codes, so anythink data list orders --json | jq is safe to parse.
For paging through everything:
anythink data list orders --json --all > orders.json
Command reference#
Each table lists the commands in one group. Run anythink <group> <command> --help for every option.
entities#
An entity is a database table in your project.
| Command | What it does | Example |
|---|---|---|
entities list |
Lists all entities | anythink entities list |
entities get <name> |
Shows an entity and its fields | anythink entities get customers |
entities create <name> |
Creates an entity. Options: --rls (row-level security), --public, --lock-records, --junction. |
anythink entities create orders --rls |
entities update <name> |
Changes settings with --public, --rls and --lock-records, each taking true or false |
anythink entities update orders --public false |
entities delete <name> |
Deletes an entity and all its records | anythink entities delete temp_data --yes |
fields#
| Command | What it does | Example |
|---|---|---|
fields list <entity> |
Lists the fields on an entity | anythink fields list customers |
fields get <entity> <field> |
Shows one field's full definition, including relationship settings | anythink fields get artists members |
fields add <entity> <name> |
Adds a field. --type takes varchar, text, integer, bigint, decimal, boolean, date, timestamp, jsonb, geo, file, user, one-to-one, one-to-many, many-to-one, many-to-many or dynamic-reference. Other options: --display, --label, --description, --default, --required, --unique, --searchable, --public, --indexed, --name-field, --target, --on-delete, --options, --multiple. |
anythink fields add customers email --type varchar --unique --required |
fields delete <entity> <field> |
Deletes a field by name or id | anythink fields delete customers 1234 --yes |
To change an existing field, use the Anythink dashboard.
data#
| Command | What it does | Example |
|---|---|---|
data list <entity> |
Lists records. Options: --limit (default 20), --page, --filter, --json, --all. |
anythink data list blog_posts --limit 10 |
data get <entity> <id> |
Gets one record | anythink data get blog_posts 42 |
data create <entity> |
Creates a record from a JSON object | anythink data create blog_posts --data '{"title":"Hello World"}' |
data update <entity> <id> |
Updates fields on a record | anythink data update blog_posts 42 --data '{"status":"approved"}' |
data delete <entity> <id> |
Deletes a record | anythink data delete blog_posts 42 --yes |
data rls <entity> <id> |
Shows who can access a record. With --user <id> it grants that user access, and --readonly makes the grant read-only. |
anythink data rls completed_workouts 3 --user 72 |
--filter takes a JSON object such as {"status":"draft","price":{"gte":10}} or field=value pairs joined with &, such as status=draft&price=GTE:10.
search#
| Command | What it does | Example |
|---|---|---|
search query <text> |
Runs a full-text search. Use * to browse everything. Options: --entities, --filter, --sort, --facet, --highlight, --page, --limit (1 to 100), --public, --json. |
anythink search query "*" --entities posts,users --filter "status=published" |
search similar <entity> <id> |
Finds records similar to one record (vector search) | anythink search similar posts 42 |
search rehydrate [entity] |
Rebuilds the search index for an entity, or for everything when you omit it (admin only) | anythink search rehydrate posts |
search purge [entity] |
Empties the search index for an entity, or for everything when you omit it (admin only) | anythink search purge posts --yes |
search audit <entity> |
Compares the fields marked public against what public search returns, and exits with code 1 if it finds extra fields | anythink search audit posts --sample 10 |
See Search records across your entities for how indexing works.
users#
| Command | What it does | Example |
|---|---|---|
users list |
Lists users | anythink users list |
users me |
Shows the signed-in user | anythink users me |
users get <id> |
Gets a user | anythink users get 42 |
users delete <id> |
Deletes a user | anythink users delete 42 --yes |
To invite users, use the Anythink dashboard.
roles#
| Command | What it does | Example |
|---|---|---|
roles list |
Lists roles | anythink roles list |
roles create <name> |
Creates a role. Add --description. |
anythink roles create editor --description "Can edit content" |
roles delete <id> |
Deletes a role | anythink roles delete 5 --yes |
roles permissions list <role-id> |
Lists a role's entity permissions | anythink roles permissions list 239 |
roles permissions remove <role-id> <entity> |
Removes entity permissions, given as --actions from read, create, update and delete |
anythink roles permissions remove 239 badges --actions create --yes |
Manage a role's permissions in the Anythink dashboard.
api-keys#
| Command | What it does | Example |
|---|---|---|
api-keys list |
Lists your API keys | anythink api-keys list |
api-keys create <name> |
Creates a key with --permissions. Options: --expires-in <days> (default 90, maximum 365 unless you add --no-expiry-cap), --save-as <profile>, --json, --yes. |
anythink api-keys create scraper --permissions data:read --save-as scraper-bot |
api-keys revoke <id> |
Revokes a key | anythink api-keys revoke 42 --yes |
The key is shown once and can't be retrieved later. --save-as stores it straight into a profile, so it never prints. See API keys.
workflows#
| Command | What it does | Example |
|---|---|---|
workflows get <id> |
Shows a workflow and its steps | anythink workflows get 76 |
workflows jobs <id> |
Shows a workflow's job history | anythink workflows jobs 31 |
workflows create <name> |
Creates a workflow. Use --trigger with --cron for a timed trigger, and add --enabled to switch it on at creation. |
anythink workflows create daily-sync --trigger Timed --cron "0 6 * * *" --enabled |
workflows update <id> |
Changes the name or description | anythink workflows update 31 --name "Daily sync" |
workflows trigger <id> |
Runs a workflow now. --payload passes a JSON record as $anythink.trigger.data. |
anythink workflows trigger 76 |
workflows delete <id> |
Deletes a workflow | anythink workflows delete 31 --yes |
workflows step-get <workflow-id> <step-id> |
Shows a step and its parameters | anythink workflows step-get 31 8 |
workflows step-add <workflow-id> <key> |
Adds a step. --action is the step type and --params is the step's parameters as one JSON string. |
anythink workflows step-add 31 parse_response --action RunScript --params "{\"script\":\"return {}\"}" |
workflows step-update <workflow-id> <step-id> |
Changes a step's --params, --name or --enabled |
anythink workflows step-update 31 8 --params "{\"entity\":\"orders\"}" |
workflows step-link <workflow-id> <step-id> |
Sets the next step with --on-success and --on-failure |
anythink workflows step-link 31 8 --on-success 9 |
workflows step-delete <workflow-id> <step-id> |
Deletes a step, and warns if other steps link to it | anythink workflows step-delete 31 8 --yes |
workflows seed <file> |
Creates a workflow and its steps from a JSON file. --var KEY=VALUE fills {{KEY}} placeholders and can repeat. |
anythink workflows seed workflow.json --var connection_id=abc-123 |
workflows export <id> |
Writes a workflow to JSON that seed can read back |
anythink workflows export 31 --output workflow.json |
workflows file-handler-add <workflow-id> <key> |
Adds a FileHandler step from named flags | anythink workflows file-handler-add 31 fetch_photo --operation fetch_and_link --source-url "{{ $anythink.steps.fetch_detail.data.images[0].uri }}" --entity artists --record-id "{{ $anythink.trigger.id }}" --field primary_image --enabled |
workflows file-handler-example |
Prints FileHandler parameters you can copy | anythink workflows file-handler-example |
workflows integration-add <workflow-id> <key> |
Adds an Integration step with --provider, --operation and repeatable --input key=value flags |
anythink workflows integration-add 154 analyse_ai --provider claude --operation generate-text --input prompt="Summarise this" --enabled |
Pass step parameters as a single JSON string, escaping the quotes inside it as shown. To switch a workflow on when you create it, use workflows create --enabled. See How workflows work.
integrations#
| Command | What it does | Example |
|---|---|---|
integrations list |
Lists the available providers | anythink integrations list |
integrations get <provider> |
Shows a provider's details and operations | anythink integrations get claude |
integrations connections list |
Lists your connections. Filter with --provider. |
anythink integrations connections list --provider claude |
integrations connect <provider> |
Connects with an API key, prompting for it if you omit --api-key. --name names the connection and --user-connection limits it to you. |
anythink integrations connect claude --name main |
integrations oauth status <provider> |
Shows whether the OAuth client for a provider is set up | anythink integrations oauth status slack |
integrations oauth callback-url |
Prints the redirect address to register in an OAuth app. It is the same for every provider. | anythink integrations oauth callback-url |
integrations oauth configure <provider> |
Saves the OAuth client id and secret (--client-id, --client-secret), prompting if you omit them |
anythink integrations oauth configure slack |
integrations oauth connect <provider> |
Connects through your browser. The CLI listens locally on port 8745 (--port), and --no-open prints the address instead of opening it. |
anythink integrations oauth connect slack --name main |
integrations test <connection-id> |
Tests a connection | anythink integrations test <connection-id> |
integrations enable <connection-id>, integrations disable <connection-id> |
Turns a connection on or off | anythink integrations disable <connection-id> |
integrations disconnect <connection-id> |
Deletes a connection | anythink integrations disconnect <connection-id> --yes |
integrations execute <provider> <operation> |
Runs an operation on a connected provider with --input key=value or --inputs JSON |
anythink integrations execute claude generate-text --input "prompt=Tell me a haiku" |
oauth#
| Command | What it does | Example |
|---|---|---|
oauth google status |
Shows whether Google sign-in is configured for the project | anythink oauth google status |
To set up Google sign-in, use the Anythink dashboard. See Social sign-in with Apple, Google, GitHub and LinkedIn.
secrets#
| Command | What it does | Example |
|---|---|---|
secrets list |
Lists secret names. Values are never shown. | anythink secrets list |
secrets create <key> |
Stores a secret. It prompts for the value, or takes --value in scripts. |
anythink secrets create CLAUDE_API_KEY |
secrets update <key> |
Replaces a secret's value | anythink secrets update CLAUDE_API_KEY |
secrets delete <key> |
Deletes a secret | anythink secrets delete CLAUDE_API_KEY --yes |
See Store API keys and tokens as secrets.
files#
| Command | What it does | Example |
|---|---|---|
files list |
Lists uploaded files (--page, --limit, default 25) |
anythink files list --page 1 --limit 50 |
files get <id> |
Shows a file's metadata | anythink files get 12 |
files upload <path> |
Uploads a file. Add --public to make it publicly readable. |
anythink files upload logo.png --public |
files delete <id> |
Deletes a file | anythink files delete 12 --yes |
menus#
| Command | What it does | Example |
|---|---|---|
menus list |
Lists the dashboard menus and their items | anythink menus list |
menus add-item <menu-id> <entity> |
Adds a menu item for an entity. Options: --icon (a Lucide icon name), --name, --parent. |
anythink menus add-item 250 badges --icon Award --parent 168 |
pay#
| Command | What it does | Example |
|---|---|---|
pay status |
Shows the Stripe Connect account status | anythink pay status |
pay connect |
Creates a Stripe Connect account and starts onboarding | anythink pay connect |
pay payments |
Lists recent payments (--page, --limit) |
anythink pay payments --page 1 --limit 50 |
pay methods |
Lists saved payment methods | anythink pay methods |
plans, migrate, api and docs#
| Command | What it does | Example |
|---|---|---|
plans |
Lists the plans you can choose when you create a project | anythink plans --json |
migrate |
Copies entities and fields from one profile's project to another's. Add --dry-run to preview, and --include-workflows, --include-roles, --include-settings, --include-menus, --include-files or --include-data for more. |
anythink migrate --from project-staging --to project-prod --dry-run |
api |
Lists every API endpoint, including the routes generated for your entities | anythink api --json |
docs |
Prints the CLI reference as markdown, or JSON with --json |
anythink docs --json |
migrate writes to the destination project. Run it with --dry-run first and check which profile is named in --to.
Call any endpoint with fetch#
anythink fetch sends an authenticated request to your project's REST API. Give it a path after the project, because the CLI adds /org/<project-id> for you.
anythink fetch /entities
anythink fetch /integrations/definitions
anythink fetch /integrations/connections --method POST --body '{"name":"test"}'
| Option | What it does |
|---|---|
--method <method> |
The HTTP method. Defaults to GET. |
--body <json> |
The request body as a JSON string. |
The CLI prints the request line first, then the response as formatted JSON. It uses the active profile, or the one you name with --profile, and your permissions apply. See REST API reference for the endpoints.
Use the CLI in CI#
Sign in with an API key so the job needs no interactive step and no browser. Create a key with only the permissions the job needs, save the org id and key as secrets in your CI system, then sign in at the start of the job:
anythink login --org-id "$ANYTHINK_ORG_ID" --api-key "$ANYTHINK_API_KEY"
anythink data list orders --json --all > orders.json
On a fresh machine this creates the only profile and makes it active. If the runner also holds profiles for other projects, add --profile <name> to each command.
A GitHub Actions job that installs the Linux binary and exports a nightly snapshot:
name: Export orders
on:
schedule:
- cron: "0 6 * * *"
jobs:
export:
runs-on: ubuntu-latest
steps:
- name: Install the Anythink CLI
run: |
curl -Lo anythink https://github.com/anythink-cloud/anythink-cli/releases/latest/download/anythink-linux-x64
chmod +x anythink
sudo mv anythink /usr/local/bin/
- name: Sign in with an API key
env:
ANYTHINK_ORG_ID: ${{ secrets.ANYTHINK_ORG_ID }}
ANYTHINK_API_KEY: ${{ secrets.ANYTHINK_API_KEY }}
run: anythink login --org-id "$ANYTHINK_ORG_ID" --api-key "$ANYTHINK_API_KEY"
- name: Export records
run: anythink data list orders --json --all > orders.json
- uses: actions/upload-artifact@v4
with:
name: orders
path: orders.json
Add --yes to any command that deletes or overwrites data. search audit exits with code 1 when public search returns fields that aren't marked public, so you can use it as a CI check.