> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shouldertap.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI reference

> Every shtap command and its flags — init, serve, ask, queue, accept, reject, experts, audit, and mcp.

The `shtap` command-line tool is the entry point to ShoulderTap. `shtap serve` runs the engine; every other command is a thin HTTP client that talks to a running server. Every command accepts `--config` (default `shouldertap.yaml`).

## init

Generate a starter configuration.

```bash theme={null}
shtap init [--org-name "Acme Data Team"]
```

Writes `shouldertap.yaml` and `.env.example` to the current directory. Prompts for the organization name if `--org-name` isn't given. See [Install](/run/install).

## serve

Run the engine, HTTP API, and approval UI.

```bash theme={null}
shtap serve [--transport console|slack] [--host 0.0.0.0]
```

<ParamField query="--transport" type="console | slack" default="console">
  How experts are reached. See [Run the server](/run/serve).
</ParamField>

<ParamField query="--host" type="string" default="0.0.0.0">
  Host interface to bind to. The port comes from `server.port` (default `8776`).
</ParamField>

## ask

Submit a question as the `cli` consumer, then poll until it's answered.

```bash theme={null}
shtap ask "What does active customer mean?" --topic "revenue metrics"
```

<ParamField query="--topic" type="string" required>
  The routing topic to match against experts.
</ParamField>

<ParamField query="--kind" type="string" default="freeform.answer">
  The question kind, which determines the answer's capture schema.
</ParamField>

<ParamField query="--poll-interval" type="float" default="3.0">
  Seconds between status checks while waiting for an answer.
</ParamField>

<ParamField query="--timeout" type="float" default="300.0">
  Seconds to wait before giving up on the poll. The request itself keeps living on the server.
</ParamField>

The first line of output is `Submitted <request_id> ...`; once a reviewer accepts the answer, `ask` prints it attributed to the expert.

## queue

List proposals pending human review.

```bash theme={null}
shtap queue
```

Prints each pending proposal with its id, question, and answer, or `Nothing pending`. See [Approvals](/run/approvals).

## accept

Accept a pending proposal, delivering it to subscribed consumers.

```bash theme={null}
shtap accept prop_01J... [--decided-by alice]
```

<ParamField query="--decided-by" type="string">
  Who approved it. Defaults to your OS username.
</ParamField>

## reject

Reject a pending proposal.

```bash theme={null}
shtap reject prop_01J... --reason "not accurate" [--decided-by alice]
```

<ParamField query="--reason" type="string" required>
  Why it was rejected. Delivered to the consumer with the rejection event.
</ParamField>

<ParamField query="--decided-by" type="string">
  Who rejected it. Defaults to your OS username.
</ParamField>

## experts

List the expert registry with each expert's live state (muted, open asks, asks today).

```bash theme={null}
shtap experts
```

See [Experts and routing](/run/experts).

## audit

Print the full audit trail for one request.

```bash theme={null}
shtap audit req_01J...
```

Shows every event a request went through — received, routed, asked, escalated, replied, decided. Prints `No audit events` for an unknown id.

## mcp

Run the MCP server over stdio, exposing `ask_expert` and `check_answer`.

```bash theme={null}
shtap mcp
```

Intended to be spawned by an MCP client, not run interactively. See [MCP integration](/consumers/mcp).
