---
title: "CLI & URL scheme · Typd"
description: "Drive Typd from Terminal, scripts, Shortcuts and typd:// links: transcribe files to text, SRT, VTT or JSON, search history, start and stop dictations. Pro."
url: https://gettypd.app/docs/cli/
---

Docs

# CLI & URL scheme

Drive Typd from Terminal, scripts, Shortcuts and typd:// links: transcribe files to text, SRT, VTT or JSON, search history, start and stop dictations. Pro.

The command-line tool, links and Shortcuts actions are part of **Pro** automation. Everything here runs on your Mac and talks only to your own copy of Typd. Settings › **Automation** › **Other apps can control Typd** is **Ask before recording** by default; set it to **Off** and every command, link and Shortcuts action is refused (see [MCP & agents › Security](https://gettypd.app/docs/mcp/#security)).

## Install the command-line tool

Settings › **Automation** › **Install Command-Line Tool**. This adds a `typd` command without an administrator password:

-   in `/usr/local/bin`, if that folder exists and you can write to it;
-   otherwise in `~/.local/bin`. If that folder is not on your PATH, the pane shows the line to add to `~/.zshrc`.

It is a link to the tool inside the app, so it updates with the app. **Uninstall** in the same place removes it. The installer never overwrites a file it did not create.

## Commands

```text
typd transcribe <file…> [--model ID] [--format txt|srt|vtt|json] [--out PATH|DIR] [--no-history] [--headless]
typd ask "<question>" [--timeout S] [--json]
typd dictate [--timeout S] [--json]
typd start | stop | toggle | cancel
typd history search <words…> [--limit N] [--json]
typd history last
typd vocabulary | status | settings [pane] | mcp | help | version
```

Examples:

```sh
typd transcribe interview.m4a                       # prints the text
typd transcribe *.m4a --format srt --out ~/Subtitles/   # one .srt per file
typd ask "Ship it today?" --json                   # speak the answer, get JSON
typd history search invoice --limit 5
```

### transcribe

-   Supported files: MP3, M4A, WAV, AAC, FLAC, AIF/AIFF, CAF, MP4 and MOV (the same as [watch folders](https://gettypd.app/docs/watch-folders/)).
-   While Typd is running, it uses the app’s loaded model, your [vocabulary](https://gettypd.app/docs/vocabulary/), and saves to History.
-   If Typd is not running, or with `--headless`, the tool does **not** start the app: it runs the transcription itself, with the model selected in the app (or `--model`). Headless runs apply no vocabulary or replacements, and don’t save to History.
-   `--out` is a file (for one input) or a folder (`<name>.<format>` for each input). The tool refuses to overwrite an input file.
-   `--no-history` keeps the result out of History.
-   **SRT, VTT and JSON timings are estimates.** Typd’s file transcription returns text without word timestamps, so the text is split into sentences (long ones at word boundaries, at most 84 characters per cue) and the duration is shared out by length. JSON says `"timing": "estimated"`.

### Transcribe many files at once

Give `transcribe` several files, or a pattern, and a folder for `--out`. The tool writes one `<name>.<format>` file for each input. This turns a folder of interviews into text files next to the audio, and keeps them out of History:

```sh
typd transcribe ~/Interviews/*.m4a --format txt --out ~/Interviews/ --no-history
```

To see which file failed, and with which [exit status](#exit-status), run one file at a time:

```sh
for f in ~/Interviews/*.m4a; do
  typd transcribe "$f" --format srt --out ~/Subtitles/ || echo "failed ($?): $f"
done
```

### ask and dictate

`ask` shows the question under the recording pill and returns your spoken answer, like the [MCP](https://gettypd.app/docs/mcp/) tool `ask_user`. `dictate` does the same without a question. Neither touches the clipboard.

### Exit status

| Code | Meaning |
| --- | --- |
| 0 | OK |
| 1 | Failed |
| 2 | Usage error (unknown option, unsupported file) |
| 3 | App unavailable, no model, or automation off |
| 4 | Canceled |
| 5 | Timed out |

When Typd is not running, `ask`, `dictate`, `start`, `stop`, `toggle`, `cancel`, `history`, `vocabulary` and `settings` start it in the background. `status`, `help`, `version` and `transcribe` never start it.

## typd:// links

Open these from a launcher, a Stream Deck, a script (`open 'typd://toggle'`) or a web page:

| Link | Does |
| --- | --- |
| `typd://start`, `stop`, `toggle`, `cancel` | Starts, stops, toggles or discards a dictation. |
| `typd://transcribe?path=/full/path.m4a` | Transcribes the file into History and copies the text. Optional `&model=<id>`. |
| `typd://settings`, `settings/<pane>` | Opens Settings: `general`, `recording`, `models`, `vocabulary`, `storage`, `automation`, `license`. |
| `typd://history` | Opens History. |

**Recordings ask first.** With **Ask before recording** (the default), a link or a script that starts a dictation shows “Start recording?” in Typd. Set **Other apps can control Typd** to **Allowed** to skip the question. A dictation started by a link, the command line or another app stops by itself after 10 minutes. Links are checked strictly: any other route, extra parameter, or a link with a user name, port or fragment does nothing. A link can’t send anything back to the page that opened it, and browsers ask before opening it.

## Shortcuts

Typd adds these actions to the Shortcuts app:

-   **Start Dictation**, **Stop Dictation** (returns the text)
-   **Transcribe File** (returns the text)
-   **Get Last Transcript**
-   **Search Recordings** (returns the matching texts)

Start, Stop, Transcribe File and Get Last Transcript are also available to Siri and Spotlight. If Typd isn’t running, macOS starts it in the background.
