monolayer Docs
monolayer Docs
Introduction

Getting Started

Install monolayer in your AWSAdd a GitHub App

User Guide

Platform

Deployment ArchitectureProcfile
OverviewInstallationAuthentication and Configuration
projects:listprojects:branch-tracking:getprojects:branch-tracking:setprojects:branch-tracking:deletedeployments:deployenv:listenv:setenv:delete

Other

Feedbackmonolayer SDK Docsmonolayer.dev
CLICommands

projects:branch-tracking:set

Use projects:branch-tracking:set to create or update a branch tracking rule for your project.

About projects:branch-tracking:set

This section describes how branch tracking rule creations and updates are performed.

When you run this command, you specify a branch (such as production, preview, or any custom branch name) and whether tracking should be --enabled or --no-enabled. If the specified custom branch rule already exists, it is updated; otherwise, a new rule is created. The command outputs { "success": true } upon successful completion.

Using projects:branch-tracking:set

This section provides a repeatable workflow for creating or updating a branch tracking rule.

Concept and Goal

To control whether push events on a specific branch should automatically trigger deployments, use this procedure to configure branch tracking rules.

What you need

  • You installed the CLI package.
  • You set MONOLAYER_BASE_URL or plan to pass --base-url.
  • You set MONOLAYER_AUTH_TOKEN (must be a deployment token starting with deploy_token_) or plan to pass --auth-token.

Numbered Steps

  1. Run the command with explicit flags to set a branch tracking rule.
npx mnlyr projects:branch-tracking:set \
  --base-url https://control-plane-domain \
  --auth-token deploy_token_xxx \
  --project-id proj-1 \
  --branch feature-test \
  --enabled
  1. Run the command using environment variables when you prefer session defaults.
MONOLAYER_BASE_URL="https://control-plane-domain" \
MONOLAYER_AUTH_TOKEN="deploy_token_xxx" \
npx mnlyr projects:branch-tracking:set --project-id proj-1 --branch feature-test --no-enabled

Expected Result

The command returns { "success": true } on successful completion.

projects:branch-tracking:set Reference

This section lists command syntax, options, and sample output.

Command syntax

npx mnlyr projects:branch-tracking:set [options]

Options

OptionDescription
--base-url <url>Sets the control plane base URL. You can also set MONOLAYER_BASE_URL.
--auth-token <token>Sets the project deployment auth token. You can also set MONOLAYER_AUTH_TOKEN.
--project-id <id>The identifier of your project. This option is required.
--branch <branch>The branch name or scope (production, preview, or a custom branch name). This is required.
--enabled / --no-enabledEnable or disable tracking for the specified branch. This is required.
-h, --helpShows command help.

Output

{
  "success": true
}

Troubleshooting

This section lists common command errors.

  • Missing base URL: Missing base URL. Pass --base-url explicitly or set MONOLAYER_BASE_URL.
  • Missing authentication token: Missing auth token. Pass --auth-token explicitly or set MONOLAYER_AUTH_TOKEN.
  • Invalid token format: auth-token must start with "deploy_token_"

projects:branch-tracking:get

Previous Page

projects:branch-tracking:delete

Next Page

On this page

About projects:branch-tracking:setUsing projects:branch-tracking:setConcept and GoalWhat you needNumbered StepsExpected Resultprojects:branch-tracking:set ReferenceCommand syntaxOptionsOutputTroubleshooting