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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user