refactor: migrate all config paths to ~/.mytoolkit with MYTOOLKIT_HOME support

This commit is contained in:
Zhengshou Lai
2026-06-04 00:52:25 +08:00
parent 3a47e6963d
commit 2d2ff45fca
3 changed files with 10 additions and 6 deletions
+4 -4
View File
@@ -50,11 +50,11 @@ mytoolkit templates register /path/to/templates
mytoolkit templates list # lists each template with its absolute path
```
Registry is stored at `~/.config/mytoolkit/templates.json`.
Registry is stored at `~/.mytoolkit/templates.json` (or `$MYTOOLKIT_HOME/templates.json`).
## User config
All user-level config lives under `~/.config/mytoolkit/`:
All user-level config lives under `~/.mytoolkit/` (override with `$MYTOOLKIT_HOME`):
| File | Owner | Purpose |
|------|-------|---------|
@@ -74,7 +74,7 @@ mytoolkit env export # print MYCLI_FOO=... export statements
eval "$(mytoolkit env export)" # load into current shell
```
Legacy `bin/config.json` (in the source dir) is auto-migrated to `~/.config/mytoolkit/env.json` on first run after upgrade.
Legacy `bin/config.json` (in the source dir) is auto-migrated to `~/.mytoolkit/env.json` on first run after upgrade.
## Uninstall
@@ -84,4 +84,4 @@ mytoolkit uninstall
make uninstall
```
User config under `~/.config/mytoolkit/` is left in place.
User config under `~/.mytoolkit/` is left in place.