Download taskweaver/cli/cli.py from TRaw/tskwvr: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/spaces/TRaw/tskwvr/resolve/main/taskweaver/cli/cli.py
- Command line
-
hf download hf://spaces/TRaw/tskwvr/taskweaver/cli/cli.py
-
curl -L -o cli.py https://huggingface.co/spaces/TRaw/tskwvr/resolve/main/taskweaver/cli/cli.py
1.09 kB
| import click | |
| from ..app import TaskWeaverApp | |
| from .chat import chat | |
| from .init import init | |
| from .util import CliContext, get_ascii_banner | |
| from .web import web | |
| def taskweaver(ctx: click.Context, project: str): | |
| workspace_base, is_valid, is_empty = TaskWeaverApp.discover_app_dir(project) | |
| # subcommand_target = ctx.invoked_subcommand if ctx.invoked_subcommand is not None else "chat" | |
| ctx.obj = CliContext( | |
| workspace=workspace_base, | |
| workspace_param=project, | |
| is_workspace_valid=is_valid, | |
| is_workspace_empty=is_empty, | |
| ) | |
| if not ctx.invoked_subcommand: | |
| ctx.invoke(chat) | |
| return | |