Reference
Frontstack CLI
The Frontstack CLI is a command-line interface for interacting with your Frontstack Account and generating project-specific files, such as the Client SDK
Setup
You can use the Frontstack CLI in two ways:
- Install the CLI globally (enables the
frontstack
command) - Use
npx
to run the CLI (recommended)
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.
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.
project
Select the current working project which will be used for schema and client updates.
-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.
Options:
Option | Description |
---|---|
-s , --persist-oas | Persist OpenAPI specification file after generation |
-e , --env | Pass an environment alias like “develop” or “preview” |
-o , --output | Output path for generated files(default: “.frontstack”) |
-v , --verbose | Enable verbose output and error messages |
info
Display information about the current organization, project, and user.
help
Display help for a specific command.