tasktree 0.0.21__tar.gz → 0.0.23__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. {tasktree-0.0.21 → tasktree-0.0.23}/.github/workflows/test.yml +9 -16
  2. {tasktree-0.0.21 → tasktree-0.0.23}/.gitignore +2 -0
  3. {tasktree-0.0.21 → tasktree-0.0.23}/CLAUDE.md +2 -0
  4. tasktree-0.0.21/README.md → tasktree-0.0.23/PKG-INFO +227 -17
  5. tasktree-0.0.21/PKG-INFO → tasktree-0.0.23/README.md +210 -32
  6. {tasktree-0.0.21 → tasktree-0.0.23}/pyproject.toml +5 -4
  7. {tasktree-0.0.21 → tasktree-0.0.23}/schema/tasktree-schema.json +6 -0
  8. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/__init__.py +1 -1
  9. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/cli.py +212 -119
  10. tasktree-0.0.23/src/tasktree/console_logger.py +66 -0
  11. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/docker.py +36 -23
  12. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/executor.py +412 -240
  13. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/graph.py +18 -13
  14. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/hasher.py +18 -11
  15. tasktree-0.0.23/src/tasktree/logging.py +112 -0
  16. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/parser.py +237 -135
  17. tasktree-0.0.23/src/tasktree/process_runner.py +411 -0
  18. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/state.py +7 -8
  19. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/substitution.py +29 -17
  20. {tasktree-0.0.21 → tasktree-0.0.23}/src/tasktree/types.py +32 -15
  21. tasktree-0.0.23/tasktree.yaml +54 -0
  22. {tasktree-0.0.21 → tasktree-0.0.23}/tests/e2e/__init__.py +7 -2
  23. {tasktree-0.0.21 → tasktree-0.0.23}/tests/e2e/test_docker_basic.py +11 -12
  24. {tasktree-0.0.21 → tasktree-0.0.23}/tests/e2e/test_docker_environment.py +13 -9
  25. {tasktree-0.0.21 → tasktree-0.0.23}/tests/e2e/test_docker_ownership.py +9 -9
  26. {tasktree-0.0.21 → tasktree-0.0.23}/tests/e2e/test_docker_volumes.py +13 -18
  27. tasktree-0.0.23/tests/e2e/test_logging_full_workflow.py +299 -0
  28. {tasktree-0.0.21 → tasktree-0.0.23}/tests/e2e/test_non_docker.py +12 -16
  29. tasktree-0.0.23/tests/e2e/test_task_output.py +526 -0
  30. tasktree-0.0.23/tests/helpers/io.py +14 -0
  31. tasktree-0.0.23/tests/helpers/logging.py +28 -0
  32. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_arg_choices.py +24 -10
  33. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_arg_min_max.py +6 -4
  34. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_builtin_variables.py +152 -87
  35. tasktree-0.0.23/tests/integration/test_clean_state.py +107 -0
  36. tasktree-0.0.23/tests/integration/test_cli_log_level.py +237 -0
  37. tasktree-0.0.23/tests/integration/test_cli_logging.py +211 -0
  38. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_cli_options.py +46 -47
  39. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_dependency_execution.py +42 -28
  40. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_dependency_outputs.py +14 -28
  41. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_end_to_end.py +59 -13
  42. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_exported_args.py +73 -80
  43. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_input_detection.py +6 -6
  44. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_missing_outputs.py +27 -14
  45. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_nested_imports.py +31 -13
  46. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_parameterized_deps_execution.py +3 -3
  47. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_parameterized_deps_templates.py +18 -16
  48. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_private_tasks_execution.py +15 -7
  49. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_self_references.py +173 -61
  50. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_state_persistence.py +6 -6
  51. tasktree-0.0.23/tests/integration/test_task_output.py +298 -0
  52. tasktree-0.0.23/tests/integration/test_unified_execution.py +215 -0
  53. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_working_directory.py +18 -8
  54. tasktree-0.0.23/tests/unit/test_cli.py +414 -0
  55. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_dependency_parsing.py +0 -2
  56. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_docker.py +99 -34
  57. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_environment_tracking.py +93 -46
  58. tasktree-0.0.23/tests/unit/test_executor.py +1826 -0
  59. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_graph.py +64 -24
  60. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_hasher.py +1 -0
  61. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_list_formatting.py +138 -96
  62. tasktree-0.0.23/tests/unit/test_logging.py +255 -0
  63. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_parser.py +403 -436
  64. tasktree-0.0.23/tests/unit/test_process_runner.py +821 -0
  65. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_state.py +6 -4
  66. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_substitution.py +125 -74
  67. {tasktree-0.0.21 → tasktree-0.0.23}/uv.lock +126 -3
  68. tasktree-0.0.21/.claude/settings.local.json +0 -23
  69. tasktree-0.0.21/tasktree.yaml +0 -50
  70. tasktree-0.0.21/tests/integration/test_clean_state.py +0 -187
  71. tasktree-0.0.21/tests/unit/test_cli.py +0 -271
  72. tasktree-0.0.21/tests/unit/test_executor.py +0 -1253
  73. {tasktree-0.0.21 → tasktree-0.0.23}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  74. {tasktree-0.0.21 → tasktree-0.0.23}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  75. {tasktree-0.0.21 → tasktree-0.0.23}/.github/workflows/claude-code-review.yml +0 -0
  76. {tasktree-0.0.21 → tasktree-0.0.23}/.github/workflows/claude.yml +0 -0
  77. {tasktree-0.0.21 → tasktree-0.0.23}/.github/workflows/release.yml +0 -0
  78. {tasktree-0.0.21 → tasktree-0.0.23}/.github/workflows/validate-pipx-install.yml +0 -0
  79. {tasktree-0.0.21 → tasktree-0.0.23}/.python-version +0 -0
  80. {tasktree-0.0.21 → tasktree-0.0.23}/__init__.py +0 -0
  81. {tasktree-0.0.21 → tasktree-0.0.23}/example/source.txt +0 -0
  82. {tasktree-0.0.21 → tasktree-0.0.23}/example/tasktree.yaml +0 -0
  83. {tasktree-0.0.21 → tasktree-0.0.23}/schema/README.md +0 -0
  84. {tasktree-0.0.21 → tasktree-0.0.23}/schema/vscode-settings-snippet.json +0 -0
  85. {tasktree-0.0.21 → tasktree-0.0.23}/src/__init__.py +0 -0
  86. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_docker_build_args.py +0 -0
  87. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_parameterized_dependencies.yaml +0 -0
  88. {tasktree-0.0.21 → tasktree-0.0.23}/tests/integration/test_variables.py +0 -0
  89. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_parameterized_graph.py +0 -0
  90. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_private_tasks.py +0 -0
  91. {tasktree-0.0.21 → tasktree-0.0.23}/tests/unit/test_types.py +0 -0
@@ -27,31 +27,26 @@ jobs:
27
27
  uses: astral-sh/setup-uv@v4
28
28
 
29
29
  - name: Install dependencies
30
- run: |
31
- uv pip install --system -e ".[dev]"
30
+ run: uv sync --extra dev
32
31
 
33
32
  - name: Pre-pull Docker images for E2E tests
34
33
  if: runner.os == 'Linux'
35
- run: |
36
- docker pull alpine:latest
34
+ run: docker pull alpine:latest
37
35
 
38
36
  - name: Run unit tests
39
- run: |
40
- python -m pytest tests/unit/ -v --tb=short
37
+ run: PYTHONPATH=tests uv run pytest tests/unit/ --tb=short
41
38
 
42
39
  - name: Run integration tests
43
- run: |
44
- python -m pytest tests/integration/ -v --tb=short
40
+ run: PYTHONPATH=tests uv run pytest tests/integration/ --tb=short
45
41
 
46
42
  - name: Run E2E Docker tests
47
43
  if: runner.os == 'Linux'
48
- run: |
49
- python -m pytest tests/e2e/ -v --tb=short
44
+ run: PYTHONPATH=tests uv run pytest tests/e2e/ --tb=short
50
45
 
51
46
  - name: Test CLI commands
52
47
  run: |
