- Refactored CLI commands from nested Typer subapps to direct command functions - Fixed main.py to use app.command() instead of app.add_typer_command() - Fixed project_service.py to properly load projects from YAML - Fixed file_storage.py to save session JSON files alongside markdown - Added missing methods: write_file, read_file, extract_autogen_section, get_recent_sessions - Fixed root_path and repo_path to use strings instead of Path objects
43 lines
873 B
Python
43 lines
873 B
Python
"""Main CLI entry point."""
|
|
|
|
import typer
|
|
|
|
from tracker.cli.commands import (
|
|
init_project,
|
|
list_projects_cmd,
|
|
show_project,
|
|
start_session,
|
|
add_note_cmd,
|
|
stop_session,
|
|
add_change,
|
|
suggest_next,
|
|
review,
|
|
)
|
|
|
|
app = typer.Typer(
|
|
name="tracker",
|
|
help="Personal Project Tracker CLI - Track your projects with Markdown and YAML",
|
|
)
|
|
|
|
|
|
# Register all commands
|
|
app.command("init-project")(init_project)
|
|
app.command("list")(list_projects_cmd)
|
|
app.command("show")(show_project)
|
|
app.command("start")(start_session)
|
|
app.command("note")(add_note_cmd)
|
|
app.command("stop")(stop_session)
|
|
app.command("change")(add_change)
|
|
app.command("next")(suggest_next)
|
|
app.command("review")(review)
|
|
|
|
|
|
@app.callback()
|
|
def callback():
|
|
"""Personal Project Tracker - Track your projects locally with Markdown."""
|
|
pass
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app()
|