Skip to Content
CLIOverview

Flexkit CLI

The Flexkit CLI lets you do from your terminal what you do in the Dashboard and Studio: deploy your schema, work with records, manage automations, skills, knowledge and plugins, talk to the Chat Agent, and script anything else the Flexkit API offers.

Every command prints its options and examples with flexkit <command> --help.

Install

pnpm

pnpm add -g @flexkit/cli

npm

npm install -g @flexkit/cli

yarn

yarn add -g @flexkit/cli

bun

bun add -g @flexkit/cli

Updating Flexkit CLI

The easiest way to update the Flexkit CLI is by running the installation command yet again.

pnpm

pnpm add -g @flexkit/cli@latest

npm

npm install -g @flexkit/cli@latest

yarn

yarn add -g @flexkit/cli@latest

bun

bun add -g @flexkit/cli@latest

Get started

# Log in, then link this folder to a project
flexkit login
flexkit link
 
# Commands in this folder now act on the linked project
flexkit schema show
flexkit records ls product --limit 10
flexkit automations ls
flexkit chat "Which products have no description?"

Commands that act on a project use the linked project, or the one you pass with --project. See how commands choose a project.

Usage

flexkit [options] <command> [subcommand] [arguments]

Commands

Project setup

CommandWhat it does
loginLog in to your Flexkit account.
logoutLog out and remove the stored credentials.
whoamiShow who you are logged in as.
linkLink the current folder to a project.
unlinkRemove the link of the current folder.
projectList, create, remove, pause and unpause projects.
deployDeploy the schema from flexkit.config.ts and follow its progress.
deploymentsList, inspect and replay schema deployments.
schemaPull, show and diff the deployed schema.
devRun the custom tools and code skills from flexkit.tools.ts locally.
toolsSync the production custom-tools catalog.
webhooksCreate, edit, enable and delete webhooks.
corsManage the browser origins allowed to call the API.
logsShow API, webhook and AI request logs, or follow them live.

Data

CommandWhat it does
recordsList, read, count, create, update and delete records.
searchSearch the project’s records.
queryRun a GraphQL query or mutation.
assetsUpload and export assets.
importImport entities and assets from NDJSON, a directory or a tarball.
exportExport the full dataset to a tarball.

AI

CommandWhat it does
chatTalk to the project’s Chat Agent, or list and read chats.
automationsCreate, edit, enable and run automations.
runsFollow, inspect and cancel automation runs.
approvalsApprove or deny the changes agents ask to make.
skillsManage skills, or keep them as Markdown files in git.
knowledgeUpload, search and link knowledge documents.
pluginsInstall and connect plugins.
mcpConnect Claude, Cursor and other AI clients to the project.
memoryRead and edit what the agent remembers about you.

Account

CommandWhat it does
activityRead the project’s activity inbox.
usageShow usage against the plan limits.
membersInvite, remove and change the roles of project members.
tokensCreate, list and revoke project API tokens.
apiSend an authenticated request to any API endpoint.
helpShow usage for the CLI or a command.

Scripting and CI

  • Every command that reads data accepts --json and prints JSON on stdout, while messages and tables go to stderr. Pipe the output to jq safely.
  • Destructive commands ask for confirmation. Pass --yes to skip the prompt; without a terminal they refuse to run unless you do.
  • Set FLEXKIT_TOKEN and FLEXKIT_PROJECT_ID to run commands in CI without flexkit login. A token acts with its own role. Some things need a person and refuse tokens: managing tokens and members, project pause, deciding approvals, connecting plugins, usage, and personal data (chat, activity, memory). Their pages say so.
# Fail a CI job when an automation run fails
flexkit automations run aut_123 --wait
 
# Count the products that are in stock
flexkit records count product --where '{"stock":{"gt":0}}'

See Global options and the CI guide.

Last updated on