Skip to content

Commit cea76a6

Browse files
committed
hide more info on normal run; added demo gif
1 parent ae2c182 commit cea76a6

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
- **Simple and Hackable**: Intuitive CLI and YAML configs make it easy to craft dynamic prompts, with support for Python, shell, or any scripting language.
2020
- **Portable**: Isolated virtual environments (default and custom venvs) ensure dependency safety and portability; or use standard commands like git, cat, etc.
2121

22+
## Quick Demo
23+
![Demo](demo.gif)
24+
2225
#### [Documentation Site](https://oleks-dev.github.io/prich)
2326

2427
#### [See prich templates repository for examples](https://github.com/oleks-dev/prich-templates/blob/main/templates/README.md)

demo.gif

760 KB
Loading

prich/cli/dynamic_command_group.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ def dynamic_command(ctx, **kwargs):
8989
console_print(
9090
f"[dim]Template: [green]{template.name}[/green] ({template.version}), {template.source.value}, args: {', '.join([f'{k}={v}' for k, v in kwargs.items() if v])}[/dim]")
9191
console_print(f"[dim]{template.description}[/dim]")
92-
else:
93-
console_print(f"[dim][green]{template.name}[/green] ({template.version}), {template.source.value}[/dim]")
9492
run_template(template.id, **kwargs)
9593

9694
return click.Command(name=template.id, callback=dynamic_command, params=options,

prich/core/engine.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ def run_template(template_id, **kwargs):
7070
# show final step output when non-verbose execution
7171
step.output_console = True
7272

73-
step_brief = f"\nStep #{step_idx}: {step.name}"
73+
if is_verbose():
74+
step_brief = f"\n• Step #{step_idx}: {step.name}"
75+
else:
76+
step_brief = f"• {step.name}"
7477
should_run = should_run_step(step.when, variables)
7578
if (not should_run and is_verbose()) or should_run:
7679
when_expression = f" (\"when\" expression \"{step.when}\" is {should_run})" if step.when else ""

0 commit comments

Comments
 (0)