# Obsidian plug-in

> Keep the notes in one Obsidian vault folder in step with Content Workshop projects, both ways, and send a note to Creator Toolset in one click.

The Obsidian plug-in links the notes in one folder of your vault with the Content Workshop on your server. A note becomes a project, and its status stays the same on both sides. When you finish, a note with the status **Ready** has a project in the Workshop, and a change to its status shows up in the other place.

This plug-in runs on the desktop version of Obsidian only.

## Before you start

- Obsidian on a desktop computer.
- Creator Toolset on a server you can reach. By default it is the Mac app's own server, at `http://127.0.0.1:43128`.
- A key with **Full access**, from Creator Toolset.

## Install the plug-in

The plug-in is built from the repository. In a checkout, run:

```sh
cd apps/obsidian && npm ci && npm run build
```

Copy `manifest.json` and `main.js` into `<your vault>/.obsidian/plugins/creator-toolset/`. Then in Obsidian, open **Settings → Community plugins** and turn on **Creator Toolset**.

## Make a key and save it outside the vault

1. In Creator Toolset, open **Settings → Headless access**, and under **Access keys** choose **Full access** and press **Create key**.
2. Copy the key.
3. Save it in a file outside your vault, because a vault is often synced or kept in git:

```sh
mkdir -p ~/.config/creator-toolset
pbpaste > ~/.config/creator-toolset/key && chmod 600 ~/.config/creator-toolset/key
```

The `pbpaste` command takes the key from the clipboard on a Mac. On another system, write the key into the file with your editor. The plug-in reads the key from the file each time it syncs, and it never saves the key in its own data.

## Set up the plug-in

Open the plug-in's settings in Obsidian and set:

| Setting | What it does |
|---|---|
| **Server address** | The server the plug-in talks to. Left as the Mac app's own, it is `http://127.0.0.1:43128`. |
| **Key file** | The path of the file that holds the key. |
| **Folder** | The folder of notes to sync. |
| **Statuses that sync on their own** | The statuses that send a note by itself, comma-separated. The default is `Filming, Editing, Ready`. |
| **Status and media property names** | The note properties the plug-in reads. |
| **Workspace id** | The workspace that receives the notes. |
| **Sync interval** | How often the plug-in syncs. The default is 5 minutes. |
| **Auto sync** | Syncs on the interval without a press. |
| **Paused** | Stops all syncing. **Send** still works. |

A vault with its own status labels lists them in **Statuses that sync on their own**, for example `🎥 Filming, ✂️ Editing, 👍 Ready`.

## Send a note

Press the Creator Toolset ribbon icon, or run the command **Send to Creator Toolset**, with the note open. The note becomes a new project, or opens its existing one, and the Mac app opens it in the Workshop.

## What syncs

- **Notes in the folder**, including its subfolders. A note with a status in the list above is sent on its own, with its title, status, format, details and body. The server creates a project for it.
- **Status, both ways.** A change on either side comes to the other, and the later change wins. The plug-in writes only the status property and the change date into the note. Note bodies are never changed by a sync.
- **Exports.** Exports queued in the Workshop are written to their paths in the vault, with folders created. If the file was edited by hand, the export goes to `<name> (2).md` instead.

## What does not sync

- Notes outside the folder.
- Notes in the folder with the status **Idea**, **Writing**, **Published** or **Shelved**, unless you have sent them or the server already has a project for them.
- Renamed or moved notes. A link is by path, so a moved note counts as a new note.
- The Workshop's text. It is never written back into your notes, except new exports.

## Check it worked

- A note with the status **Ready** shows in the Workshop as a project.
- Changing the note's status to **Editing** changes the project's status too, and the other way round.

## If something goes wrong

- **The plug-in cannot reach the server.** Check the **Server address**. For the Mac app's server, the Mac app must be open. [Troubleshooting](/docs/troubleshooting) has the messages.
- **Nothing syncs.** Check **Paused** is off, and that the note's status is in **Statuses that sync on their own**, or that the note was sent once.
- **A note keeps its old status.** The later change wins, so change the status again on the side you want.

## Good to know

- The plug-in keeps the list of notes it has sent on this computer, not in the vault.
- The key has Full access. Keep the key file private, and do not commit it.
