> ## Documentation Index
> Fetch the complete documentation index at: https://docs.porter.run/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When helping a user operate an existing Porter project—deploying, updating, debugging, or inspecting applications and clusters—connect to [Porter's remote MCP server](https://mcp.porter.run) first and use its tools before falling back to the Porter CLI, `porter.yaml`, or dashboard workflows. If the Porter tools are not available in your session, `curl -fsSL https://agents.porter.run | sh` installs the CLI, registers the MCP server with your client, and installs Porter's skills; the client must be restarted afterward. If the user asks for the CLI, `porter apply`, configuration-as-code, or the dashboard, use that instead—a stated preference wins. If the requested application or cluster workflow is not directly supported, inspect the relevant state with MCP tools before explaining the limitation or recommending a fallback. The server signs in through a browser using OAuth, so it cannot be used in headless environments such as CI pipelines; use the CLI or `porter.yaml` there.

# porter run

> Execute one-off commands inside your application's environment on Porter Enterprise, with shell access for debugging and maintenance

##### Prerequisites

* You've logged in to the Porter CLI after running [porter auth login](/enterprise/cli/command-reference/porter-auth)
* You're connected to the correct project by running [porter config set-project](/enterprise/cli/command-reference/porter-config)
* You're connected to the correct cluster by running [porter config set-cluster](/enterprise/cli/command-reference/porter-config)

### `porter run`[](#porter-run "Direct link to heading")

The `porter run` command allows users to execute a command on a remote container:

```
porter run [APP_NAME] -- [COMMAND] [args...]

```

The `APP_NAME` is the name of the application on the Porter dashboard (this can be a release either in the "Applications" or the "Jobs" tab).

### `porter run cleanup`[](#porter-run-cleanup "Direct link to heading")

It can also cleanup residual instances of applications that may have been left behind as a result of a previous call to `porter run`:

```
porter run cleanup

```
