> For the complete documentation index, see [llms.txt](https://docs.baas.sh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.baas.sh/baas-cli/cli.md).

# Introduction

The **BaaS CLI** (`@baas/cli`) deploys your smart contracts and registers them with BaaS in a single command.

```bash
baas login              # authenticate (opens your browser)
baas use my-project-id  # select your active project
baas deploy             # deploy a contract and register it with BaaS
```

The headline command, `baas deploy`, deploys through a **relayer**. The relayer signs and broadcasts the transaction server-side, so you can deploy without managing a private key locally.

## What the CLI does

* **Authenticate** with `baas login` and `baas logout`
* **Select a project** with `baas projects:list` and `baas use`
* **Deploy contracts** with `baas deploy` (through a relayer, no local private key), plus advanced flows when you want to use your own RPC and private key
* **Run Foundry** with any `forge` command, through `baas`

## If you've used the Firebase, Supabase, or Vercel CLI, you already know BaaS CLI

The commands map to habits you already have: `baas login`, `baas projects:list`, `baas use`, and `baas deploy`. The only blockchain-specific difference is that `baas deploy` targets a smart contract through a relayer.

{% hint style="info" %}
**Prerequisites**

* **Node.js ≥ 20**
* **Foundry** (`forge` in your `PATH`). The [Quick install](/baas-cli/quickstart.md) sets it up automatically; or install it from [getfoundry.sh](https://getfoundry.sh).
* A **BaaS account with a project** (created in the BaaS Dashboard; the CLI doesn't create projects).

Supported on macOS, Linux, and Windows via [WSL](https://learn.microsoft.com/windows/wsl/install). To deploy, you'll also need a **relayer**. See [Deploy a contract](/baas-cli/deploy.md).
{% endhint %}

## Start here

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Quickstart</strong></td><td>Install the CLI and deploy your first contract in minutes.</td><td><a href="/pages/5FZorwJrxCSvpeAaECRR">/pages/5FZorwJrxCSvpeAaECRR</a></td></tr><tr><td><strong>Deploy a contract</strong></td><td>Relayers, the deploy wizard, and the one-liner.</td><td><a href="/pages/8fc0uI44WiEWN4LzABvg">/pages/8fc0uI44WiEWN4LzABvg</a></td></tr><tr><td><strong>Command reference</strong></td><td>Every command and flag in one place.</td><td><a href="/pages/pqsULe0JbTEIm5I7WlHh">/pages/pqsULe0JbTEIm5I7WlHh</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.baas.sh/baas-cli/cli.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.
