Files
add-todo-all/scripts/main.py
2026-09-09 10:29:02 +08:00

37 lines
1.1 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""待办事项 CLI 入口。
分层:cli(argv)→ service(业务编排)→ db(持久化)→ util(通用工具)。
独立运行说明:
真实技能依赖宿主共享 Python runtime 的 ``jiangchang_skill_core``。
本 demo 自带一份最小 mock(``scripts/_mock_platform/``),在没有宿主时
由本文件自动注入 sys.path,使 demo 在任意 Python 3.10+ 环境可直接跑通。
设置环境变量 ``JIANGCHANG_DATA_ROOT`` 即可切到真实平台 runtime 模式。
"""
import os
import sys
from jiangchang_skill_core.runtime_env import apply_cli_local_defaults
import logging
from util.logging_config import setup_skill_logging, get_skill_logger
logger = logging.getLogger(__name__)
apply_cli_local_defaults()
from util.config_bootstrap import bootstrap_skill_config # noqa: E402
bootstrap_skill_config()
setup_skill_logging("add-todo-all", __name__)
from cli.app import main # noqa: E402
if __name__ == "__main__":
get_skill_logger().info("Hello, world!")
raise SystemExit(main())