This document provides examples and workflow patterns for using the Atlas CLI tool.
We provide a number of end-to-end Atlas workflow examples in the /examples directory,
atlas-cli model create \
--paths=model.onnx \
--ingredient-names="Main Model" \
--name="Model Name" \
--author-org="Your Organization" \
--author-name="Your Name" \
--format=json \
--printatlas-cli dataset create \
--paths=data/ \
--ingredient-names="Training Data" \
--name="Dataset Name" \
--author-org="Your Organization" \
--author-name="Your Name" \
--format=json \
--printTo sign manifests, you'll need a private key.
Important: Cryptographic key generation and management are the responsibility of the end user. The security of your C2PA manifests depends entirely on the strength and proper management of your signing/verification keys.
# First, generate keys if you don't have them
make generate-keys
# Create a signed model manifest
atlas-cli model create \
--paths=model.onnx \
--ingredient-names="Main Model" \
--name="Signed Model" \
--author-org="Your Organization" \
--author-name="Your Name" \
--key=private.pem \
--format=json \
--printatlas-cli model create \
--paths=feature_extractor.onnx,classifier.onnx \
--ingredient-names="Feature Extractor,Classifier" \
--name="Complete Model" \
--author-org="Your Organization" \
--author-name="Your Name" \
--format=json \
--printatlas-cli dataset create \
--paths=train/,test/,validation/ \
--ingredient-names="Training Set,Test Set,Validation Set" \
--name="Complete Dataset" \
--author-org="Your Organization" \
--author-name="Your Name" \
--format=json \
--print# Store a model manifest in the database
atlas-cli model create \
--paths=model.onnx \
--ingredient-names="Main Model" \
--name="Database Model" \
--author-org="Your Organization" \
--author-name="Your Name" \
--storage-type=database \
--storage-url=http://localhost:8080 \
--format=json
# List manifests in database storage
atlas-cli model list \
--storage-type=database \
--storage-url=http://localhost:8080# Store a model manifest in the filesystem
atlas-cli model create \
--paths=model.onnx \
--ingredient-names="Main Model" \
--name="Filesystem Model" \
--author-org="Your Organization" \
--author-name="Your Name" \
--storage-type=filesystem \
--storage-url=./storage \
--format=json
# List manifests in filesystem storage
atlas-cli model list \
--storage-type=filesystem \
--storage-url=./storage# Step 1: Create a dataset manifest
atlas-cli dataset create \
--paths=training_data.csv \
--ingredient-names="Training Dataset" \
--name="MNIST Training Dataset" \
--author-org="Your Organization" \
--author-name="Your Name" \
--storage-type=database \
--storage-url=http://localhost:8080
# Output: Dataset ID (save for later use)
# Step 2: Create a model manifest
atlas-cli model create \
--paths=model.onnx \
--ingredient-names="Model" \
--name="MNIST Classifier" \
--author-org="Your Organization" \
--author-name="Your Name" \
--storage-type=database \
--storage-url=http://localhost:8080
# Output: Model ID (save for later use)
# Step 3: Link the dataset to the model
atlas-cli model link-dataset \
--model-id=<MODEL_ID> \
--dataset-id=<DATASET_ID> \
--storage-type=database \
--storage-url=http://localhost:8080
# Step 4: Verify the linking
atlas-cli model verify \
--id=<MODEL_ID> \
--storage-type=database \
--storage-url=http://localhost:8080# Step 1 & 2: Create manifests as above
# Step 3: Link manifests using C2PA cross-references
atlas-cli manifest link \
--source=<MODEL_URN> \
--target=<DATASET_URN> \
--storage-type=database \
--storage-url=http://localhost:8080
# Step 4: Show the linked manifest with cross-references
atlas-cli manifest show \
--id=<MODEL_URN> \
--storage-type=database \
--storage-url=http://localhost:8080# Validate all cross-references in a manifest
atlas-cli manifest validate \
--id=<MANIFEST_URN> \
--storage-type=database \
--storage-url=http://localhost:8080
# Verify a specific link between two manifests
atlas-cli manifest verify-link \
--source=<SOURCE_URN> \
--target=<TARGET_URN> \
--storage-type=database \
--storage-url=http://localhost:8080
# Create bi-directional links
atlas-cli manifest link \
--source=<MODEL_URN> \
--target=<DATASET_URN> \
--storage-type=database \
--storage-url=http://localhost:8080
atlas-cli manifest link \
--source=<DATASET_URN> \
--target=<MODEL_URN> \
--storage-type=database \
--storage-url=http://localhost:8080This example demonstrates tracking the entire ML workflow from raw data to final model:
# 1. Create manifest for raw training data
atlas-cli dataset create \
--paths=raw_data/ \
--ingredient-names="Raw Data" \
--name="Raw Training Data" \
--storage-type=database \
--storage-url=http://localhost:8080
# Save ID as RAW_DATA_ID
# 2. Create manifest for preprocessed data
atlas-cli dataset create \
--paths=preprocessed_data/ \
--ingredient-names="Preprocessed Data" \
--name="Preprocessed Training Data" \
--storage-type=database \
--storage-url=http://localhost:8080
# Save ID as PREPROCESSED_DATA_ID
# 3. Link preprocessed data to raw data
atlas-cli manifest link \
--source=$PREPROCESSED_DATA_ID \
--target=$RAW_DATA_ID \
--storage-type=database \
--storage-url=http://localhost:8080
# 4. Create manifest for the model
atlas-cli model create \
--paths=model.onnx \
--ingredient-names="ONNX Model" \
--name="Trained Model" \
--storage-type=database \
--storage-url=http://localhost:8080
# Save ID as MODEL_ID
# 5. Link model to preprocessed data
atlas-cli manifest link \
--source=$MODEL_ID \
--target=$PREPROCESSED_DATA_ID \
--storage-type=database \
--storage-url=http://localhost:8080atlas-cli software create \
--paths=train.py \
--ingredient-names="Training Script" \
--name="Image Classification Trainer" \
--software-type="script" \
--version="1.2.0" \
--author-org="ML Research Team" \
--author-name="Your Name" \
--description="Python script for training image classification models"
# Save ID as SOFTWARE_ID# Link a preprocessing script to a dataset
atlas-cli software link-dataset \
--software-id=$SOFTWARE_ID \
--dataset-id=$DATASET_ID
# Link a training script to a model
atlas-cli software link-model \
--software-id=$SOFTWARE_ID \
--model-id=$MODEL_IDatlas-cli model create \
--paths=model.onnx \
--ingredient-names="Model" \
--name="JSON Example" \
--format=json \
--printatlas-cli model create \
--paths=model.onnx \
--ingredient-names="Model" \
--name="CBOR Example" \
--format=cbor \
--printThe repository includes pre-configured examples that can be run using make:
# Setup examples directory structure
make setup-examples
# Run example for a single model
make example-model-single
# Run example for multiple model components
make example-model-multi
# Run example for dataset
make example-dataset-single
# Run example for a complete workflow
make example-full-workflow
# Run example for filesystem storage
make example-filesystem-storage