Skip to main content
The Frontstack CLI is a command-line interface for interacting with your Frontstack Account and generating project-specific files, such as the Client SDK
Frontstack CLI Hero

Setup

You can use the Frontstack CLI in two ways:
  1. Install the CLI globally (enables the frontstack command)
  2. Use npx to run the CLI (recommended)
# After installing, the `frontstack` command will be available globally
npm install -g @frontstackdev/cli
  • Global Installation: Choose this if you want to run the CLI commands frequently and pin them to a specific version. That way you need to update the CLI manually.
  • npx: Choose this if you only need to run the CLI commands occasionally. You will always run the latest version of the CLI (or the one cached by your package manager - so be aware of that).

Commands

login

Login to your Frontstack account. In most cases, you want to login from your current project directory (wherever you have your package.json file), so the CLI can place the generated files correctly.
frontstack login
This command will open a browser window to complete the login process. It will create a new token and store it in your .frontstack-local/ directory. This directory should be added to your .gitignore file to prevent sensitive information from being committed to your repository.

logout

Logout from your Frontstack account.
frontstack logout

project

Select the current working project which will be used for schema and client updates.
frontstack project
-p, --project-id: The id of the project to select.
The project will also be stored in your .frontstack-local/ directory.

generate

Generate a JavaScript client for the current project.
frontstack generate
If you are working with multiple environments, you can pass the --env option to generate a client for a specific environment
frontstack
frontstack generate --env develop
or select it interactively.
frontstack
frontstack generate
? Pick an environment (use arrow keys and enter) ›
 Fabulously Fast Frontend (develop)
    Fabulously Fast Frontend (preview)
    Fabulously Fast Frontend (public)
Options:
OptionDescription
-s, --persist-oasPersist OpenAPI specification file after generation
-e, --envPass an environment alias like “develop” or “preview”
-o, --outputOutput path for generated files(default: “.frontstack”)
-v, --verboseEnable verbose output and error messages

info

Display information about the current organization, project, and user.
frontstack info

help

Display help for a specific command.
frontstack help <command>