Add multi-depository support with global config

- Implement global CLI config at ~/.config/jade/config.yml
- Add jade depo commands (add, list, remove, set-default)
- Support depository short names and context-aware detection
- Remove tag_prefix config, hardcode + syntax for consistency
- Update depository resolution: flag -> context -> default
- Auto-initialize .jade/ directory structure when adding depos
- Update documentation with new multi-depository workflow
This commit is contained in:
2026-01-03 16:25:23 +01:00
parent 0ebfaf835d
commit 1d87d93172
9 changed files with 515 additions and 158 deletions
+3 -3
View File
@@ -12,8 +12,8 @@ type JadeDepo struct {
Config *Config
}
func Init(cfgPath, depoPath string) (*JadeDepo, error) {
cfg, err := initConfig(cfgPath, depoPath)
func Init(depoInput string) (*JadeDepo, error) {
cfg, err := initConfig(depoInput)
if err != nil {
return nil, fmt.Errorf("failed to initialize config: %w", err)
}
@@ -22,7 +22,7 @@ func Init(cfgPath, depoPath string) (*JadeDepo, error) {
Config: cfg,
}
// Initialize depository structure
// Initialize depository structure (already done in initConfig, but ensure it's complete)
if err := jd.initDepoStructure(); err != nil {
return nil, fmt.Errorf("failed to initialize depository structure: %w", err)
}