# atmos vendor set

Set the version pinned for a component in your `vendor.yaml` manifest. The source is
matched by component name (not by index), and the edit preserves comments, anchors,
and Go templates such as `{{.Version}}` in source URLs. The search covers `vendor.yaml`
and every manifest it imports via `spec.imports`: the edit lands in whichever file
actually declares the component, not necessarily `vendor.yaml` itself.

:::info
`atmos vendor set` is an alias for [`atmos vendor config set`](/cli/commands/vendor/config/set): it resolves `<component>` to its `spec.sources[N].version` path and delegates to the canonical form.
:::

## Usage

```shell
atmos vendor set <component> <version> [--file <manifest>]
```

## Examples

```shell
atmos vendor set vpc v1.5.0
atmos vendor set eks 1.3.0 --file ./vendor.yaml
```

## Arguments

- **`<component>` (required)** — The component name as it appears in `spec.sources[].component`.
- **`<version>` (required)** — The new version to pin.

## Flags

- **`--file` (string, default `./vendor.yaml`)** — The vendor manifest file to edit.

:::note
If no source matches the given component name, the command fails rather than silently
making no change.
:::

## Try it out

### demo-vendoring

Copy the example into a new directory and make it your own:

```shell
atmos init examples/demo-vendoring
cd demo-vendoring
```

Pin the included `weather` component to a release, then read back the new version. This edits only your local `vendor.yaml`; it does not download components.

```shell
atmos vendor set weather v1.201.0
atmos vendor get weather
```

- [Installation guide](/install)
- [Explore the example](/examples/demo-vendoring)
- [Initialization and repository settings](/cli/commands/init#examples-and-source-directories)
