Files
flow/src/flow/commands/projects.py
Tomas Mirchev 6ea23e02df feat: add CLI entry point, command modules, and zsh completion
- 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>
2026-03-16 05:06:31 +02:00

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))