Skip to content

feat(config): support relocatable Config.ini via bootstrap pointer file #112

Description

@ndomako10

Summary

The launchers currently hardcode the config file location to Config\Config.ini relative to the repo root. For users who want their config outside the repo directory (e.g. shared network location, separate backup, or multi-machine setup), there is no supported way to relocate it.

Proposed design

A two-level bootstrap:

  1. A pointer file at a fixed, known location (e.g. Config\config.ptr) containing a single line: the absolute path to the user's real Config.ini.
  2. Launchers read the pointer first; if absent, fall back to the current default (Config\Config.ini). Existing behaviour is unchanged for users who do not need relocation.
Config\config.ptr (gitignored, optional)
  └──> C:\Users\You\Documents\SyncReceipts\Config.ini

config.ptr would be gitignored alongside Config.ini. Initialize-SyncReceipts.ps1 would optionally prompt for a custom config path and create config.ptr if the user wants it elsewhere.

Alternatives considered

  • Environment variable (SYNC_RECEIPTS_CONFIG): conventional for CLI tools but requires the user to manage env vars -- friction for non-technical users.
  • Command-line param on launchers: explicit but requires editing shortcuts.
  • Current design: works for the common case. RECEIPTS_ROOT and WORKBOOKS_ROOT already allow data files to live anywhere; only Config.ini itself is fixed to the repo.

Scope

  • Launchers\*.bat -- read pointer file before falling back to default
  • Scripts\Initialize-SyncReceipts.ps1 -- optionally prompt for custom config path and write config.ptr
  • .gitignore -- add Config\config.ptr
  • Config\ -- add config.ptr.example or document in README
  • ADR -- decision warrants a record (pointer file vs env var)

Notes

  • This is additive and non-breaking; default behaviour is unchanged
  • Low priority: the current design covers the common case well. Data files already support relocation via RECEIPTS_ROOT/WORKBOOKS_ROOT. Config relocation is only needed for advanced multi-machine or security-isolation scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    configConfig, .vscode, launcher changesenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions