Problem#
Currently, all T3 Code data is hardcoded to ~/.t3 with no way to configure a different base location:
| Path | Override? |
|---|
~/.t3/userdata/ (state) | Yes T3CODE_STATE_DIR |
~/.t3/dev/ (dev state) | Yes --state-dir |
~/.t3/worktrees/ | No (hardcoded) |
Users who want to store T3 Code data in a different location (e.g., ~/.config/t3, encrypted volumes, network drives, or XDG-compliant paths) currently have no single config to control this.
Proposal#
Add a T3CODE_BASE_DIR environment variable that serves as the root for all T3 Code paths:
T3CODE_BASE_DIR (default: ~/.t3)
├── userdata/ ← state (T3CODE_STATE_DIR takes precedence)
├── dev/ ← dev state
└── worktrees/ ← git worktrees
Behavior#
- Default:
~/.t3 (no breaking change)
- Override:
T3CODE_BASE_DIR=~/.config/t3 moves everything
- Backwards compat:
T3CODE_STATE_DIR still takes precedence for state directory
- CLI flag:
--base-dir for dev-runner and server
Happy to implement if approved :)