Implement Jade CLI v1.0 MVP
Complete implementation of note management CLI with all core features: Commands: - add: Create new notes in $EDITOR with auto-generated filenames - list: Display all notes with titles, paths, and tags - search: Full-text search via ripgrep, tag-based filtering - tags: List all tags with occurrence counts - edit: Fuzzy search and edit notes by title - rm: Move notes to trash with confirmation prompt Features: - Automatic depository structure initialization (.jade/trash/) - Configurable tag prefix (default '+') - Parse title from first # heading (filename fallback) - Extract tags anywhere in content - Parse both [[wiki-links]] and [markdown](links) - Trash system with timestamps to prevent conflicts Technical: - Global config at ~/.config/jade/config.yml - Per-depository settings support - Ripgrep integration for fast search - $EDITOR integration for note editing - Comprehensive README with usage examples
This commit is contained in:
@@ -13,6 +13,8 @@ type Config struct {
|
||||
DepoPath string `mapstructure:"depo_path"`
|
||||
// ConfigPath is the path to the config directory. Default ~/.config/jade/config.yml
|
||||
ConfigPath string `mapstructure:"config_path"`
|
||||
// TagPrefix is the prefix used for tags in notes. Default "+"
|
||||
TagPrefix string `mapstructure:"tag_prefix"`
|
||||
}
|
||||
|
||||
// getDefaultDepoPath returns the default depository path
|
||||
@@ -43,6 +45,7 @@ func initConfig(cfgPath, depoPath string) (*Config, error) {
|
||||
// Set defaults
|
||||
viper.SetDefault("depo_path", getDefaultDepoPath())
|
||||
viper.SetDefault("config_path", getDefaultConfigPath())
|
||||
viper.SetDefault("tag_prefix", "+")
|
||||
|
||||
// Determine config file location
|
||||
configDir := cfgPath
|
||||
|
||||
Reference in New Issue
Block a user