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

# CLI and headless use

> Run SelfTune directly for scripts, CI, servers, and advanced diagnostics.

The CLI is SelfTune's operational API. The agent skill and Desktop app use the
same runtime. Use it directly when you need repeatable automation, structured
output, or an environment without a desktop session.

## Run without a global install

```bash theme={null}
npx selftune@latest doctor
```

Examples in the reference use `selftune`. Prefix them with
`npx selftune@latest` when no executable is installed on `PATH`.

## Start with intent-level commands

```bash theme={null}
selftune doctor
selftune sync
selftune status
selftune improve --skill-path /path/to/skill --dry-run
selftune verify --skill-path /path/to/skill
```

Use `--json` when a command supports it and another program or agent will
consume the result. Treat low-level evolution, evaluation, and orchestration
commands as debugging or expert surfaces rather than the default workflow.

## Automation rules

* Pin or record the SelfTune version used by CI.
* Run previews before commands that can write a skill.
* Separate local analysis from remote upload.
* Preserve artifacts and exit output needed to reproduce a decision.
* Do not store Cloud or Remote Library tokens in command history or source.

See the [CLI reference](/cli/overview) for command-level documentation.

Prefer intent-level commands and structured output. Inspect `--help` for the
installed version when reference content and runtime disagree. Never interpret
a zero exit code as sufficient verification: inspect the returned state,
artifacts, and target revision. Keep remote writes and destructive actions
behind explicit user approval.
