# The asset library

> Every image, clip, sound and colour table in one place, with where it came from and whether you may reuse it.

Source: https://stuarty.com/docs/guide/asset-library/

## You will learn

- what the library holds and how a file gets into it;
- how to find a file, tag it and mark whether it may be reused;
- how to see which projects use a file.

## The idea

Everything you import or generate lands in one **library**, kept by content: the same file imported twice is one entry. Each entry records where it came from (a file you imported, a model that generated it, a template), its tags, a note about the rights you have to it, whether it may be reused, and the projects that use it. In the sidebar, **Images** holds images and **Videos** holds clips and **Sounds** holds music, effects, narration and generated voices; colour tables (`.cube` files) are in the same library, under Images.

An agent finds a reaction clip or a logo from a past production by searching, not by guessing a path.

## Quick start

1. Open **Images**, **Videos** or **Sounds**. The filter bar above the cards has **Search** (name, tag or project), **Tag**, **Origin** (imported, generated, fetched by an agent, rendered elsewhere) and **Reusable only**. The list follows the filters as you type or choose; there is nothing to apply.
2. Choose a card. The **Details** panel opens beside the grid with the origin (and, for a generated file, the provider, the model and the cost), the file facts, the tags and **Used by**, the projects that use it. **Close** hides it.
3. In the panel, add or remove tags, write a rights note, mark the file reusable (or not) and press **Save**. **Use in a project** adds the file to a project without a copy.
4. Read the size on the card, and the count and total at the top of the page. A file that several projects use is stored once and counted once. A file that is still importing, or that was deleted from the folder by hand, says so in words ("Still importing", "File missing") and has no size; it is never shown as 0 B. A missing file cannot be added to another project: import it again.
5. Right-click a card (or press the context-menu key), or use the buttons in the details, to **Rename** the file. The name changes in every project that holds it, and the file on disk keeps its name; Undo does not bring the old name back. Two files may share a name, so the card also shows the size and the day each was added.
6. In the desktop app, **Show in folder** opens your file manager with the stored file selected. In the browser on your own computer, **Copy path** puts the path of the stored file on the clipboard. Only you can do this, in a session you opened with your password: an agent, an API key and a server in network mode never get a path, and `stuarty asset:path` always says so.

**Sounds** lists only sounds. Each one has a player and a waveform (drawn from data the server computes, so a long file is never analysed in your browser), its duration and size. To add a sound, choose a project, type the path of the file on your computer and press **Import**; it appears in the list once it is ready. **Use** puts it in a project (you pick the timeline when the project has several), and **Move to the trash** removes it from one project.

From a terminal:

```bash
stuarty asset:list --kind image
stuarty asset:list --tag logo --reusable
```

Then, with the hash that `asset:list` prints:

```console
stuarty asset:show <hash>
stuarty asset:tag <hash> --add logo
stuarty asset:set <hash> --rights-note "Mine, all rights" --reusable
stuarty asset:uses <hash>
```

`asset:uses` lists the projects that use the file, which is what to read before you delete anything.

## Common mistakes

- Deleting a project and expecting its files to go. Files are kept by content in the library; trash is a state, not a folder.
- Marking a file reusable when its licence is not yours to pass on. The mark is a note to you and to your agent, not a check.

## Next steps

- [Media library](/docs/guide/media-library): the import side
- [The image editor](/docs/guide/image-editor)
- [The asset domain, for agents](/docs/agents/domain-asset)
