- CLI with context detection, config merging, VM blocking - Command modules: dotfiles, packages, setup, remote, dev, projects - Zsh completion with declarative command/subcommand/flag structure Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
679 B
Python
25 lines
679 B
Python
"""Projects commands."""
|
|
|
|
from flow.core.config import FlowContext
|
|
from flow.services.projects import ProjectService
|
|
|
|
|
|
def register(subparsers):
|
|
p = subparsers.add_parser("projects", help="Manage git projects")
|
|
sub = p.add_subparsers(dest="projects_action")
|
|
|
|
check = sub.add_parser("check", help="Check project status")
|
|
check.add_argument("--fetch", "-f", action="store_true", help="Fetch remotes first")
|
|
check.set_defaults(handler=_check)
|
|
|
|
p.set_defaults(handler=_default)
|
|
|
|
|
|
def _default(ctx: FlowContext, args):
|
|
_check(ctx, args)
|
|
|
|
|
|
def _check(ctx: FlowContext, args):
|
|
svc = ProjectService(ctx)
|
|
svc.check(fetch=getattr(args, "fetch", False))
|