Global Options and Auth
Global options are available for all Flexkit CLI commands.
Global Options
Options shared by project commands
Commands that act on a project’s data (automations, records, skills, query and the others) also accept these options:
Choosing a project
Commands resolve the project they act on in this order:
- The
--projectoption. - The
FLEXKIT_PROJECT_IDenvironment variable. - The nearest
.flexkit/project.json, written byflexkit link, searched from the current folder upwards. - The project in the local
flexkit.config.ts, when it defines exactly one.
Environment variables
Authentication Behavior
- Commands that require auth prompt for login in TTY mode if no credentials exist.
- In non-interactive environments, set
FLEXKIT_TOKENor pass--token. Create tokens in the dashboard; see API tokens. - Token format must be
flk-followed by 32 hexadecimal characters. login,logout,whoami,unlinkandhelpcan run without an existing token.- Every command acts with your own role and space memberships. Commands that need a person (for example
chat) say so on their page; with a token they fail with a clear error.
Output and exit codes
- Tables, progress and messages are written to stderr. Data requested with
--jsonis written to stdout, soflexkit automations ls --json | jqalways receives clean JSON. - Commands exit with
0on success,1on errors, and2after printing help. - Destructive commands ask for confirmation. Without a terminal they refuse to run unless you pass
--yes, so a script never hangs on a prompt.
Common Examples
# Show CLI version
flexkit --version
# Use a specific project config file
flexkit --local-config ./config/flexkit.config.ts deploy
# Run in CI with a token and a project from the environment
FLEXKIT_TOKEN=flk-... FLEXKIT_PROJECT_ID=abcdefghij flexkit automations ls --json
# Act on another project than the linked one for a single command
flexkit records ls product --project abcdefghij
# Delete without a prompt in a script
flexkit skills rm skl_123 --yes
# See every API request a command makes
flexkit automations ls --debugLast updated on