giraflow-cli
v0.2.2
Published
Giraflow CLI – analyze and visualize Information Flow models in the terminal
Maintainers
Readme
Giraflow CLI
CLI tool for visualizing and analyzing Information Flow models (.giraflow.json).
Installation
npm install -g giraflow-cliUsage
Visualize an existing model
giraflow-cli <file> [options]Options
| Option | Description |
|--------|-------------|
| -v, --view <mode> | timeline, slice, or table |
| -e, --example | Show example data |
| -s, --schema <path> | Validate against JSON schema |
| --validate | Validate against bundled schema |
| -o, --output <file> | Export to file |
Examples
# Interactive mode (prompts for view)
giraflow-cli model.giraflow.json
# Slice view with scenarios
giraflow-cli model.giraflow.json -v slice
# Timeline with example data
giraflow-cli model.giraflow.json -v timeline -e
# Table view for documentation
giraflow-cli model.giraflow.json -v tableCreate a new model
giraflow-cli create [output-file]Starts an interactive wizard that guides you through building a .giraflow.json model step by step.
Workflow
- Model metadata — Name (required) and description (optional)
- Element loop — Repeat until done:
Choose element type: Event, State View, Actor, or Command
Enter a name
Fill in type-specific fields (all optional, press Enter to skip):
| Type | Optional fields | |------|----------------| | Event |
producedBy(command name),externalSource| | State View |sourcedFrom(comma-separated event names) | | Actor |readsView(defaults to last state),sendsCommand| | Command | — |Add example data (choose one):
- None — skip
- Free text — stored as a string value
- Key-Value pairs — interactive loop, stored as a JSON object
Confirm whether to add another element
- Save — writes the model as JSON with 2-space indentation
Examples
# Specify output file directly
giraflow-cli create my-model.giraflow.json
# Let the wizard ask for the filename (defaults to <name>.giraflow.json)
giraflow-cli createViews
Timeline
Chronological flow with symbols (●Event ◆State ▶Command ○Actor). Use -e to include example data.

With example data (-e):

Slice
Detailed panels with JSON examples and Given-When-Then scenarios.

Table
Tabular overview per element type with data flow tree.

See Also
giraflow — Live preview server with hot reload for viewing models in the browser.
