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

# CLI commands

> Reference for every Tappify CLI command — login, logout, init, publish, and deployments configure.

Every command is run as `tappify <command>`. Add `--help` to any command to see its options:

```bash theme={null}
tappify --help
tappify <command> --help
```

Most commands require you to be signed in — run [`tappify login`](#login) first.

## login

Authenticate the CLI with your Tappify account via a browser-based device flow.

```bash theme={null}
tappify login
```

Your session is stored locally and reused by every other command. If you're already logged in, this is a no-op.

## logout

Clear the stored session from this machine.

```bash theme={null}
tappify logout
```

## upgrade

Update the CLI to the latest version.

```bash theme={null}
tappify upgrade
```

For a binary install (curl), this downloads and swaps in the latest release in place. For a package-manager install (Homebrew, Scoop, Chocolatey, winget, npm), it prints the command to run for that manager instead.

## init

Create a `tap.config.json` in the current directory. The command prompts for your app name, slug, type, and base URL.

```bash theme={null}
tappify init
```

Run this in your project root before `publish`. It writes a config like:

```json tap.config.json theme={null}
{
  "name": "My App",
  "slug": "my-app",
  "type": "iframe",
  "baseUrl": "http://localhost:3000"
}
```

<Tip>
  Run [`tappify link`](#link) to connect this directory to a Tappify app so
  commands like `deployments configure` pick it up automatically — no `--app`
  flag needed.
</Tip>

## link

Connect the current directory to a Tappify project and its app(s). Writes a git-ignored `.tappify/project.json` so later commands (like `deployments configure`) know which app to act on.

```bash theme={null}
tappify link
```

Pick a project, then the app(s) this directory ships. A React Native repo that ships both an iOS and an Android app can select multiple; single-platform apps resolve to one.

<ParamField path="--project, -p <id>" type="string">
  Link a specific project without prompting.
</ParamField>

<ParamField path="--app, -a <id>" type="string">
  Link a specific app without prompting.
</ParamField>

## publish

Bundle your built app (`dist/`, `tap.config.json`, and icons) and upload it to Tappify.

```bash theme={null}
tappify publish
```

Requires a `tap.config.json` (run [`tappify init`](#init) first) and an authenticated session.

## deployments configure

Set up CI **code signing** for an app. The command walks you through it interactively — see the [signing guide](/guides/signing/setup) for the full walkthrough.

```bash theme={null}
tappify deployments configure
```

<ParamField path="--app, -a <id>" type="string">
  The app to configure signing for. If omitted, the CLI uses the app linked to
  this directory (run [`tappify link`](#link) first). You can also copy the
  exact command (with your app id) from the signing page in the dashboard.
</ParamField>

**Prerequisites:** `git` on your `PATH` (plus `gh`, the GitHub CLI, if you choose to create the certs repo with it). The command checks for everything it needs and tells you what's missing.

## create-deployment

Create a deployment for a project.

```bash theme={null}
tappify create-deployment <project-id> --environment production --branch main
```

<ParamField path="<project-id>" type="string" required>
  The project to deploy.
</ParamField>

<ParamField path="--environment, -e <env>" type="string" default="production">
  Target environment (e.g. `production`, `staging`).
</ParamField>

<ParamField path="--branch, -b <branch>" type="string">
  The branch to deploy.
</ParamField>

<ParamField path="--dry-run, -d" type="boolean">
  Print what would happen without making changes.
</ParamField>
