Skip to content

CLI Reference

The ReArch CLI is the primary tool for creating, managing, and deploying ReArch projects.

Terminal window
bun install -g @rearch/cli
Terminal window
rearch <command> [options]
FlagDescription
--help, -hShow help for a command
--version, -vShow CLI version
--verboseEnable verbose output
--quiet, -qSuppress non-essential output
--config <path>Path to config file (default: rearch.config.mjs)

Create a new ReArch project.

Terminal window
rearch init <project-name> [options]
OptionDefaultDescription
--template <name>defaultProject template: default, minimal, full
--package-manager <pm>bunPackage manager: bun, npm, pnpm
--gittrueInitialize a git repository
--installtrueInstall dependencies after creation

Example:

Terminal window
rearch init my-project --template minimal --package-manager bun

Start the development server.

Terminal window
rearch dev [options]
OptionDefaultDescription
--port <number>3000Port to run on
--host <address>localhostHost to bind to
--openfalseOpen browser on start

Build the project for production.

Terminal window
rearch build [options]
OptionDefaultDescription
--outdir <path>dist/Output directory
--minifytrueMinify output
--sourcemapfalseGenerate source maps

Deploy the project to ReArch Cloud.

Terminal window
rearch deploy [options]
OptionDefaultDescription
--env <name>productionTarget environment
--dry-runfalsePreview deployment without executing
--forcefalseSkip confirmation prompt

Manage agents in the current project.

Terminal window
rearch agent <subcommand>
SubcommandDescription
rearch agent listList all agents
rearch agent create <name>Create a new agent
rearch agent run <name>Run an agent
rearch agent logs <name>View agent logs
rearch agent delete <name>Delete an agent

Manage pipelines.

Terminal window
rearch pipeline <subcommand>
SubcommandDescription
rearch pipeline listList all pipelines
rearch pipeline run <name>Execute a pipeline
rearch pipeline status <name>Check pipeline status

Run the interactive setup wizard.

Terminal window
rearch setup

Authenticate with your ReArch account.

Terminal window
rearch login

Log out of your ReArch account.

Terminal window
rearch logout