Skip to content

Conversation

@Akeoott
Copy link
Owner

@Akeoott Akeoott commented Jan 2, 2026

Merge dev into main

Summary

Refactored entire backend. Removed CLI project and made backend able to accept args for usage. Improved Documentation and part of the workflow.

Changes

Major Refactor

  • (Entire redo) Major refactor: CLI consolidation + config overhaul #12 by @Akeoott
    • Refactor core with logging, config system, and enhanced CLI
      • Remove separate cssync.Cli project and integrate CLI functionality directly into backend
      • Replace System.Text.Json with Newtonsoft.Json for flexible JObject-based configuration
      • Implement dynamic config sections (Variables, Timers) instead of rigid dictionaries
      • Add comprehensive argument parsing (--help, --status, --init) with categorized help system
      • Introduce config-aware execution loop that responds to runtime changes
      • Improve cross-platform terminal detection (Windows/Unix compatibility)
      • Update README, .editorconfig, and .gitignore to reflect new architecture
      • Add detailed configuration documentation via Resources.cs

Documentation and workflow

- add 'initializers' and 'resx'
Add some small changes to editorconfig, readme and vscode settings.
Mainly for improving workspace configuration and adding more detail to readme.
- Remove CLI project file entirely as backend now handles command parsing
- Remove cssync.Cli from .sln following this change
- Implement `HasTerminal()` with cross-platform TTY checks
- Add args support for `--help`, `--enable`, `--disable`, and `--force`
- Introduce `ParseInput` helper for handling CLI arguments
- Validate terminal requirements before running backend
- Provide help text and improved usage feedback
- reorganized shields for GitHub last commit, stars, and repo size
- clarified project description removing rclone-specific mention
- added a Structure section explaining separation of backend and GUI
- updated table to reflect backend logic handling and planned GUI interface
- simplified note about backend independence and GUI plans
…c enable/disable

- refactored ModifyConfig to use a helper for section/key validation
- consolidated type-specific logic for editing, appending, and removing values
- updated AppendKey and RemoveKey to support both Variables and Timers sections
- added EnableDisableCssync and GetCssyncStatus methods to manage cssync Run state
- updated ParseInput to support --status flag and properly enable/disable cssync
- removed unused ForceArgument logic and simplified terminal check in Main
- replace inline help text in ParseInput with Resources static strings
- introduce Resources.cs to store help, config, rclone and cssync messages
- update ParseInput to use central help resources and add --init flag
- rename ModifyConfig.GetCssyncStatus() to GetStatus() for consistency
- improve unknown flag handling and compatibility error messaging
- extend .editorconfig to format json and jsonc files with 2-space indents
- remove legacy cssyncOptions string and unused command scaffolding
- change RunCssync signature to no-arg Task to align with upcoming flow
- add status check to prevent running when disabled in config
- update Program.cs to reference new Cssync.RunCssync usage (currently commented)
- leave TODO for future Cssync execution logic
…plify ModifyConfig

- Added Newtonsoft.Json dependency for flexible JSON handling
- Replaced System.Text.Json with Newtonsoft.Json for serialization/deserialization
- Refactored Config class to use a single JObject "Sections" instead of separate Variables/Timers dictionaries
- Updated Json helper to handle reading, writing, and generating config using JObject
- Updated ModifyConfig to work with JObject for all CRUD operations on config keys and arrays
- Simplified Enable/Disable cssync logic and value editing logic
- Improved logging for array manipulations and key existence checks
- Removed redundant try/catch blocks where validation handles errors
- Updated GetStatus/GetConfigStatus and other methods to align with new JObject structure
- Refined HelpConfig text for clarity and conciseness
  - Simplified explanations of "Run", "Variables", and "Timers"
  - Updated examples and formatting for easier reading
  - Included guidance for rclone setup with links
- Added 'builds' folder to .gitignore to ignore local build artifacts
… config

- Cssync.RunCssync now monitors config and stops automatically if "Run" is false
- Introduced CancellationToken and background task loop (CssyncLoop)
- Added Json.Serialize helper for future use
refactor: consolidate CLI into backend and overhaul configuration system

- Remove separate cssync.Cli project and integrate CLI functionality directly into backend
- Replace System.Text.Json with Newtonsoft.Json for flexible JObject-based configuration
- Implement dynamic config sections (Variables, Timers) instead of rigid dictionaries
- Add comprehensive argument parsing (--help, --status, --init) with categorized help system
- Introduce config-aware execution loop that responds to runtime changes
- Improve cross-platform terminal detection (Windows/Unix compatibility)
- Update README, .editorconfig, and .gitignore to reflect new architecture
- Add detailed configuration documentation via Resources.cs

BREAKING CHANGE: Configuration format changed; existing configs must be regenerated
BREAKING CHANGE: CLI now accessed via backend executable with command-line arguments
- fix format to work with github
Improve pull request templates and separate them form dev to main and
branch to dev.
@Akeoott Akeoott self-assigned this Jan 2, 2026
@Akeoott Akeoott merged commit 7b7f410 into main Jan 2, 2026
4 checks passed
@Akeoott Akeoott deleted the dev branch January 11, 2026 20:09
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.

2 participants