Implement complete CLI commands for MVP-1 Personal Tracker
- 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
This commit is contained in:
@@ -4,7 +4,7 @@ import typer
|
||||
|
||||
from tracker.cli.commands import (
|
||||
init_project,
|
||||
list_projects,
|
||||
list_projects_cmd,
|
||||
show_project,
|
||||
start_session,
|
||||
add_note_cmd,
|
||||
@@ -20,16 +20,16 @@ app = typer.Typer(
|
||||
)
|
||||
|
||||
|
||||
# Register all subcommands
|
||||
app.add_typer_command(init_project, name="init-project")
|
||||
app.add_typer_command(list_projects, name="list")
|
||||
app.add_typer_command(show_project, name="show")
|
||||
app.add_typer_command(start_session, name="start")
|
||||
app.add_typer_command(add_note_cmd, name="note")
|
||||
app.add_typer_command(stop_session, name="stop")
|
||||
app.add_typer_command(add_change, name="change")
|
||||
app.add_typer_command(suggest_next, name="next")
|
||||
app.add_typer_command(review, name="review")
|
||||
# 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()
|
||||
|
||||
Reference in New Issue
Block a user