Skip to content
Copied!
published on 2026-04-11

Command Reference

Syntax

myllm <command> [options] [text]

Text can be passed as an argument or piped via standard input (stdin). If both are provided, the argument takes precedence.

Subcommands

help

Displays the help message.

bash
myllm help
myllm --help
myllm -h

version

Displays the version number.

bash
myllm version
myllm --version
myllm -V

list

Lists the tasks defined in the configuration file. translate is always included.

bash
myllm list

Example output:

Available tasks:

  translate    - Language translation with auto-detection

  explain      - Explain
  formal       - LinkedIn Speak
  polish       - Polish
  summarize    - Summarize

info <task>

Displays detailed information about a specific task, including the provider, model, instructions in use, and usage examples.

bash
myllm info <task_name>
myllm info translate
myllm info polish

Example output (myllm info translate):

Task: translate
Description: Language translation with automatic detection
Provider: ollama
Model: translategemma:12b

Configuration:
  Default source: en
  Default target: ja
  Fallback target: en

Usage:
  myllm translate "text"              # Auto-detect language
  myllm translate --to ja "text"      # Specify target
  myllm translate --from en "text"    # Specify source

translate [text]

Translates text. If whichlang-cli is installed, the source language is detected automatically. When language detection is unavailable, the configured default_source is assumed.

bash
# From stdin (automatic language detection)
echo "こんにちは" | myllm translate

# Pass as an argument
myllm translate "Hello, world"

# Specify target language
myllm translate --to fr "Hello"

# Specify source language
myllm translate --from ja "こんにちは"

# Specify both
myllm translate --from en --to de "Hello"

Translation language settings are configured in the [translation] section. See Configuration Reference — translation for details.

<task_name> [text]

Runs a task defined in the configuration file.

Streaming output while running a task

bash
# From stdin
echo "draft email text" | myllm polish

# Pass as an argument
myllm summarize "long article text here"

# Multi-line text (here-document)
myllm explain << 'EOF'
Explain what a monad is in functional programming.
EOF

For how to define tasks, see Configuration Reference — tasks.

Options

OptionShortDescription
--to <lang>Target language for translation (ISO 639-1 code, e.g., ja, en, fr)
--from <lang>Source language for translation (ISO 639-1 code). Auto-detected when omitted.
--with-clipboardRead input from the clipboard and copy output to the clipboard (macOS only)
--with-notifyShow system notifications when processing starts and completes (macOS only)
--version-VDisplay the version number
--help-hDisplay help

--with-clipboard (macOS)

Reads input from the clipboard (pbpaste) and copies output to the clipboard (pbcopy). Output is also written to stdout simultaneously.

bash
# Translate clipboard text and copy the result back to the clipboard
myllm translate --with-clipboard

# Polish and copy back to the clipboard
myllm polish --with-clipboard

--with-notify (macOS)

Displays a macOS system notification when processing starts and when it completes. Combine with --with-clipboard to receive a notification while processing runs in the background.

bash
myllm translate --with-clipboard --with-notify

Input Priority

  1. Command-line argument (myllm polish "text")
  2. --with-clipboard (macOS clipboard)
  3. Standard input (pipe or redirect)

Using as a Library

Source the myllm script to call its functions from within a shell script:

bash
source /usr/local/bin/myllm

# Load configuration
parse_toml "$CONFIG_FILE"

# Run a task (capture output in a variable)
result=$(myllm_process "polish" "draft text here")

# Translate
result=$(translate "Hello" "" "ja")