← Back to list
1. File System (
2. Interactive Menu (
3. Argument Parser (
4. Core (

r2mo-rad-lain
by silentbalanceyh
Momo SDD - Spec Driven Development
⭐ 0🍴 1📅 Jan 24, 2026
SKILL.md
name: r2mo-rad-lain description: R2MO RAD CLI Dev Skill (Lain Native) version: 3.0.0 tags: [r2mo, rad, lain, nodejs, cli, momo] repository: https://gitee.com/silentbalanceyh/r2mo-lain.git
Role: R2MO RAD Expert (Lain Project)
🚨 Critical Rules
- Stack: CommonJS (
require). NO ESM. - Core Libs:
- Use
const Ec = require('../epic');for logging/flow. - Use
const Utils = require('../utils/momo-*');for helpers.
- Use
- Interactive: MUST use
require('../utils/momo-menu'). NO raw readline. - Style: Use
Ecfor all logging.
📂 Architecture
- Config:
src/commander/{cmd}.json - Executor:
src/executor/execute{Cmd}.js - Utils:
src/utils/(momo-fs, momo-menu, momo-args)
📝 Config Schema (JSON)
{
"executor": "executeName", "command": "name", "description": "desc",
"options": [{ "name": "arg", "alias": "a", "type": "string" }]
}
💻 Executor Template(Native)
const Ec = require('../epic');
const Args = require('../utils/momo-args');
const FS = require('../utils/momo-fs');
const { selectSingle } = require('../utils/momo-menu');
module.exports = async (options) => {
try {
// 1. Parsing
const opts = Args.parseStandard(options);
const target = Args.parsePositional()[0];
// 2. Logic
Ec.waiting('Working...');
if (!FS.exists(target)) Ec.error('Path not found');
// 3. Menu Example
const item = await selectSingle([{name: 'Go'}], 'Title');
if(!item) process.exit(0);
// 4. Finish
Ec.info('✅ Done');
process.exit(0);
} catch (e) { Ec.error(e.message); process.exit(1); }
};
📚 API Reference (Project Context)
1. File System ( momo-fs.js )
Combines file-utils and yaml-parser.
const FS = require('../utils/momo-fs');
// Methods:
ensureDir(path), exists(path), readJson(path), writeJson(path, data)
copyDir(src, dest), scanDir(dir, filterFn?), createTempDir(prefix?)
cleanup(path), gitClone(url, dest)
parseFile(path) // YAML Frontmatter
2. Interactive Menu ( momo-menu.js )
const { selectMultiple, selectSingle, clearScreen } = require('../utils/momo-menu');
// selectMultiple returns { indices: [], items: [] }
// selectSingle returns Item | null
3. Argument Parser ( momo-args.js )
const Args = require('../utils/momo-args');
// Methods:
parseStandard(options) // Standard KV
parseOptional(flag, alias)
parseBool(flag, alias)
parsePositional()
4. Core (../epic)
Ec.info/warn/error/waiting(msg)
await Ec.ask(query) (Use only AFTER menu closes)
String colors: .green, .blue, .bold, etc.
Score
Total Score
65/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon
