Insites Docs Developers guide ReferenceCLI ToolInsites CLI Tool Commands and Options

Insites CLI Tool Commands and Options

Last updated on April 09, 2026.

Note

All CLI commands must be run from your project root directory, one level above the or directory.

This page is a complete reference for every command available in the Insites CLI. Commands are grouped by function. For installation and setup, see the Getting Started guide.

Environment Management

Environments connect your local codebase to a remote Insites instance. You need at least one environment configured before you can deploy, sync, or run any remote command.

Add an Environment

Connects your local project to an Insites instance. You will be prompted for your password after running the command.

  • - A short name for this environment (e.g., , )
  • - The email address associated with your Insites account
  • - The UUID of the instance you are connecting to, found in your Instance Admin under Settings

List Environments

Displays all environments configured for the current project directory.

Deployment

Deployment pushes your local code and assets to a remote instance. There are two approaches: a full deploy for releases, and live sync for active development.

Deploy

Deploys your entire codebase to the target environment. This is the standard way to release changes. By default, a full deploy removes any remote files and directories that do not exist locally.

You can also use the shorthand alias:

Options

  • - Partial deploy. Pushes your local files without removing remote directories that are missing locally. Useful when you only want to update specific files without affecting the rest of the instance.

Sync

Watches your local project for file changes and pushes them to the instance in real time. This is the recommended workflow during active development.

You can also use the shorthand alias:

Options

  • - Set the concurrency level for file uploads (number of files synced in parallel)
  • - Enable livereload, which automatically refreshes your browser when files change
  • - Sync a single file instead of watching the entire project

Archive

Creates a release archive (zip file) of your project without deploying it. Useful for creating snapshots or preparing offline release packages.

Data Management

These commands let you export, import, and clean data records stored on your instance. They are essential for migrating content between environments or resetting test data.

Export Data

Exports data records from the instance to a local JSON file.

Options

  • - The local file path where the exported JSON will be saved
  • - Include internal record IDs in the export. Useful when you need to preserve ID references during migration.

Import Data

Imports data records from a local JSON or ZIP file into the instance.

Options

  • - The path to the JSON or ZIP file to import

Clean Data

Irreversibly deletes all data rows on the target instance. This command requires double confirmation before executing and is restricted to staging environments by default.

Warning

This action cannot be undone. All data records on the instance will be permanently deleted. Use this only on staging or development environments.

Module Management

Modules are self-contained packages of functionality that can be installed on your instance. These commands help you manage modules installed through the Console.

List Modules

Lists all modules installed on the instance via the Console. This does not include modules that exist only in your local codebase.

Options

  • - Output the list in structured JSON format

Initialize a Module

Creates a new module from a starter template in your local project. This scaffolds the standard module directory structure for you.

Pull Modules

Downloads all Console-installed modules from the instance into your local project.

Options

  • - Specify a custom local path to download modules into

Remove a Module

Removes a module from the instance.

Set Module Version

Sets the version number for a module in . If no version is provided, it displays the current version.

Constants Management

Constants are key-value pairs stored on the instance, typically used for configuration values, API keys, and environment-specific settings. They are accessible in your Liquid code and GraphQL queries.

Set a Constant

Creates or updates a constant on the target instance.

Unset a Constant

Removes a constant from the target instance.

List Constants

Lists all constants on the target instance. By default, constant values are masked for security.

To display the actual values instead of masked output, set the environment variable:

Options

  • - Output the list in structured JSON format

Remote Execution

Execute Liquid code or GraphQL queries directly on a remote instance without deploying files. This is powerful for debugging, running one-off scripts, and querying data interactively.

Execute Liquid

Runs a Liquid code snippet on the remote instance and returns the output.

Options

  • - Execute Liquid code from a file instead of an inline string
  • - Return the output in structured JSON format

Execute GraphQL

Runs a GraphQL query on the remote instance and returns the result.

Options

  • - Execute a GraphQL query from a file instead of an inline string
  • - Return the output in structured JSON format

Code Quality

The CLI includes a built-in static analysis tool that checks your codebase for common issues before you deploy.

Audit

Runs static code analysis on your local project and reports any warnings or errors. Run this before deploying to catch issues early.

For a detailed breakdown of the rules the audit checks, see Linting Rules.

GUI

The CLI can launch a web-based graphical interface that provides a visual way to interact with your instance.

Serve GUI

Starts a local web server that hosts the GUI for the target environment. For more details on the GUI layout and features, see the GUI page.

Options

  • - Set a custom port for the local server
  • - Automatically open the GUI in your default browser
  • - Run file sync alongside the GUI, so changes you make locally are pushed in real time

Logs

Access and search your instance logs directly from the command line. The log commands support filtering, time-based searches, and alerting.

Search Logs

Searches and filters logs on the target instance.

Options

  • - Output results in structured JSON format

Search Around a Timestamp

Searches logs around a specific point in time. Useful for investigating what happened immediately before and after an event.

Options

  • - Output results in structured JSON format

List Log Alerts

Lists all configured log alerts on the instance.

Options

  • - Output results in structured JSON format

Add a Log Alert

Creates a new log alert on the instance. Log alerts notify you when specific patterns appear in your logs.

Options

  • - Output results in structured JSON format

Trigger a Log Alert

Manually triggers an existing log alert by its ID. Useful for testing alert configurations.

Options

  • - Output results in structured JSON format

Log Reports

Generates aggregated reports from your instance logs.

Options

  • - Output results in structured JSON format

Migrations

Migrations let you run versioned scripts that modify data or configuration on your instance. Each migration runs once and its status is tracked, so you always know which migrations have been applied.

Generate a Migration

Creates a new migration file with a timestamp prefix. The environment argument is optional; if omitted, the migration file is created locally without targeting an instance.

List Migrations

Lists all migrations and their current status (pending, applied, or failed). The environment argument is optional; if omitted, it shows local migration files only.

Options

  • - Output the list in structured JSON format

Run a Migration

Executes a specific migration by its timestamp. The environment argument is optional; if omitted, the migration runs against the default environment.

Other Commands

Pull Instance Data

Exports your instance application data into a local zip file. This is different from , which exports data records. This command exports the full app structure.

Options

  • - Specify a custom local path for the exported zip file

Initialize a Project

Creates the standard project directory structure in the current folder. Run this once when starting a new project.

Duplicate an Environment

Clones one environment into another, copying application code and configuration from the source to the target.

JSON Output

Many CLI commands support structured JSON output, which is useful for scripting, automation, and piping results into other tools.

You can enable JSON output in two ways:

Per-command Flag

Add the flag to any supported command:

Environment Variable

Set the environment variable to enable JSON output for all supported commands in your session:

Supported Commands

The following commands support the flag:

Upgrade the CLI

To upgrade to the latest version of the Insites CLI, run:

After upgrading, you can verify the installed version with:

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.