---
schema_version: "1"
id: 085717cb17372370913ef494cd1c31ad183a98a59ab00f39e1521a51c9691a1f
title: Anypoint Platform CLI 4.x Overview
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/anypoint-cli/latest/index.md
canonical_url: https://docs.mulesoft.com/anypoint-cli/latest/
source_site: docs.mulesoft.com
content_type: documentation
content_hash: f0c107abd864fb575d22bb9b2978983e229991dd850d5d25b1c5422e82e82552
description: MuleSoft Documentation Site
release: 4.x
latest: true
---
---
product: Anypoint CLI
version: 4.x
is-latest-version: true
---

# Anypoint Platform CLI 4.x Overview

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Platform CLI provides scripting and command-line capabilities for Anypoint Platform and
Anypoint Platform Private Cloud Edition (PCE). Use the CLI to automate platform operations, manage
applications, and integrate with CI/CD pipelines. The tool enables developers and administrators to
perform common tasks efficiently through command-line interfaces. CLI supports both cloud and
on-premises deployments, enabling support for various enterprise environments.

Use Anypoint Platform CLI commands to automate a subset of product actions through scripts. Anypoint
Platform CLI 4.0 and later can be run only in batch mode. Interactive mode is no longer supported.

With Anypoint CLI 4.x you can:

- Enhance your workflow efficiency:  
  Streamline your API management and development processes with command-line tools.

- Ensure consistency across environments and organizations:  
  Apply consistent configurations and policies across different organizations and environments,
  ensuring stability and reliability in your operations.

- Manage your applications effectively:  
  Perform a wide range of operations on your APIs and applications, from deployment to monitoring,
  all from the command line.

> [!WARNING] Anypoint Platform CLI 4.x is not backward compatible. If you are using a version of
> Anypoint CLI earlier than Anypoint CLI 4.x,
> [read this first to find out about differences.](https://docs.mulesoft.com/anypoint-cli/latest/diff-earlier-ver)

## Before you begin

Because the Anypoint CLI is built with Node.js, you must:

1.  Install the Node package manager (npm)

2.  Install the Anypoint CLI using npm

    After the Anypoint CLI installation, you can run the commands.

For more information, refer to [Install Anypoint CLI](https://docs.mulesoft.com/anypoint-cli/latest/install).

## Syntax

The Anypoint Platform CLI command set has the following syntax:

```console
$ anypoint-cli-v4 [command]  [parameters] [flags]
```

If you run a command and there is an error, the application exits and returns a description of the
issue.

When using multi-option flags in a command, either put the parameter before the flags:

```console
anypoint-cli-v4 governance:api:validate param1 param2 --rulesets value1 --rulesets value2 --rulesets value3
```

Or use a `--` (two dashes followed by a space) before the parameter:

```console
anypoint-cli-v4 governance:api:validate --rulesets value1 --rulesets value2 --rulesets value3 -- param1 param2
```

> [!NOTE] You can write all commands separated by spaces or colons. For example:
> `runtime-mgr:application:list` can also be `runtime-mgr application list`.

## Default Flags

Anypoint Platform CLI commands have the following default flags:

<table><colgroup><col> <col></colgroup><thead><tr><th>Flag</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>--help</code></p></div></div></td><td><div><div><p>Displays command usage information</p></div></div></td></tr><tr><td><div><div><p><code>--organization</code></p></div></div></td><td><div><div><p>Your organization within Anypoint Platform</p></div><div><p>You can also pass this value using the environment variable <code>export ANYPOINT_ORG=&lt;name&gt;</code>.</p></div></div></td></tr><tr><td><div><div><p><code>--environment</code></p></div></div></td><td><div><div><p>Your Anypoint Platform environment</p></div><div><p>You can also pass this value using the environment variable <code>export ANYPOINT_ENV=&lt;name&gt;</code>.</p></div></div></td></tr><tr><td><div><div><p><code>--host</code></p></div></div></td><td><div><div><p>The host of your Anypoint Platform Installation<br>This value defaults to <code>anypoint.mulesoft.com</code>.<br></p></div><div><ul><li><p>If you are using Anypoint Platform PCE, pass the address where you are hosting the platform.</p></li><li><p>If you are using Anypoint Platform EU Cloud, pass your EU control plane URL.</p></li></ul></div><div><p>You can also pass this value using a dedicated environment variable <code>ANYPOINT_HOST=&lt;name&gt;</code>. For example, <code>ANYPOINT_HOST=my.anypoint.mulesoft.com</code>.</p></div></div></td></tr></tbody></table>

## Override Order

You can use environment variables to define values in Anypoint CLI. Following is the override order
if you mix environment variable settings with explicit command line values:

- Environment variables override credentials file parameters.

- Command-line parameters override environment variables.

- If you do not pass a command-line flag, the default profile properties are used.

- If you do not specify an environment, the default is production.

## Session Timeout

Your Anypoint Platform session expires based on the **Default session timeout** configured in your
Organization settings.

For information about Root Organization settings, see
[Manage Root Organization Settings](https://docs.mulesoft.com/access-management/managing-business-groups#manage-root-organization-settings).

## Anonymized Usage Data

To improve the Anypoint CLI experience, MuleSoft gathers anonymized usage data. You can opt out by
setting `collectMetrics` to false in the `credentials` file.

## See also

1.  [Install](https://docs.mulesoft.com/anypoint-cli/latest/install) Anypoint CLI.

2.  [Authenticate to Anypoint Platform](https://docs.mulesoft.com/anypoint-cli/latest/auth).

3.  [View the list of commands](https://docs.mulesoft.com/anypoint-cli/latest/anypoint-platform-cli-commands) available for the Anypoint Platform
    actions you can execute using Anypoint CLI.

4.  [Use a Proxy Server](https://docs.mulesoft.com/anypoint-cli/latest/proxy).
