---
title: "Coding agents and shell completion | Hostemi"
description: "agent setup for Claude Code, Codex, Cursor and VS Code, the skills it installs, and completion for zsh, bash and fish. Hostemi docs."
canonical: https://hostemi.com/docs/cli/agents
source: https://hostemi.com/docs/cli/agents.md
---

# Coding agents and shell completion

agent setup for Claude Code, Codex, Cursor and VS Code, the skills it installs, and completion for zsh, bash and fish.

#### On this page

1. [agent setup](#agent-setup)
2. [Print a config instead](#print-a-config-instead)
3. [Using the CLI from a coding agent](#using-the-cli-from-a-coding-agent)
4. [Shell completion](#shell-completion)

## agent setup

`hostemi agent setup` finds Claude Code, Codex, Cursor and VS Code on this computer and adds the Hostemi MCP server (`https://mcp.hostemi.com/mcp`) to each tool's own config. It prints the files and the exact lines first, writes only the server address, and each tool signs in through your browser the first time it connects: no key lands in a file.

Command

```bash
hostemi agent setup --client cursor --dry-run
```

Output (recorded, exit 0)

```text
MCP server: https://mcp.hostemi.com/mcp

Cursor  ~/.cursor/mcp.json  (new file)
  + {
  +   "mcpServers": {
  +     "hostemi": {
  +       "url": "https://mcp.hostemi.com/mcp"
  +     }
  +   }
  + }

Dry run: nothing was written.
```

| Tool | What it writes |
| --- | --- |
| Claude Code | runs `claude mcp add --transport http --scope user hostemi …` (or edits `~/.claude.json`), skills into `~/.claude/skills` |
| Codex | `[mcp_servers.hostemi]` in `~/.codex/config.toml`, skills into `~/.codex/skills` |
| Cursor | `~/.cursor/mcp.json` |
| VS Code | the user `mcp.json` (under `servers`) |

Options: `--client claude-code,codex` for only some, `--no-skills`, `--url` for another server, `--yes` to write without asking (the diff is still printed).

## Print a config instead

`hostemi mcp config --client <name>` writes nothing; it prints what to paste. For Claude and ChatGPT it prints the steps in the app.

**claude-code**

```text
$ hostemi mcp config --client claude-code
Claude Code
  Add this to ~/.claude.json:

  {
    "mcpServers": {
      "hostemi": {
        "type": "http",
        "url": "https://mcp.hostemi.com/mcp"
      }
    }
  }

  Or run: claude mcp add --transport http hostemi https://mcp.hostemi.com/mcp

To write it for you: hostemi agent setup
```

**codex**

```text
$ hostemi mcp config --client codex
Codex
  Add this to ~/.codex/config.toml:

  [mcp_servers.hostemi]
  url = "https://mcp.hostemi.com/mcp"

To write it for you: hostemi agent setup
```

**cursor**

```text
$ hostemi mcp config --client cursor
Cursor
  Add this to ~/.cursor/mcp.json:

  {
    "mcpServers": {
      "hostemi": {
        "url": "https://mcp.hostemi.com/mcp"
      }
    }
  }

To write it for you: hostemi agent setup
```

**vscode**

```text
$ hostemi mcp config --client vscode
VS Code
  Add this to ~/Library/Application Support/Code/User/mcp.json:

  {
    "servers": {
      "hostemi": {
        "type": "http",
        "url": "https://mcp.hostemi.com/mcp"
      }
    }
  }

  Or run: code --add-mcp '{"name":"hostemi","type":"http","url":"https://mcp.hostemi.com/mcp"}'

To write it for you: hostemi agent setup
```

**claude**

```text
$ hostemi mcp config --client claude
Claude (claude.ai and the desktop app)
  1. In Claude, open Customize, then Connectors, choose Add, then Add custom connector.
  2. Enter the name Hostemi, paste the link below, press Continue, then Add.
  3. Press Connect and sign in to Hostemi. Choose whether Claude may make changes or only read.

  https://mcp.hostemi.com/mcp
```

**chatgpt**

```text
$ hostemi mcp config --client chatgpt
ChatGPT
  1. In ChatGPT, open chatgpt.com/plugins, press the plus button and choose Add custom MCP server.
  2. Enter the name Hostemi, paste the link below as the server URL and choose OAuth.
  3. Confirm, choose Create as a plugin, then sign in to Hostemi.

  https://mcp.hostemi.com/mcp
```

## Using the CLI from a coding agent

- Tell the agent to use `--json` and to read exit codes; `hostemi help --json` gives it the whole tree in one call.
- An agent has no terminal: changes need `--yes`, and the host's approval setting still decides. Exit 4 means: give the host the link and stop.
- For conversation-style work prefer the MCP server; for bulk jobs and files (CSV exports, a website document) the CLI is shorter.

## Shell completion

**zsh**

```bash
mkdir -p ~/.zfunc && hostemi completion zsh > ~/.zfunc/_hostemi
# in ~/.zshrc, before compinit:
fpath=(~/.zfunc $fpath)
```

**bash**

```bash
hostemi completion bash >> ~/.bashrc
# or for every user: hostemi completion bash > /etc/bash_completion.d/hostemi
```

**fish**

```bash
hostemi completion fish > ~/.config/fish/completions/hostemi.fish
```

Command

```bash
hostemi completion zsh
```

Output (recorded, exit 0, first lines)

```text
#compdef hostemi
# hostemi completion for zsh. Install:
#   mkdir -p ~/.zfunc && hostemi completion zsh > ~/.zfunc/_hostemi
#   then in ~/.zshrc, before compinit:  fpath=(~/.zfunc $fpath)
_hostemi() {
  local -a tops subs flags
  tops=(
    'whoami:Check the stored key or token and show which API it talks to'
    'status:What needs you today\: arrivals, departures, unpaid bookings, and whether you are signed in'
    'history:Who changed an object, when, from which surface, before and after'
```

Documentation pages

Something missing from this page? Write to [hello@hostemi.com](mailto:hello@hostemi.com), or use the form on the [Help](https://hostemi.com/help) page.
