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

# Publish and versions

> Versions save themselves by content. Publish the version that others and production use.

## Versions save themselves

You do not save a version by hand. Signed in, each run of a changed file saves a version in the background. The run's last line says `Saved as version N` with a dashboard link, or `Will save when online`. A failed save never stops or fails a run. Any later `method` command sends what is left in the outbox (`~/.cache/method/outbox`).

A version is identified by its content: `v_` and the first 32 hex digits of sha256(`METHOD_ID:package digest`). The same content is always the same version. Go back to earlier content (for example with git) and the run finds the existing version. Two computers can save at the same time; each version records its parent.

The package of a version holds the Method file and its declared files (script entrypoints are included automatically). Run a saved version on another computer with `method run wf_… --version v_…`, or make a local copy with `method get wf_… --out task.method`.

## The `id:` line

The first signed-in run writes `id: wf_…` as the second line of the file. It links the file to its Method. The content digest leaves it out. A renamed or moved file keeps its Method. A copy keeps it too: run `method new-id copy.method` to make the copy a new Method.

## Publish

```sh theme={null}
method publish support-triage.method --reason 'Ask a person when the team is unclear.'
```

`publish` marks the version of the file's current content as published. Production runs, schedules, and shared links use the published version by default. In order, it:

1. checks the issues: an error stops the publish, and nothing is published (see [The issue checker](/guides/issues));
2. finishes the upload, with no time limit while bytes move;
3. runs the Method's cases: a version that breaks an approved case is refused (see [Review, cases, and tests](/guides/review-and-test));
4. makes the missing [script cards](/guides/script-cards); a failed card check never blocks;
5. marks the version published with the reason (default `Published.`).

Warnings and notes never block a publish. The result lists the open ones. To publish a version that breaks a case on purpose, name it and give the reason:

```sh theme={null}
method publish report.method --accept-failing-case sources-named --reason 'The team approved dropping source names.'
```

`--cloud` runs the production runs of the environment on [Method Cloud](/guides/method-cloud); `--workers` moves them back to your workers. `--env NAME` selects the environment (default `production`).

## Find versions

`method list` lists your Methods. The dashboard shows each version, its parent, its runs, and which one is published. Restore an older version on the dashboard; it becomes a new version.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.