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

# Quickstart

> Seed demo data, look at it, watch events, upload media and clean up, in a few minutes

This quickstart walks you through the CLI with demo data. You fill your organization with sample products, look at them, watch events as they happen, upload an image, and remove everything again.

> [!WARNING]
>
> The quickstart writes to your organization. Use a test or sandbox organization if you have one.

## Before you start

[Install the CLI](https://docs.occtoo.com/cli/installation.md) and sign in:

```bash theme={null}
occtoo auth login
occtoo whoami
```

**1. Seed demo data**

See the demo profiles and the sources each one creates:

```bash theme={null}
occtoo demo list
```

The `ecommerce` profile creates products, variants, prices and stock. Seed it with 50 products and the default number of entries for the other sources:

```bash theme={null}
echo '{"entries": {"demoProducts": 50}}' | occtoo demo seed ecommerce
```

In a terminal you can also run `occtoo demo seed` and pick a profile and entry counts from prompts. Every demo source id starts with `demo`, and seeding again overwrites the same entries instead of adding new ones.

**2. Look at a source**

Show the products source and its properties:

```bash theme={null}
occtoo sources show demoProducts
```

Read a few entries by id, exactly as they are stored. Demo products are numbered from `product-00001`:

```bash theme={null}
occtoo sources entries show demoProducts product-00001 product-00002
```

Add `--output json` to any of these commands to get JSON instead of a table.

**3. Watch events**

Open a second terminal and start watching for new entries in a media source called `demoImages`, which you create in the next step:

```bash theme={null}
occtoo events subscribe --filter 'type eq "source_entry.added" and sourceId eq "demoImages"'
```

The command keeps running and prints one line per event until you press Ctrl-C. Leave out `--filter` to see every event, and run `occtoo events types` to see what you can filter on.

**4. Upload an image**

Back in the first terminal, create a media source:

```bash theme={null}
echo '{"id": "demoImages", "name": "Demo images", "type": "Media"}' | occtoo sources create
```

Upload an image. The file name without its extension becomes the entry key, so `hero.jpg` becomes `hero`:

```bash theme={null}
occtoo media upload hero.jpg --to demoImages
```

The event shows up in the second terminal. Check the state and public address of the asset:

```bash theme={null}
occtoo media show demoImages hero
```

**5. Clean up**

Remove the demo sources and their entries:

```bash theme={null}
occtoo demo cleanup ecommerce --yes
```

`demo cleanup` only removes sources that `demo seed` created, so delete the media source yourself:

```bash theme={null}
occtoo sources delete demoImages --yes
```

Press Ctrl-C in the second terminal to stop watching events.

## Next steps

* Import your own data from a file with [`occtoo sources import`](https://docs.occtoo.com/cli/commands/sources#import-a-file).
* Upload a folder of images with properties from a spreadsheet with [`occtoo media upload --metadata`](https://docs.occtoo.com/cli/commands/media#give-files-properties).
* Automate the CLI in a script or CI job. See [Scripting and CI](https://docs.occtoo.com/cli/scripting.md).


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