@@ -6,7 +6,7 @@ Leverage Arca.Cli's existing callback system (ST0003) to create an orthogonal ou
66
771 . Extends callbacks beyond REPL mode to ALL command execution
882 . Adds a context structure for carrying structured output data
9- 3 . Provides style renderers for different output modes (fancy , plain, dump)
9+ 3 . Provides style renderers for different output modes (ansi , plain, json , dump)
10104 . Maintains full backwards compatibility with existing commands
1111
1212The system follows pure functional Elixir idioms with composable functions and pattern matching throughout.
@@ -84,7 +84,7 @@ The system follows pure functional Elixir idioms with composable functions and p
8484 ┌────┴────┐
8585 ▼ ▼
8686┌──────────┐ ┌──────────┐
87- │ Fancy │ │ Plain │
87+ │ ANSI │ │ Plain │
8888│ Renderer │ │ Renderer │
8989└──────────┘ └──────────┘
9090```
@@ -94,8 +94,9 @@ The system follows pure functional Elixir idioms with composable functions and p
9494``` elixir
9595Arca .Cli .Ctx # Context struct and composition functions
9696Arca .Cli .Output # Main rendering pipeline
97- Arca .Cli .Output .FancyRenderer # Colored, formatted output
97+ Arca .Cli .Output .AnsiRenderer # Colored, formatted output
9898Arca .Cli .Output .PlainRenderer # No ANSI codes
99+ Arca .Cli .Output .JsonRenderer # JSON structured output
99100Arca .Cli .Output .DumpRenderer # Raw data inspection
100101```
101102
@@ -137,7 +138,7 @@ Arca.Cli.Output.DumpRenderer # Raw data inspection
137138{:list , items, title: title}
138139{:text , content}
139140
140- # Interactive elements (fancy mode only)
141+ # Interactive elements (ansi mode only)
141142{:spinner , label, func}
142143{:progress , label, func}
143144```
@@ -148,16 +149,16 @@ Arca.Cli.Output.DumpRenderer # Raw data inspection
148149
1491501 . Add ` Arca.Cli.Ctx ` module with composition functions
1501512 . Add ` Arca.Cli.Output ` module with rendering pipeline
151- 3 . Implement FancyRenderer and PlainRenderer modules
152+ 3 . Implement AnsiRenderer and PlainRenderer modules
1521534 . Register ` :format_command_result ` callback point
1531545 . Update ` execute_command ` to handle Ctx returns
154155
155- ### Phase 2: Global Options
156+ ### Phase 2: Style Control
156157
157- 1 . Add ` --style ` option to global CLI options
158- 2 . Add ` --no-ansi ` as alias for ` -- style plain`
159- 3 . Add environment variable support ( NO_COLOR)
160- 4 . Update help text to document new options
158+ 1 . Add environment variable support:
159+ - ` ARCA_STYLE ` to set output style (ansi, plain, json, dump)
160+ - ` NO_COLOR ` to force plain output
161+ 2 . Automatic style detection based on environment
161162
162163### Phase 3: Testing & Documentation
163164
@@ -230,10 +231,12 @@ end
230231mix my.cli command
231232
232233# Force plain style
233- mix my.cli --style plain command
234- mix my.cli --no-ansi command
234+ ARCA_STYLE=plain mix my.cli command
235235NO_COLOR=1 mix my.cli command
236236
237+ # Use JSON output
238+ ARCA_STYLE=json mix my.cli command
239+
237240# Test environment (automatic plain)
238241MIX_ENV=test mix my.cli command
239242```
0 commit comments