# The eesel CLI

The eesel CLI is a small tool you run in your terminal. It lets you chat with your eesel agent, pick up old conversations, see what your agent is doing, and preview scheduled reports — all without opening the dashboard.

It's free, and it talks to the same backend the dashboard does. Anything you do in the CLI uses the same agent, the same knowledge, and the same actions as your dashboard agent.

> **Who is this for?** Anyone comfortable opening a terminal window. You don't need to know how to code. Every command in this guide is meant to be copy-pasted.

## What you can do with it

* **Chat with your agent** from your terminal, just like in the dashboard.
* **Keep conversations going** across multiple terminal sessions — you can come back to the same chat later.
* **Switch between agents** if your workspace has more than one.

## Installing the CLI

The CLI lives in its own public repository at [github.com/eeselapp/eesel-cli](https://github.com/eeselapp/eesel-cli). It's a single Python file — no extra packages to install. You just need Python 3.8 or newer (most computers already have it).

### 1. Run the one-line installer

Open your terminal and paste:

```bash
curl -fsSL https://raw.githubusercontent.com/eeselapp/eesel-cli/main/install | sh
```

This downloads the `eesel` script into `~/.local/bin` and makes it ready to use. That's the whole install.

### 2. Check it works

```bash
eesel --help
```

You should see a list of commands. If your terminal says *"command not found"*, see the tips below.

### Tips and options

**Different install location.** If `~/.local/bin` isn't on your PATH, install somewhere your terminal already knows about:

```bash
EESEL_INSTALL_DIR=/usr/local/bin \
  curl -fsSL https://raw.githubusercontent.com/eeselapp/eesel-cli/main/install | sh
```

**Pin a specific version.** Useful if a teammate is on an older version and you want to match:

```bash
curl -fsSL https://raw.githubusercontent.com/eeselapp/eesel-cli/main/install | sh -s -- --version v0.1.0

# or with an environment variable
EESEL_VERSION=v0.1.0 \
  curl -fsSL https://raw.githubusercontent.com/eeselapp/eesel-cli/main/install | sh
```

**Uninstall.** Two folders to delete — the script itself and your saved data:

```bash
rm ~/.local/bin/eesel
rm -rf ~/.config/eesel
```

## Logging in

Before you can chat, you need to log in. Run:

```bash
eesel login
```

This opens [dashboard.eesel.ai/cli](https://dashboard.eesel.ai/cli) in your browser. Sign in like you normally would. The page sends a 24-hour login token back to the CLI, and you're ready to go.

You only need to log in once a day. After 24 hours, run `eesel login` again to refresh.

To check who you're logged in as:

```bash
eesel whoami
```

To log out and forget the token:

```bash
eesel logout
```

## Chatting with your agent

### Start a new conversation

```bash
eesel new
```

This creates a fresh chat session and makes it the "active" one.

### Send a message

```bash
eesel chat "How many open Zendesk tickets did we have last week?"
```

The agent replies right in your terminal. If it uses tools (like searching your knowledge or pulling tickets), you'll see that happen too.

### Open an interactive chat

If you'd rather have a back-and-forth without retyping `eesel chat` each time:

```bash
eesel chat
```

This drops you into an interactive prompt. Type your message, press enter, and the agent replies. Type `/quit` to leave. Inside the interactive prompt you also have a few handy shortcuts:

| Shortcut    | What it does                              |
| ----------- | ----------------------------------------- |
| `/new`      | Start a new chat session                  |
| `/sessions` | List your past sessions                   |
| `/agents`   | List agents in your workspace             |
| `/show`     | Show the full history of the current chat |
| `/quit`     | Exit                                      |

## Managing chat sessions

Each chat you have is saved as a "session" on your computer, so you can come back to it later.

```bash
eesel sessions list          # see all your past chats
eesel sessions use <id>      # switch to one
eesel sessions show          # print the full message history of the active one
eesel sessions delete <id>   # delete one
```

You don't need to type the whole session ID — the first few characters are enough.

## Switching agents

If your workspace has more than one agent (for example, a Support Agent and a Sales Agent), pick which one the CLI talks to:

```bash
eesel agents list                      # see all agents
eesel agents use 3f8a1c                # or by ID prefix
```

The first time you chat, the CLI will ask which agent to use if you haven't picked one yet.

## Where your data lives

Everything the CLI saves on your computer is in one folder:

```
~/.config/eesel/
├── credentials.json         your login token (auto-deleted after 24h)
├── current.json             which chat session is active
└── sessions/
    └── <id>.json            one file per chat, with the full message history
```

To wipe everything (login, sessions, history), just delete that folder:

```bash
rm -rf ~/.config/eesel
```

## Common questions

**Will using the CLI affect my real agent?** Chats you send through the CLI go to the same agent as the dashboard, so they show up in your Activity log and use your normal billing quota, just like a dashboard chat would.

**Can I share a session with a teammate?** Not directly — sessions live on your computer. But if you want a teammate to see what an agent said, you can copy the output from your terminal or use `eesel sessions show` and paste it.

**Does it work offline?** No. The CLI talks to your eesel workspace over the internet. If you lose connection mid-chat, just run the command again.

**My token expired — what do I do?** Run `eesel login` again. Tokens last 24 hours.

**Can I script with it?** Yes. Every command runs without prompting (unless it needs to pick an agent), and replies come straight to standard output. You can pipe `eesel chat "..."` into other tools.


---

# Agent Instructions: 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.eesel.ai/developer-tools/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.
