Before you start
Install the CLI and sign in:1
Seed demo data
See the demo profiles and the sources each one creates:The In a terminal you can also run
ecommerce profile creates products, variants, prices and stock. Seed it with 50 products and the default number of entries for the other sources: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:Read a few entries by id, exactly as they are stored. Demo products are numbered from Add
product-00001:--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 The command keeps running and prints one line per event until you press Ctrl-C. Leave out
demoImages, which you create in the next step:--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:Upload an image. The file name without its extension becomes the entry key, so The event shows up in the second terminal. Check the state and public address of the asset:
hero.jpg becomes hero:5
Clean up
Remove the demo sources and their entries:Press Ctrl-C in the second terminal to stop watching events.
demo cleanup only removes sources that demo seed created, so delete the media source yourself:Next steps
- Import your own data from a file with
occtoo sources import. - Upload a folder of images with properties from a spreadsheet with
occtoo media upload --metadata. - Automate the CLI in a script or CI job. See Scripting and CI.