CLICommands
narrative
snug narrative <COMMAND>Narrative Engine - Manage universes, actors, stories, sessions, and events.
Subcommands
| Command | What it does |
|---|---|
create-universe | Create a new universe |
list-universes | List all universes |
get-universe | Get universe details |
delete-universe | Delete a universe |
create-actor-template | Create an actor template |
list-actor-templates | List actor templates |
publish-actor-template | Publish an actor template |
instantiate-actor | Instantiate an actor from a template |
create-actor | Create an actor directly |
list-actors | List actors in a universe |
get-actor | Get actor details |
delete-actor | Delete an actor |
create-story | Create a new story |
list-stories | List stories |
get-story | Get story details |
delete-story | Delete a story |
create-session | Create a new session |
list-sessions | List sessions |
get-session | Get session details |
end-session | End a session |
set-event | Set an event on an actor |
batch-set-events | Upsert many events under a universe from a JSON file (array of {actor_id, event_key, event}) |
get-event | Get an event |
list-actor-events | List events for an actor |
delete-event | Delete an event |
grant-control | Grant control of an actor to a player |
get-control | Get control status for an actor |
release-control | Release control of an actor |
create-attribute-template | Create an attribute template |
list-attribute-templates | List attribute templates |
get-attribute-template | Get attribute template details |
update-attribute-template | Update an attribute template |
delete-attribute-template | Delete an attribute template |
update-actor-template | Update an actor template |
delete-actor-template | Delete an actor template |
create-tag | Create a tag definition |
list-tags | List tag definitions |
update-tag | Update a tag definition |
delete-tag | Delete a tag definition |
update-universe | Update a universe |
update-actor | Update an actor |
update-actor-attribute | Update an actor attribute value |
update-story | Update a story |
update-session | Update a session (extend TTL) |
query-actors | Query actors with attribute filters |
promote-actor | Promote an actor to a higher scope |
replicate-actor | Replicate an actor to a new scope |
list-events | List events in a universe |
aggregate-events | Aggregate events by key (count) |
Run snug narrative <command> --help for that command's own options.
The global options apply everywhere.
Examples
snug narrative create-universe -n "My Game World" -d "A fantasy RPG universe"
snug narrative list-universes
snug narrative get-universe -u universe-123
snug narrative create-actor-template -u universe-123 -n "Orc Warrior" -t character
snug narrative publish-actor-template -u universe-123 -t template-456
snug narrative instantiate-actor -u universe-123 -t template-456 -n "Gruumsh"
snug narrative create-story -u universe-123 -n "The Dark Quest" -t main
snug narrative create-session -u universe-123 -p player-1 -s story-789
snug narrative list-sessions -u universe-123 --active-only
snug narrative set-event -u universe-123 -a actor-456 -k damage-1 --value-json '{"amount":50}'
snug narrative grant-control -u universe-123 -a actor-456 -p player-1 --session-id sess-123 --mode exclusive
snug narrative get-control -u universe-123 -a actor-456
snug narrative release-control -u universe-123 -a actor-456 --promote
snug narrative query-actors -u universe-123 --filters '[{"path":"attributes.health","operator":"gte","value":50}]'
snug narrative promote-actor -u universe-123 -a actor-456 --from-scope session --to-scope story --to-story-id story-789 --strategy merge
snug narrative replicate-actor -u universe-123 -a actor-456 --new-actor-id actor-999 --to-scope story --to-story-id story-789
snug narrative aggregate-events -u universe-123 -k player_choiceNext
- narrative guide - what the service does and when to reach for it.
- API reference - every endpoint these commands call.
- CLI reference - global options, output modes, and exit codes.