feat(cli): add initial repository management commands

- Introduce CLI using Typer for repository management
- Add commands for archiving, cleaning, moving, reviewing, and status
- Implement configuration loading and default structure setup
- Include utilities for Git status checks and directory size calculation
- Lay groundwork for extensible repository operations

Signed-off-by: Max P. <Mail@MPassarello.de>
This commit is contained in:
2025-04-30 12:01:34 +02:00
parent d1e246c868
commit ef2bac4e88
12 changed files with 702 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
from pydantic import BaseModel, Field
from pathlib import Path
from typing import List, Optional
class RepoCategory(BaseModel):
name: str
subdir: str
days: Optional[int] = Field(default=None, ge=1)
volatile: bool = False
description: Optional[str] = None
is_archive: bool = False
class RepoCatDefaults(BaseModel):
dry_run: bool = True
auto_create_directories: bool = True
class RepoCatConfig(BaseModel):
base_dir: Path = Field(default=Path("~/Repositories").expanduser())
categories: List[RepoCategory]
defaults: Optional[RepoCatDefaults] = RepoCatDefaults()