# CLI

Manage properties, contacts, showings, and workflows from the terminal with the [Rentalot CLI](https://github.com/Rentalot-ai/rentalot-cli) — a Go-based command-line tool that wraps the [Rentalot API](/docs/api-reference).

## Install

**Go install** (recommended):

```bash
go install github.com/Rentalot-ai/rentalot-cli/cmd/rentalot@latest
```

**From source**:

```bash
git clone https://github.com/Rentalot-ai/rentalot-cli.git
cd rentalot-cli
make build    # Binary at bin/rentalot
```

## Setup

Get your API key from [Settings > API Keys](https://rentalot.ai/dash/settings?tab=api-keys), then configure:

```bash
mkdir -p ~/.config/rentalot
cat > ~/.config/rentalot/config.yaml << 'EOF'
api_key: ra_your_key
EOF
chmod 600 ~/.config/rentalot/config.yaml
```

Or set the environment variable:

```bash
export RENTALOT_API_KEY=ra_your_key
```

## Usage

```bash
rentalot --help
```

The CLI mirrors the [API resources](/docs/api-reference) — properties, contacts, showings, conversations, workflows, webhooks, and more. Each resource supports standard CRUD operations.

## Go Library

The CLI can also be used as a Go library for building custom integrations:

```go
import "github.com/Rentalot-ai/rentalot-cli/pkg/rentalotcli"
```

## Shell Completion

```bash
# Bash
source <(rentalot completion bash)

# Zsh
source <(rentalot completion zsh)

# Fish
rentalot completion fish > ~/.config/fish/completions/rentalot.fish
```

## Agent Skill

Install the bundled [Agent Skill](https://agentskills.io) so your coding agent knows all commands and options:

```bash
npx skills add Rentalot-ai/rentalot-cli
```

See the [GitHub README](https://github.com/Rentalot-ai/rentalot-cli) for manual install instructions.
