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

> ## Agent Instructions
> fal has two developer products. Model APIs run hosted models through an API key. fal Serverless deploys your own Python apps and models on fal GPUs.
> To call a hosted model, start with the [Quick Start](https://fal.ai/docs/documentation/quickstart.md) and the [Model APIs overview](https://fal.ai/docs/documentation/model-apis/overview.md).
> To deploy your own model with fal Serverless, start with these pages:
> - [Introduction to Serverless](https://fal.ai/docs/documentation/serverless/index.md): What fal Serverless is and the three ways to deploy on it.
> - [Installation & Setup](https://fal.ai/docs/documentation/development/getting-started/installation.md): Install the fal CLI with `pip install fal` and authenticate.
> - [Quick Start](https://fal.ai/docs/documentation/development/getting-started/quick-start.md): Build a Hello World app, test it with `fal run`, and ship it with `fal deploy`.
> - [App Lifecycle](https://fal.ai/docs/documentation/development/app-lifecycle.md): How a `fal.App` goes from code to running runners.
> - [Define Your Endpoints](https://fal.ai/docs/documentation/development/endpoints-overview.md): Structure the API endpoints that your app exposes.
> - [Deploy to Production](https://fal.ai/docs/documentation/deployment/deploy-to-production.md): Persistent URLs, authentication modes, and automatic scaling.
> - [Machine Types](https://fal.ai/docs/documentation/deployment/machine-types.md): Available GPU and CPU machine types and how to choose one.
> - [Pricing](https://fal.ai/docs/documentation/serverless/pricing.md): Per-second billing and the runner states that are billed.
> - [Scaling Parameter Reference](https://fal.ai/docs/documentation/deployment/scale-your-application.md): Parameters that control runners, concurrency, and scale to zero.
> - [Optimizing Cold Starts](https://fal.ai/docs/documentation/serverless/optimizations/optimize-cold-starts.md): Causes of cold starts and ways to make them shorter.
> - [Examples](https://fal.ai/docs/examples/index.md): Complete Serverless apps for image, video, audio, 3D, realtime, and multi-GPU workloads.
> - [Migrating to fal](https://fal.ai/docs/documentation/development/migrating-to-fal.md): Guides to move an existing Docker server or an app from another platform to fal.
> fal Serverless deploys need access that the fal team approves for each account. Request access at https://fal.ai/dashboard/serverless-get-started.

# CLI Overview

> Command-line interface for deploying and managing fal applications.

The `fal` CLI is your primary tool for deploying, managing, and monitoring serverless applications.

## Installation

```bash theme={null}
pip install fal
```

After installation, authenticate:

```bash theme={null}
fal auth login
```

## Core Commands

| Command | Description |
| :- | :- |
| `fal deploy` | Deploy an application to fal |
| `fal apps list` | List your deployed applications |
| `fal apps scale` | Configure scaling and concurrency |
| `fal runners list` | View active runners |
| `fal keys create` | Create API keys |
| `fal secrets set` | Manage environment secrets |
| `fal environments create` | Create isolated environments |

## Quick Examples

**Deploy an app:**

```bash theme={null}
fal deploy my_app.py
```

**List apps:**

```bash theme={null}
fal apps list
```

**Scale an app:**

```bash theme={null}
fal apps scale my-app --max-concurrency 10 --min-concurrency 1
```

**View logs:**

```bash theme={null}
fal apps logs my-app
```

**Create an environment:**

```bash theme={null}
fal environments create staging --description "Staging environment"
```

## Full Reference

For complete command documentation with all flags and options:

<Card title="CLI Reference" icon="terminal" href="/docs/reference/cli/installation">
  Complete CLI documentation
</Card>

## Programmatic Alternative

Need to automate CLI workflows from Python? Use the `SyncServerlessClient`:

<Card title="SyncServerlessClient" icon="python" href="/docs/serverless/python/client">
  Python client with methods that mirror CLI commands
</Card>
