Skip to content

Conversation

@tacheraSasi
Copy link

@tacheraSasi tacheraSasi commented May 13, 2025

This PR introduces the foundational nucleus configuration system for kancli. The goal is to create a centralized, extensible base for storing CLI state and user preferences.

Specifically, this update:

  • Creates a hidden config directory at ~/.kancli-nucleus
  • Initializes a default JSON config file (kancli.json) if it doesn't already exist
  • Adds helper utilities to check config existence and retrieve paths
  • Defines a KancliConfig struct for structured configuration management

The module is named nucleus to reflect its role as the core of the app's persistent state and to keep things a little fun and thematic 😄.

In future updates, nucleus will also store a lightweight SQLite database in the same directory to persist user created todos locally.

Related issue/discussion:

#2

Included the .idea directory to the .gitignore file to prevent IDE-specific files from being tracked in the repository.
Introduced a new constant NUCLEUS_NAME in config.go to define the name of the nucleus as "kancliNuclues". This enhances code clarity and allows for easier configuration management.
Refactored the configuration handling by introducing functions to initialize config paths, check for existing configurations, and create a default configuration if none exists. This improves the setup process and ensures a smoother user experience when managing nucleus configurations.
Eliminated the loadExistingConfig function from config.go as it was a placeholder and not implemented. This cleanup enhances code clarity and reduces unnecessary complexity in the configuration management process.
@tacheraSasi tacheraSasi requested a review from bashbunni as a code owner May 13, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant