Skip to content

Ollama Docs, Revised

CLI reference1

Reference page. 9 changes, 8 questions for the owner. Audit: mixed. Original source at commit 318ee28.

Revised

The commands of the Ollama command-line interface (CLI), each with an example.2

3Run a model4

ollama run gemma4

5Multiline input

For multiline input, you can wrap text with """:

>>> """Hello,
... world!
... """
I'm a basic program that prints the famous "Hello, world!" message to the console.

Multimodal models?1X17

ollama run gemma4 "What's in this image? /Users/jmorgan/Desktop/smile.png"

Launch integrations

ollama launch

Configure and launch external applications to use Ollama models. This provides an interactive way to set up and start integrations with supported apps.

Supported integrationsX25

  • 6OpenCode: Open-source coding assistant
  • Claude Code: Anthropic's agentic coding tool
  • Codex: OpenAI's coding assistant
  • VS Code: Microsoft's IDE with built-in AI chat
  • Droid: Factory's AI coding agent

Examples

Launch an integration interactively:

ollama launch

Launch a specific integration:

ollama launch claude

Launch with a specific model:

ollama launch claude --model qwen3.5

Configure without launching:

ollama launch droid --config

Generate embeddings

ollama run embeddinggemma "Hello world"

Output is a JSON array:?2X42

echo "Hello world" | ollama run nomic-embed-text

Ask a decision modelX29

ollama run nimble --ask "Is a refund being requested?" < ticket.txt

ollama run nimble --ask "Which team should handle this?" \
  --choice billing="Payments and refunds" \
  --choice technical="Software problems" < ticket.txt

ollama run nimble --ask "How urgent is this?" \
  --level "Routine" \
  --level "Soon" \
  --level "Immediate" < ticket.txt

The state is piped in or given after the model name, as text or JSON. Each --ask question is answered yes or no, unless it's followed by labels to choose from (--choice) or levels to score it on (--level). See Decision.X41

Speak with a speech model

ollama run phonon "Hello from Ollama."

ollama run phonon --voice Zoey "Hi, this is Zoey."

ollama run phonon "Save this to a file." > speech.wav

The audio plays through your speakers, or is written as a Waveform Audio File Format (WAV)7 file when the output is redirected. Run it without text to speak each line you type. See Speech.

Download a model

ollama pull gemma4

Remove a model

ollama rm gemma4

List models

ollama ls

Sign in to Ollama

ollama signin

Sign out of Ollama

ollama signout

Create a customized model

First, create a Modelfile.8

FROM gemma4
SYSTEM """You are a happy cat."""

Then run ollama create:X16

ollama create -f Modelfile

List running models

ollama ps

Stop a running model

ollama stop gemma4

Start Ollama

ollama serve

To list the environment variables you can set, run ollama serve --help.9

Notes on this page

  1. 1 Wording Audit: improved Headings use sentence case.

    Was: # CLI Reference

    cap-sentence-case-headings

    Auditor: The title now uses sentence case.

  2. 2 Added Audit: regression A reference opens with one sentence on what it is; this one uses only terms already on the page.

    type-ref-austere

    Auditor: The introduction claims the page lists CLI commands with an example for each, which overstates its scope.

  3. 3 Structure Audit: improved Headings skipped level 2. Entries are now level 2 and sub-entries level 3.

    Was: Every entry heading was level 3 (###) directly under the level 1 title, and sub-entries were level 4 (####).

    long-no-skipped-levels

    Auditor: The heading levels now follow a clear hierarchy without skipping levels.

  4. 4 Wording Audit: improved Every unlabeled code block is now labeled shell, or text for the Modelfile and the multiline sample. Their contents are unchanged.

    Was: Code fences with no language label

    code-block-language

    Auditor: Language labels make the code blocks easier to interpret, and their contents remain unchanged.

  5. 5 Structure Audit: improved Both sections use ollama run, not ollama launch, so they moved under Run a model.

    Was: #### Multiline input and #### Multimodal models, placed under Launch integrations

    type-ref-mirror-thing

    Auditor: Moving the two ollama run sections under “Run a model” makes their relationship clearer.

  6. 6 Wording Audit: improved A spaced hyphen used as a dash is replaced with a colon in all five items.

    Was: - OpenCode - Open-source coding assistant (and the same hyphen in the four items after it)

    punct-no-other-dashes list-parallel-structure

    Auditor: Colons make the list descriptions easier to scan and keep their punctuation consistent.

  7. 7 Wording Audit: neutral The acronym is spelled out at first use.

    Was: WAV

    SpellOutFirst

    Auditor: Spelling out WAV adds detail, though “Waveform Audio File Format file” is awkward.

  8. 8 Wording Audit: improved The sentence gets its closing period.

    Was: First, create a Modelfile

    Auditor: The added period completes the sentence.

  9. 9 Wording Audit: improved The sentence gets a comma after the opening phrase, a period, and a more direct form.

    Was: To view a list of environment variables that can be set run ollama serve --help

    punct-comma-introductory voice-second-person

    Auditor: The revised sentence is more direct and adds the missing punctuation.

Questions for the owner

  • ?1 The example command contains what looks like a real person's username in the file path; should it be replaced with a reserved placeholder path?

    About: “ollama run gemma4 "What's in this image? /Users/jmorgan/Desktop/smile.png"”

  • ?2 The sentence says the output is a JSON array, but the command after it shows no output; should the output appear, and should the sentence come after the command?

    About: “Output is a JSON array:”

  • X16 ollama create command form. The CLI reference omits the model name, the Modelfile reference passes a name and -f, and Import passes a name without -f. Is a model name required for ollama create, and which form should the CLI reference show?

    Pages: CLI reference, Modelfile reference, Import a model

  • X17 CLI form for passing an image. The CLI reference puts the image path inside the quoted prompt, while the Vision page passes the path as a separate argument before the prompt. Which form should both pages show, and are both supported?

    Pages: CLI reference, Vision

  • X25 CLI reference's list of launch integrations is short. The CLI reference lists five supported ollama launch integrations, while integration pages document other launch targets it omits, such as OpenClaw, DeepSeek Harness, Copilot and Pool. Should the CLI reference list every launch target or link to the Integrations overview instead?

    Pages: CLI reference, OpenClaw, Run DeepSeek Harness with Ollama, Run Copilot CLI with Ollama, Use Pool with Ollama

  • X29 Decision feature also called System One. The capability page, nav and CLI reference call it Decision, while the cloud pages call the same feature System One. Which name should readers see, and should the other be introduced once as an alias?

    Pages: Decision, CLI reference, Run cloud models, Create an API key

  • X41 Decision and speech CLI examples in the CLI reference. The CLI reference repeats the --ask, --choice, --level and --voice examples from the Decision and Speech pages. Should the CLI reference keep one line each and link to the capability pages?

    Pages: CLI reference, Decision, Speech

  • X42 Embedding CLI example uses different models. The CLI reference and Embeddings page both show piping text to an embedding model, with different models. Should both pages use the same embedding model?

    Pages: CLI reference, Embeddings

Original

Run a model

ollama run gemma4

Launch integrations

ollama launch

Configure and launch external applications to use Ollama models. This provides an interactive way to set up and start integrations with supported apps.

Supported integrations

  • OpenCode - Open-source coding assistant
  • Claude Code - Anthropic's agentic coding tool
  • Codex - OpenAI's coding assistant
  • VS Code - Microsoft's IDE with built-in AI chat
  • Droid - Factory's AI coding agent

Examples

Launch an integration interactively:

ollama launch

Launch a specific integration:

ollama launch claude

Launch with a specific model:

ollama launch claude --model qwen3.5

Configure without launching:

ollama launch droid --config

Multiline input

For multiline input, you can wrap text with """:

