CLI
Use Andesine from the terminal: sign in, call the API, generate types, run the MCP server, and create sites and extensions.
The andesine CLI works with the Andesine API from your terminal and your scripts. It needs Node.js 22.12 or later, and is open source under the MIT license.
Use npm install --global andesine to install it for your whole system.
Sign in
The CLI opens Andesine in your browser and shows a code. Check that the code on the Authorize CLI page is the same, and select Approve. Use --no-browser to open the address yourself.
The CLI stores your sign-in in the credential store of your system: Keychain on macOS, Credential Manager on Windows, or Secret Service on Linux. If none is available, it can store it in a file, after you confirm.
Command | Does |
|---|---|
| Signs in |
| Shows the account, the instance, and the workspace |
| Signs out and removes the saved sign-in |
In CI, set ANDESINE_API_KEY instead. The API key is used before a saved sign-in.
Use profiles for more than one account or instance, for example andesine --profile work auth login.
Set up a project
init asks for the workspace, the content source (published or current), the collections, and the path of the generated types. It saves them in andesine.json:
Commands use the nearest andesine.json. The file has no credentials, so you can commit it. Use init --mcp to also set up the local MCP server.
Flags and environment variables override the file:
Flag | Environment variable |
|---|---|
|
|
|
|
|
|
|
|
Call the API
andesine api <resource> <operation> runs any operation of the API reference. Names use kebab case: content.getTree is api content get-tree.
--helpshows the fields of an operation, and--schemashows its input JSON Schema.Pass fields as flags, such as
--collection-id, or as JSON with--input @file.jsonor--input -for stdin.Output is one JSON value per line.
--fulladds the HTTP status and headers.--paginateprints each page.--output <file>saves binary responses, such as images.
Other commands
Command | Does |
|---|---|
| Generates TypeScript types. See Content types. |
| Runs the local MCP server. See Local server and plugin. |
| Creates a Pages site. See Pages framework. |
| Creates, builds, and tests extensions. See Build extensions. |
Output and exit codes
Data goes to stdout, and messages and prompts go to stderr, so you can pipe the output to other tools. Prompts are off in CI and with --no-interactive.
Exit code | Meaning |
|---|---|
| Success |
| The command failed |
| Wrong usage or configuration |
| Generated types are out of date |
| Cancelled |