Command-line interface for Kontent.ai.
Warning
Under active development. The command surface is incomplete and may change between releases. More commands are added incrementally. Breaking changes may occur.
Important
Looking for the previous CLI? The content-migration and environment
backup/restore commands from earlier @kontent-ai/cli versions are
deprecated. That functionality now lives in
@kontent-ai/data-ops.
- Node.js LTS or newer
- A Kontent.ai account
Run without installing:
npx @kontent-ai/cli@latest <command>Or install globally to get the kontent command:
npm install -g @kontent-ai/cli
kontent <command>Using @latest ensures you run the newest version.
Most commands require you to be signed in.
kontent login
kontent logoutRun kontent --help for the full, always-current list.
Each command supports --help for its own options.
| Command | Description |
|---|---|
kontent login |
Authenticate with Kontent.ai via Auth0 device flow |
kontent logout |
Clear stored authentication tokens |
kontent mapi <endpoint> |
Send an authenticated request to the Management API |
kontent project sample bootstrap |
Clone a sample app for an environment and wire its .env |
--logLevel,-ll— detail level:none,standard(default),verbose--verbose— shortcut for--logLevel verbose--configFile— path to a JSON file with CLI parameters--help,-h/--version,-v
Everything the log level governs goes to stderr, and none silences errors along
with progress — a failed command is then visible only through its exit code. What
a command was asked to produce goes to stdout and is never gated by the log
level.
Environment variables are read individually where they apply — they are not
mapped onto option names, so an unrelated KONTENT_* variable in your shell
never reaches the parser.
KONTENT_MAPI_KEY— Management API key forkontent mapi, used when--mapiKeyis absentDO_NOT_TRACK,KONTENT_DO_NOT_TRACK,KONTENT_TELEMETRY_DEBUG— see TELEMETRY.md
The CLI collects anonymous usage data. See TELEMETRY.md for details and opt-out.
Contributions are welcome. See CONTRIBUTING.md for details.
Distributed under the MIT License. See LICENSE.md.