# Quickstart

Source: https://crabtalk.ai/docs/guides/quickstart

> Install crab, build and call a service locally without an account, then deploy to Cloud when ready.

## 1. Install the CLI

```sh tab="macOS"
curl -fsSL https://crabtalk.ai/install.sh | sh
```

```sh tab="Linux"
curl -fsSL https://crabtalk.ai/install.sh | sh
```

```powershell tab="Windows"
irm https://crabtalk.ai/install.ps1 | iex
```

- It installs the latest release, [crab 0.1.14](https://github.com/crabtalk/crab/releases/tag/v0.1.14), to `~/.local/bin`, or to `CRAB_INSTALL_DIR`, after checking the download against the SHA-256 GitHub records for it. On Windows it adds that directory to your user `PATH` when it is not on it.
- Releases are built for macOS and Linux on x86_64 and arm64, and for Windows on x86_64.
- `crab update` replaces `crab` with the latest release when it is newer.

## 2. Create and build a service

```sh
crab new notes
cd notes
crab build
```

`crab new` writes a service with `echo` and durable `remember`/`recall` tools. `crab build` installs any missing build tools and builds its image. No account or login is needed for the local loop.

## 3. Run it locally

```sh
crab dev -d
crab --context default up
crab --context default auth status
crab --context default inspect notes
crab --context default call notes echo '{"query":"hello"}'
crab --context default call notes remember '{"message":"my first note"}'
crab --context default call notes recall '{}'
```

`crab dev -d` starts the host in the background at `http://127.0.0.1:7777`. `crab deploy` builds and deploys to it; run it again after changing the service. `--context default` selects the local host even if you have signed in to Cloud before.

`crab inspect` prints the service's tools and their arguments. The call returns `{"query":"hello"}`, with usage on stderr. `recall` returns `"my first note"` from persistent storage, including after a host restart. The starter shares this message across callers; see [Data](/docs/development/data) for per-user storage. Your agents can call the same tools over [local MCP](/docs/guides/local#mcp). Stop the host with `crab dev stop`.

## 4. Deploy to Cloud

When you want the service on CrabTalk Cloud, sign in:

```sh
crab auth login
```

Approve the terminal in your browser while signed in to the intended account. On a machine without a browser, open the printed link on another device. The CLI switches to the `cloud` context after you approve.

On Free, Cloud deployment requires GitHub verification first: `crab billing verify` ([E0001](/docs/errors/E0001)). Verified, Free runs your services on $1 of compute each UTC month; once it is used, calls wait for the next month or for a move to Go, and your services and data are kept. These requirements apply to Cloud hosting; local development stays account-free.

```sh
crab --context cloud deploy
```

It builds and deploys the same service to your account. It prints a link last: open it, review what it deploys, and approve. On Cloud, services are addressed as `owner/name`: use `crab inspect owner/name` to read their tools and `crab call owner/name <tool> '<arguments as JSON>'` to call one.

Writing its tools: [Writing a service](/docs/development/complete-service). Running it on your machine first: [Local host](/docs/guides/local).
