Skip to content

consolidate: unify all config/data paths to ~/.codecora/cora-code/ #511

Description

@ajianaz

Problem

cora-code currently scatters data across 3+ locations:

Data Current Path Source
Config + Auth ~/.cora/ config/loader.rs::cora_dir()
Review cache ~/.cache/cora/reviews/ engine/cache.rs::cache_dir()
Graph DB + update cache ~/.codecora/cora-code/ data_dir.rs::cora_data_dir()

This is confusing for users (where is my config?), complicates backups, and fragments the data directory structure.

Proposed Solution

Consolidate all paths to ~/.codecora/cora-code/:

~/.codecora/cora-code/
├── config.yaml        (was ~/.cora/config.yaml)
├── auth.toml          (was ~/.cora/auth.toml)
├── cora.db            (already here ✅)
├── update-cache.json  (already here ✅)
└── cache/
    └── reviews/       (was ~/.cache/cora/reviews/)

Note: .cora/history/ remains project-local (per-repo, not global).

Migration

Auto-migrate old paths on first run:

  1. Check if ~/.cora/config.yaml exists and new path doesn't → copy
  2. Check if ~/.cora/auth.toml exists and new path doesn't → copy
  3. Check if ~/.cache/cora/reviews/ exists → move to new path
  4. Print info log: "Migrated config from ~/.cora/ to ~/.codecora/cora-code/"
  5. Do NOT delete old files (user can clean up manually)

Scope

  • Update cora_dir() in loader.rs → use data_dir::cora_data_dir()
  • Update cache_dir() in cache.rs → use data_dir::cora_data_dir().join("cache/reviews")
  • Add migration logic in loader.rs
  • Update all user-facing strings ("/.cora/" → "/.codecora/cora-code/")
  • Update docs/README references

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions