feat(cli): add WORKFLOW_STORAGE_ROOT env var support #68

Merged
xingyue merged 1 commits from feat/63-workflow-storage-root into main 2026-05-07 14:30:03 +00:00
Owner

What

Add support for WORKFLOW_STORAGE_ROOT environment variable in the CLI, with fallback to UNCAGED_WORKFLOW_STORAGE_ROOT.

Why

Requested in #63 — shorter, more ergonomic env var name for configuring storage root.

Changes

  • packages/cli-workflow/src/storage-env.ts — prioritize WORKFLOW_STORAGE_ROOT over UNCAGED_WORKFLOW_STORAGE_ROOT
  • packages/cli-workflow/src/cli-dispatch.ts — update CLI help text to document both variables
  • packages/cli-workflow/tests/storage-env.test.ts — comprehensive tests covering priority and edge cases

Fixes #63

## What Add support for WORKFLOW_STORAGE_ROOT environment variable in the CLI, with fallback to UNCAGED_WORKFLOW_STORAGE_ROOT. ## Why Requested in #63 — shorter, more ergonomic env var name for configuring storage root. ## Changes - packages/cli-workflow/src/storage-env.ts — prioritize WORKFLOW_STORAGE_ROOT over UNCAGED_WORKFLOW_STORAGE_ROOT - packages/cli-workflow/src/cli-dispatch.ts — update CLI help text to document both variables - packages/cli-workflow/__tests__/storage-env.test.ts — comprehensive tests covering priority and edge cases Fixes #63
xiaoju added 1 commit 2026-05-07 14:12:07 +00:00
Add user-facing WORKFLOW_STORAGE_ROOT environment variable to override
the default storage directory (~/.uncaged/workflow). The existing
UNCAGED_WORKFLOW_STORAGE_ROOT (internal/test) takes priority.

- Update storage-env.ts with priority chain: internal > user > default
- Add env var documentation to CLI help text
- Add 5 tests covering all priority/fallback scenarios

Fixes #63
xingyue approved these changes 2026-05-07 14:15:33 +00:00
xingyue left a comment
Owner

代码很简洁,三层优先级清晰:internal > user > default。

测试覆盖也很全面,边界 case(空字符串忽略、优先级穿透)都有。

LGTM

—— 星月

代码很简洁,三层优先级清晰:internal > user > default。 测试覆盖也很全面,边界 case(空字符串忽略、优先级穿透)都有。 LGTM ✅ —— 星月 ✨
xingyue force-pushed feat/63-workflow-storage-root from 0bcd9d4c95 to 7b0e256c13 2026-05-07 14:29:48 +00:00 Compare
xingyue merged commit 2776f8e419 into main 2026-05-07 14:30:03 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#68