53
- python -m tasktree.cli --help
54
- python -m tasktree.cli --list || true
48
+ uv run tt --help
49
+ uv run tt --list || true
55
50
 
56
51
  lint:
57
52
  runs-on: ubuntu-latest
@@ -67,9 +62,7 @@ jobs:
67
62
  uses: astral-sh/setup-uv@v4
68
63
 
69
64
  - name: Install dependencies
70
- run: |
71
- uv pip install --system -e ".[dev]"
65
+ run: uv sync --extra dev
72
66
 
73
67
  - name: Check code can be imported
74
- run: |
75
- python -c "from tasktree import Executor, Recipe, Task; print('Import successful')"
68
+ run: uv run python -c "from tasktree import Executor, Recipe, Task; print('Import successful')"
@@ -159,3 +159,5 @@ requirements/*
159
159
 
160
160
  .athena-cache
161
161
 
162
+ .claude/settings.local.json
163
+
@@ -154,6 +154,8 @@ environments:
154
154
  env-name:
155
155
  default: true # Make this the default environment
156
156
  shell: /bin/bash # Shell environment
157
+ preamble: | # Optional preamble prepended to all commands
158
+ set -euo pipefail
157
159
  # OR
158
160
  dockerfile: path/to/Dockerfile # Docker environment
159
161
  context: build-context-dir
@@ -1,3 +1,20 @@
1
+ Metadata-Version: 2.4
2
+ Name: tasktree
3
+ Version: 0.0.23
4
+ Summary: A task automation tool with incremental execution
5
+ Requires-Python: >=3.11
6
+ Requires-Dist: click>=8.1.0
7
+ Requires-Dist: colorama>=0.4.6
8
+ Requires-Dist: pathspec>=0.11.0
9
+ Requires-Dist: pyyaml>=6.0
10
+ Requires-Dist: rich>=13.0.0
11
+ Requires-Dist: typer>=0.9.0
12
+ Provides-Extra: dev
13
+ Requires-Dist: black>=26.1.0; extra == 'dev'
14
+ Requires-Dist: pytest>=9.0.2; extra == 'dev'
15
+ Requires-Dist: ruff>=0.14.14; extra == 'dev'
16
+ Description-Content-Type: text/markdown
17
+
1
18
  # Task Tree (tt)
2
19
 
3
20
  [![Tests](https://github.com/kevinchannon/task-tree/actions/workflows/test.yml/badge.svg)](https://github.com/kevinchannon/task-tree/actions/workflows/test.yml)
@@ -234,26 +251,26 @@ tasks:
234
251
  working_dir: subproject/ # Execution directory (default: project root)
235
252
  env: bash-strict # Execution environment (optional)
236
253
  private: false # Hide from --list output (default: false)
254
+ task_output: all # Control task output: all, out, err, on-err, none (default: all)
237
255
  args: # Task parameters
238
256
  - param1 # Simple argument
239
257
  - param2: { type: path, default: "." } # With type and default
240
258
  cmd: go build -o dist/binary # Command to execute
241
259
  ```
242
260
 
261
+ **Task name constraints:**
262
+ - Task names cannot contain dots (`.`) - they are reserved for namespacing imported tasks
263
+ - Example: `build.release` is invalid as a task name, but valid as a reference to task `release` in namespace `build`
264
+
243
265
  ### Commands
244
266
 
245
- **Single-line commands** are executed directly via the configured shell:
267
+ All commands are executed by writing them to temporary script files. This provides consistent behavior and better shell syntax support:
246
268
 
247
269
  ```yaml
248
270
  tasks:
249
271
  build:
250
272
  cmd: cargo build --release
251
- ```
252
273
 
253
- **Multi-line commands** are written to temporary script files for proper execution:
254
-
255
- ```yaml
256
- tasks:
257
274
  deploy:
258
275
  cmd: |
259
276
  mkdir -p dist
@@ -261,7 +278,7 @@ tasks:
261
278
  rsync -av dist/ server:/opt/app/
262
279
  ```
263
280
 
264
- Multi-line commands preserve shell syntax (line continuations, heredocs, etc.) and support shebangs on Unix/macOS.
281
+ Commands preserve shell syntax (line continuations, heredocs, etc.) and support shebangs on Unix/macOS.
265
282
 
266
283
  Or use folded blocks for long single-line commands:
267
284
 
@@ -277,7 +294,7 @@ tasks:
277
294
 
278
295
  ### Execution Environments
279
296
 
280
- Configure custom shell environments for task execution:
297
+ Configure custom shell environments for task execution. Use the `preamble` field to add initialization code to all commands:
281
298
 
282
299
  ```yaml
283
300
  environments:
@@ -285,17 +302,14 @@ environments:
285
302
 
286
303
  bash-strict:
287
304
  shell: bash
288
- args: ['-c'] # For single-line: bash -c "command"
289
- preamble: | # For multi-line: prepended to script
305
+ preamble: | # Prepended to all commands
290
306
  set -euo pipefail
291
307
 
292
308
  python:
293
309
  shell: python
294
- args: ['-c']
295
310
 
296
311
  powershell:
297
312
  shell: powershell
298
- args: ['-ExecutionPolicy', 'Bypass', '-Command']
299
313
  preamble: |
300
314
  $ErrorActionPreference = 'Stop'
301
315
 
@@ -324,8 +338,8 @@ tasks:
324
338
  4. Platform default (bash on Unix, cmd on Windows)
325
339
 
326
340
  **Platform defaults** when no environments are configured:
327
- - **Unix/macOS**: bash with `-c` args
328
- - **Windows**: cmd with `/c` args
341
+ - **Unix/macOS**: bash
342
+ - **Windows**: cmd
329
343
 
330
344
  ### Docker Environments
331
345
 
@@ -864,7 +878,8 @@ tasks:
864
878
  inputs: [src/app-{{ var.version }}.c]
865
879
  outputs: [build/app-{{ var.version }}.o]
866
880
  cmd: gcc src/app-{{ var.version }}.c -o build/app-{{ var.version }}.o
867
-
881
+ ```
882
+ ```yaml
868
883
  # With self-references - DRY
869
884
  tasks:
870
885
  build:
@@ -1606,6 +1621,14 @@ tt -o deploy
1606
1621
  # Override environment for all tasks
1607
1622
  tt --env python analyze
1608
1623
  tt -e powershell build
1624
+
1625
+ # Control task subprocess output display
1626
+ tt --task-output all build # Show both stdout and stderr (default)
1627
+ tt --task-output out test # Show only stdout
1628
+ tt --task-output err deploy # Show only stderr
1629
+ tt --task-output on-err ci # Show stderr only if task fails
1630
+ tt --task-output none build # Suppress all task output
1631
+ tt -O none build # Short form
1609
1632
  ```
1610
1633
 
1611
1634
  ### Information Commands
@@ -1634,8 +1657,6 @@ tt --init
1634
1657
  ```bash
1635
1658
  # Remove state file (reset task cache)
1636
1659
  tt --clean
1637
- tt --clean-state
1638
- tt --reset
1639
1660
  ```
1640
1661
 
1641
1662
  ### Common Workflows
@@ -1654,6 +1675,194 @@ tt --env python test
1654
1675
  tt --force deploy production
1655
1676
  ```
1656
1677
 
1678
+ ### Logging Control
1679
+
1680
+ Task Tree provides fine-grained control over diagnostic logging verbosity through the `--log-level` flag. This allows you to adjust the amount of information displayed about task execution, from minimal error-only output to detailed trace logging.
1681
+
1682
+ **Log Levels:**
1683
+
1684
+ ```bash
1685
+ # Show only fatal errors (malformed task files, missing dependencies)
1686
+ tt --log-level fatal build
1687
+
1688
+ # Show fatal errors and task execution failures
1689
+ tt --log-level error build
1690
+
1691
+ # Show errors and warnings (deprecated features, configuration issues)
1692
+ tt --log-level warn build
1693
+
1694
+ # Show normal execution progress (default)
1695
+ tt --log-level info build
1696
+ tt build # Same as above
1697
+
1698
+ # Show detailed diagnostics (variable values, resolved paths, environment details)
1699
+ tt --log-level debug build
1700
+
1701
+ # Show fine-grained execution tracing
1702
+ tt --log-level trace build
1703
+ ```
1704
+
1705
+ **Short Form:**
1706
+
1707
+ ```bash
1708
+ tt -L debug build
1709
+ tt -L trace test
1710
+ ```
1711
+
1712
+ **Case Insensitive:**
1713
+
1714
+ ```bash
1715
+ tt --log-level INFO build # Works
1716
+ tt --log-level Debug test # Works
1717
+ tt --log-level TRACE deploy # Works
1718
+ ```
1719
+
1720
+ **Common Use Cases:**
1721
+
1722
+ **Debugging Workflows:**
1723
+ ```bash
1724
+ # See variable substitution and resolved paths
1725
+ tt --log-level debug deploy production
1726
+
1727
+ # See detailed execution steps and internal state
1728
+ tt --log-level trace build
1729
+ ```
1730
+
1731
+ **CI/CD Environments:**
1732
+ ```bash
1733
+ # Suppress progress messages, show only errors
1734
+ tt --log-level error build test package
1735
+
1736
+ # Minimal output for clean build logs
1737
+ tt --log-level warn ci
1738
+ ```
1739
+
1740
+ **Normal Development:**
1741
+ ```bash
1742
+ # Default level shows normal execution progress
1743
+ tt build test
1744
+ ```
1745
+
1746
+ **Understanding Log Levels:**
1747
+
1748
+ - **FATAL** (least verbose): Only unrecoverable errors that prevent execution
1749
+ - **ERROR**: Fatal errors plus individual task failures
1750
+ - **WARN**: Errors plus warnings about deprecated features or configuration issues
1751
+ - **INFO** (default): Normal execution progress messages
1752
+ - **DEBUG**: Info plus variable values, resolved paths, environment configuration
1753
+ - **TRACE** (most verbose): Debug plus fine-grained execution tracing
1754
+
1755
+ Log levels are hierarchical - setting a higher verbosity level (e.g., DEBUG) includes all messages from lower levels (FATAL, ERROR, WARN, INFO).
1756
+
1757
+ **Note:** The `--log-level` flag controls Task Tree's own diagnostic messages. It does not affect the output of task commands themselves - use `--task-output` to control task subprocess output (see below).
1758
+
1759
+ ### Task Output Control
1760
+
1761
+ Task Tree provides fine-grained control over task subprocess output through the `--task-output` flag. This allows you to control whether tasks display their stdout, stderr, both, or neither, independent of Task Tree's own diagnostic logging.
1762
+
1763
+ **Output Modes:**
1764
+
1765
+ ```bash
1766
+ # Show both stdout and stderr (default)
1767
+ tt --task-output all build
1768
+ tt -O all build
1769
+ tt build # Same as above
1770
+
1771
+ # Show only stdout, suppress stderr
1772
+ tt --task-output out build
1773
+ tt -O out test
1774
+
1775
+ # Show only stderr, suppress stdout
1776
+ tt --task-output err build
1777
+ tt -O err deploy
1778
+
1779
+ # Show stderr only if the task fails (stdout always suppressed)
1780
+ tt --task-output on-err build
1781
+ tt -O on-err ci
1782
+
1783
+ # Suppress all task output
1784
+ tt --task-output none build
1785
+ tt -O none build
1786
+ ```
1787
+
1788
+ **Case Insensitive:**
1789
+
1790
+ ```bash
1791
+ tt --task-output ALL build # Works
1792
+ tt --task-output Out test # Works
1793
+ tt --task-output ON-ERR ci # Works
1794
+ ```
1795
+
1796
+ **Common Use Cases:**
1797
+
1798
+ **CI/CD Environments:**
1799
+ ```bash
1800
+ # Suppress task output, show only tasktree diagnostics
1801
+ tt --log-level info --task-output none build test
1802
+
1803
+ # Show errors only if they occur
1804
+ tt --log-level error --task-output on-err ci
1805
+ ```
1806
+
1807
+ **Debugging:**
1808
+ ```bash
1809
+ # Show only stderr to focus on warnings/errors
1810
+ tt --task-output err build
1811
+
1812
+ # Show everything for full visibility
1813
+ tt --log-level debug --task-output all build
1814
+ ```
1815
+
1816
+ **Clean Build Logs:**
1817
+ ```bash
1818
+ # Suppress noisy build output, show only tasktree progress
1819
+ tt --task-output none build package deploy
1820
+ ```
1821
+
1822
+ **Task-Level Configuration:**
1823
+
1824
+ Tasks can specify their own default output behavior in the recipe file:
1825
+
1826
+ ```yaml
1827
+ tasks:
1828
+ # Noisy task - suppress output by default
1829
+ install-deps:
1830
+ task_output: none
1831
+ cmd: npm install
1832
+
1833
+ # Let pytest manage its own output - it's already good at that
1834
+ test:
1835
+ cmd: pytest tests/
1836
+
1837
+ # Don't clutter CI logs with loads of output, unless something goes wrong
1838
+ build:
1839
+ task_output: on-err
1840
+ cmd: cargo build --release
1841
+ ```
1842
+
1843
+ **Understanding Output Modes:**
1844
+
1845
+ | Mode | Stdout | Stderr | Notes |
1846
+ |------|--------|--------|-------|
1847
+ | `all` | ✓ | ✓ | Default behavior, shows everything |
1848
+ | `out` | ✓ | ✗ | Good for capturing command results |
1849
+ | `err` | ✗ | ✓ | Focus on warnings and errors |
1850
+ | `on-err` | ✗ | ✓ (on failure) | Stderr buffered, shown only if task fails |
1851
+ | `none` | ✗ | ✗ | Silent execution, useful for noisy tasks |
1852
+
1853
+ **Override Behavior:**
1854
+
1855
+ - Command-line `--task-output` overrides task-level `task_output` settings for all tasks
1856
+ - Task-level `task_output` applies only if no command-line flag is provided
1857
+ - Default behavior is `all` if neither is specified
1858
+
1859
+ **Important Notes:**
1860
+
1861
+ - Task output control is independent of `--log-level` - you can suppress task output while still seeing tasktree diagnostics
1862
+ - The `on-err` mode buffers stderr in memory and only displays it if the task fails
1863
+ - Output suppression does not affect the task's execution - files are still created, commands still run
1864
+ - Task exit codes are always checked regardless of output mode
1865
+
1657
1866
  ## Example: Full Build Pipeline
1658
1867
 
1659
1868
  ```yaml
@@ -1665,6 +1874,7 @@ tasks:
1665
1874
  compile:
1666
1875
  desc: Build application binaries
1667
1876
  outputs: [target/release/app]
1877
+ task_output: "on-err" # We only care about seeing this if it fails.
1668
1878
  cmd: cargo build --release
1669
1879
 
1670
1880
  test-unit: