# Leokani command line

`leokani` reads text aloud, offline. It's the command-line version of the Leokani app.

You need a Mac with Apple silicon (M1 or later) running macOS 15 or later. Nothing else to install.

## Install

In Terminal, in the folder you unzipped:

    ./install.sh             # for you: ~/.local/bin/leokani
    ./install.sh --system    # for everyone: /usr/local/bin/leokani (asks for your password)

If ~/.local/bin isn't on your PATH, the installer says how to add it.

## Examples

    leokani "Hello! I'm Leokani." -o hello.wav
    pbpaste | leokani --play
    leokani --speed 1.25 --float -o story.wav < story.txt
    cat notes.txt | leokani -o notes.wav && afplay notes.wav

Output is a 24 kHz mono WAV, 16-bit (or 32-bit float with `--float`). `--speed` goes from 0.5 to 2.0.
Run `leokani --help` for everything else.

Exit status: 0 done, 1 failed, 2 bad arguments, 3 nothing to say, 4 can't write the file.

## Use with Claude

- Claude Code: `claude mcp add leokani -- ~/.local/bin/leokani mcp`
- Claude Desktop: in Settings > Developer > Edit Config, add `"leokani": {"command": "/Users/YOU/.local/bin/leokani", "args": ["mcp"]}` under `"mcpServers"`.
- Then ask Claude to say something out loud, or to save it as a WAV.

## Uninstall

    rm -rf ~/.local/bin/leokani ~/.local/share/leokani

(or `sudo rm -rf /usr/local/bin/leokani /usr/local/share/leokani` if you used `--system`).

## Licence

Leokani-tts is by Milliwatt Labs and is licensed under CC BY-NC 4.0, so it's for non-commercial use only.
`leokani --version` shows the credits: training audio data generated from Kokoro-82M by hexgrad (Apache-2.0); pronunciation by espeak-ng
(GPL-3.0, source: https://github.com/espeak-ng/espeak-ng/tree/8269af044a94273f030fbfd3fa9033dd664db578). The licence
texts are in share/leokani/Licenses.

If you have a problem or feedback, tell the person who sent you Leokani.
