feat: initial commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
noma 统一入口脚本(无须 `cd`)
|
||||
|
||||
用法示例:
|
||||
python "<SCRIPTS_DIR>/noma.py" preflight
|
||||
python "<SCRIPTS_DIR>/noma.py" where
|
||||
python "<SCRIPTS_DIR>/noma.py" index stats
|
||||
|
||||
说明:
|
||||
- 该脚本仅负责把 `.claude/scripts` 加入 sys.path,然后转发到 `data_modules.noma`。
|
||||
- 适配 skills/agents 在项目级或用户级(~/.claude)安装时的调用方式。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from runtime_compat import enable_windows_utf8_stdio
|
||||
|
||||
|
||||
def main() -> None:
|
||||
scripts_dir = Path(__file__).resolve().parent
|
||||
sys.path.insert(0, str(scripts_dir))
|
||||
|
||||
# 延迟导入,避免 sys.path 未就绪
|
||||
from data_modules.noma import main as _main
|
||||
|
||||
_main()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
enable_windows_utf8_stdio(skip_in_pytest=True)
|
||||
main()
|
||||
Reference in New Issue
Block a user