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

# nsc artifact extend

Extend the expiration of an artifact.

`artifact extend` pushes out the expiration of a finalized
[artifact](/docs/architecture/storage/artifact-storage) in this workspace.

This enables dynamic, access-based retention: create artifacts with a short
expiration and extend it whenever they are accessed.

At least one of `--by` or `--ensure_minimum` must be set. When both are set,
`--by` is applied first and `--ensure_minimum` then acts as a lower bound on the
result.

## Usage

```bash theme={null}
nsc artifact extend <path> [--by <duration>] [--ensure_minimum <duration>] [--namespace <namespace>]
```

### Example

```sh theme={null}
% nsc artifact extend target.txt --by 24h
Extended target.txt (namespace main); now expires 2024-02-16T10:30:00Z.
```

## Options

<h3 id="--by-duration">
  \--by \<duration>
</h3>

Extend the current expiration by this duration, relative to the artifact's current expiration.

<h3 id="--ensure_minimum-duration">
  \--ensure\_minimum \<duration>
</h3>

Ensure the artifact expires no sooner than this duration from now.

<h3 id="--namespace-namespace">
  \--namespace \<namespace>
</h3>

Namespace of the artifact. Defaults to "main".