>>> """Hello,
... world!
... """
I'm a basic program that prints the famous "Hello, world!" message to the console.

Multimodal models

ollama run gemma4 "What's in this image? /Users/jmorgan/Desktop/smile.png"

Generate embeddings

ollama run embeddinggemma "Hello world"

Output is a JSON array:

echo "Hello world" | ollama run nomic-embed-text

Ask a decision model

ollama run nimble --ask "Is a refund being requested?" < ticket.txt

ollama run nimble --ask "Which team should handle this?" \
  --choice billing="Payments and refunds" \
  --choice technical="Software problems" < ticket.txt

ollama run nimble --ask "How urgent is this?" \
  --level "Routine" \
  --level "Soon" \
  --level "Immediate" < ticket.txt

The state is piped in or given after the model name, as text or JSON. Each --ask question is answered yes or no, unless it's followed by labels to choose from (--choice) or levels to score it on (--level). See Decision.

Speak with a speech model

ollama run phonon "Hello from Ollama."

ollama run phonon --voice Zoey "Hi, this is Zoey."

ollama run phonon "Save this to a file." > speech.wav

The audio plays through your speakers, or is written as a WAV file when the output is redirected. Run it without text to speak each line you type. See Speech.

Download a model

ollama pull gemma4

Remove a model

ollama rm gemma4

List models

ollama ls

Sign in to Ollama

ollama signin

Sign out of Ollama

ollama signout

Create a customized model

First, create a Modelfile

FROM gemma4
SYSTEM """You are a happy cat."""

Then run ollama create:

ollama create -f Modelfile

List running models

ollama ps

Stop a running model

ollama stop gemma4

Start Ollama

ollama serve

To view a list of environment variables that can be set run ollama serve --help

What Changed

The headings were nested wrongly, with no second-level heading under the title and two unrelated sections placed under Launch integrations. They now run in order, and the two sections that use ollama run sit under Run a model. Code blocks got language labels, an intro sentence says what the page is, and a few small wording fixes were made. Every command, flag, model name, and example is unchanged, and the conflicts with other pages are flagged for the owner.

Content type: reference. The page lists the CLI commands, one entry per command, for lookup.

Automated check, original: 0 errors, 1 warnings, 0 suggestions. Revised: 0 errors, 0 warnings, 0 suggestions.

Independent audit (GPT-6): mixed. The revision improves the heading structure, code labels, and several wording choices. One new introductory sentence overstates what the page covers, and the revision leaves two flagged questions unresolved.

Regressions:

  • The new introduction implies that the page covers the CLI commands generally and gives an example for each, though it only presents selected commands and examples.

What the revision missed:

  • The revision flags but does not resolve the question about whether the JSON-array output example is missing or should follow the command; the current wording still leaves readers uncertain.
  • The “Examples” subheading is generic and could say what the examples show, as the standard asks headings to describe their contents.

Structure (2)

  • 3 Headings skipped level 2. Entries are now level 2 and sub-entries level 3. improved
  • 5 Both sections use ollama run, not ollama launch, so they moved under Run a model. improved

Wording (6)

  • 1 Headings use sentence case. improved
  • 4 Every unlabeled code block is now labeled shell, or text for the Modelfile and the multiline sample. Their contents are unchanged. improved
  • 6 A spaced hyphen used as a dash is replaced with a colon in all five items. improved
  • 7 The acronym is spelled out at first use. neutral
  • 8 The sentence gets its closing period. improved
  • 9 The sentence gets a comma after the opening phrase, a period, and a more direct form. improved

Added (1)

  • 2 A reference opens with one sentence on what it is; this one uses only terms already on the page. regression