---
title: The ghostex command
description: Control Ghostex from any terminal, or let your agents do it.
---

Ghostex installs a command called `ghostex`. You can use it from any terminal, and your agents use it to control Ghostex for you.

## Handy commands

| Command                              | What it does                                              |
| ------------------------------------ | --------------------------------------------------------- |
| `ghostex ls`                         | List your running sessions.                               |
| `ghostex f`                          | Search every prompt you've sent to an agent.              |
| `ghostex attach`                     | Open a session in this terminal, even over SSH.           |
| `ghostex open <path>`                | Open a file or folder in Ghostex.                         |
| `ghostex guide`                      | Print the Ghostex guide (the same one Ask Ghostex reads). |
| `ghostex settings list`              | Show every setting and its value.                         |
| `ghostex settings set <key> <value>` | Change a setting.                                         |
| `ghostex --help`                     | See every command.                                        |

## Let agents drive Ghostex

With the **Ghostex CLI** skill installed (Settings > Integrations), agents can start other agents, send them messages, read their output, manage the Kanban board and automations, and change settings. You just ask in plain words, like "start a Codex session on the api project and ask it to fix the failing test".

:::tip[Ask Ghostex]
Try "What can I do with the ghostex command?"
:::
