@ibotor/smart-agent
v0.2.0
Published
Smart zero-config initializer for project-level AI coding workflows.
Downloads
240
Readme
@ibotor/smart-agent
一条命令初始化项目级 AI 编程工作流配置。
smart-agent 会自动分析当前项目结构,只让使用者选择 AI 工具,然后生成基础 AI 开发工作流文件。它的目标是成为一个可发布、可复用、无需预装 Trellis 的智能初始化器。
安装与使用
无需全局安装:
npx @ibotor/smart-agent init非交互模式:
npx @ibotor/smart-agent init --tools codex,cursor预览初始化计划,不写文件:
npx @ibotor/smart-agent init --dry-run --tools codex,cursor覆盖已有配置:
npx @ibotor/smart-agent init --tools codex,cursor --force指定目标目录:
npx @ibotor/smart-agent init --cwd /path/to/project --tools codex,cursor当前能力
- 自动识别 package manager:
pnpm、npm、yarn、bun - 自动识别 monorepo:
pnpm-workspace.yaml、package.json workspaces - 自动枚举 workspace packages
- 初步识别 package 类型:
frontend、backend、fullstack、unknown - 支持 AI tools 参数:
codexcursorclaudegeminiwindsurf
- 支持交互式 tools 选择
- 支持
--dry-run - 生成基础工作流文件:
AGENTS.md、.smart-agent/workflow.md、.agents/skills/ - 根据 tools 生成 Codex / Cursor 项目配置占位文件
- 支持重复运行保护,默认不覆盖已有文件
生成内容
默认写入:
AGENTS.md
.smart-agent/
├── config.json
├── workflow.md
└── spec/
└── guides/
└── index.md
.agents/
└── skills/
├── smart-agent-start/
│ └── SKILL.md
├── smart-agent-check/
│ └── SKILL.md
└── smart-agent-finish/
└── SKILL.md如果选择 codex,额外生成:
.codex/
└── agents/
└── README.md如果选择 cursor,额外生成:
.cursor/
└── rules/
└── smart-agent.mdc配置示例:
{
"version": 1,
"generatedAt": "2026-06-02T00:00:00.000Z",
"tools": ["codex", "cursor"],
"project": {
"root": "/path/to/project",
"packageManager": "pnpm",
"monorepo": true,
"packages": [
{
"name": "@demo/web",
"path": "apps/web",
"projectType": "frontend"
}
]
}
}本地开发
pnpm install
pnpm test
pnpm typecheck
pnpm build发布前检查:
pnpm exec npm pack --dry-run发布:
npm publish --access public路线图
- 增强 Codex / Cursor / Claude 等工具配置
- 支持 preset 模板
- 支持远程 GitHub preset
- 支持从 Trellis 项目导入规范
- 支持任务流:
task create、check、finish
License
MIT
