# Installation

The CARTO CLI is published on npm as [`@carto/carto-cli`](https://www.npmjs.com/package/@carto/carto-cli) and installs as a global `carto` binary.

## Prerequisites

* **Node.js 18 or newer.** Check with `node --version`.
* A CARTO organization. The CLI works against CARTO Cloud (any region) and CARTO Self-Hosted deployments.

{% hint style="warning" %}
**CARTO Self-Hosted compatibility**

The CARTO CLI evolves with the rest of the CARTO Platform. The latest version of the CARTO CLI will always be compatible with the SaaS version of the platform. However, newer versions of the CLI might not be compatible with older versions of CARTO Self-Hosted deployments, due to missing API functionalities.

For a full compatibility list, check the [CARTO Self-Hosted release notes](/carto-self-hosted/release-notes.md).
{% endhint %}

## Install via npm

```bash
npm install -g @carto/carto-cli
```

Verify the install:

```bash
carto --version
carto --help
```

## Standalone executables

For environments where Node.js is not available, single-file executables are produced for macOS, Linux, and Windows during release. See the [carto-cli releases](https://www.npmjs.com/package/@carto/carto-cli) for download links and SHA checksums.

## Upgrade

```bash
npm install -g @carto/carto-cli@latest
```

## Next steps

* [Authenticate](/carto-for-agents/cli/authentication.md) to your CARTO organization with `carto auth login`.
* If you manage multiple CARTO organizations or environments, set up [named profiles](/carto-for-agents/cli/authentication.md#multiple-profiles).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.carto.com/carto-for-agents/cli/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
