create
Create a new entity (actor, goal, interaction, or journey).
Usage
bash
et create <type> [options]Actor
bash
et create actor --id <id> --name <name> --description <description> [--goals <goal1,goal2>] [--tags <tag1,tag2>] [--meta key=value] [--meta-json '{"key":"value"}']| Option | Required | Description |
|---|---|---|
--id | Yes | Unique identifier |
--name | Yes | Human-readable name |
--description | Yes | Description of the actor |
--goals | No | Comma-separated goal IDs |
--tags | No | Comma-separated tags for filtering |
--meta | No | Metadata entry (repeatable) |
--meta-json | No | Metadata as JSON object |
Example:
bash
et create actor \
--id "customer" \
--name "Customer" \
--description "An online shopper looking to purchase products"With tags and metadata:
bash
et create actor \
--id "admin" \
--name "Administrator" \
--description "System administrator" \
--tags "internal,privileged" \
--meta "login_hint=admin@example.com" \
--meta "department=IT"Goal
bash
et create goal --id <id> [--name <name>] --description <description> [--actor <actor>] [--success-criteria <criteria>] [--tags <tag1,tag2>] [--meta key=value] [--meta-json '{"key":"value"}']| Option | Required | Description |
|---|---|---|
--id | Yes | Unique identifier |
--name | No | Human-friendly display name (defaults to id) |
--description | Yes | What the user wants to achieve |
--actor | No | Actor who has this goal |
--success-criteria | No | How we know the goal is achieved |
--tags | No | Comma-separated tags for filtering |
--meta | No | Metadata entry (repeatable) |
--meta-json | No | Metadata as JSON object |
Example:
bash
et create goal \
--id "complete_purchase" \
--name "Complete Purchase" \
--description "Successfully purchase products" \
--actor "customer" \
--success-criteria "Order confirmed, payment processed"With tags (for tracking legacy system conversion):
bash
et create goal \
--id "export_data" \
--description "Export data in multiple formats" \
--actor "admin" \
--tags "legacy,unverified"Interaction
bash
et create interaction --id <id> [--name <name>] --description <description> [--performed-by <actor>] [--goal <goal>] [--goals <goal1,goal2>] [--tags <tag1,tag2>] [--meta key=value] [--meta-json '{"key":"value"}']| Option | Required | Description |
|---|---|---|
--id | Yes | Unique identifier |
--name | No | Human-friendly display name (defaults to id) |
--description | Yes | What the interaction accomplishes |
--performed-by | No | Actor performing the action |
--goal | No | Goal this interaction supports (single goal) |
--goals | No | Multiple goals this interaction supports (comma-separated) |
--tags | No | Comma-separated tags for filtering |
--meta | No | Metadata entry (repeatable) |
--meta-json | No | Metadata as JSON object |
Example:
bash
et create interaction \
--id "add_to_cart" \
--name "Add to Cart" \
--description "Add products to shopping cart" \
--performed-by "customer" \
--goal "complete_purchase"With multiple goals:
bash
et create interaction \
--id "export_csv" \
--description "Export data as CSV file" \
--performed-by "admin" \
--goals "export_data,backup_data" \
--tags "legacy,verified" \
--meta "source_system=legacy_app"Journey
bash
et create journey --id <id> --actor <actor> --goal <goal> --steps <steps> [--narrative <narrative>] [--tags <tag1,tag2>] [--meta key=value] [--meta-json '{"key":"value"}']| Option | Required | Description |
|---|---|---|
--id | Yes | Unique identifier |
--actor | Yes | Protagonist (who benefits from completing the journey) |
--goal | Yes | Goal achieved at journey end |
--steps | Yes | Comma-separated interaction IDs (steps can be performed by any actor) |
--narrative | No | Description of the flow |
--tags | No | Comma-separated tags for filtering |
--meta | No | Metadata entry (repeatable) |
--meta-json | No | Metadata as JSON object |
Example:
bash
et create journey \
--id "checkout_flow" \
--actor "customer" \
--goal "complete_purchase" \
--steps "browse,add_to_cart,checkout" \
--narrative "Customer finds products and completes purchase"With tags:
bash
et create journey \
--id "legacy_export_flow" \
--actor "admin" \
--goal "export_data" \
--steps "select_format,export_csv,download_file" \
--tags "legacy,documented"Output
Default output shows confirmation:
Actor 'customer' created (file: .et/actors/customer.json)With --json:
json
{
"success": true,
"message": "Actor 'customer' created",
"data": {
"id": "customer",
"name": "Customer",
"description": "An online shopper looking to purchase products",
"tags": ["internal", "privileged"],
"meta": {
"login_hint": "admin@example.com",
"department": "IT"
},
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-15T10:30:00.000Z"
}
}Errors
- Entity with same ID already exists
- Missing required fields
- Invalid ID format (must be alphanumeric with underscores/hyphens)