clikit-plugin 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +46 -0
- package/README.md +282 -0
- package/command/commit.md +137 -0
- package/command/create.md +150 -0
- package/command/debug.md +185 -0
- package/command/design.md +82 -0
- package/command/handoff.md +95 -0
- package/command/import-plan.md +175 -0
- package/command/init.md +112 -0
- package/command/issue.md +110 -0
- package/command/plan.md +205 -0
- package/command/pr.md +174 -0
- package/command/research.md +103 -0
- package/command/resume.md +80 -0
- package/command/review-codebase.md +228 -0
- package/command/review.md +135 -0
- package/command/ship.md +109 -0
- package/command/start.md +77 -0
- package/command/status.md +123 -0
- package/command/verify.md +79 -0
- package/command/vision.md +142 -0
- package/dist/agents/index.d.ts +4 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +103 -0
- package/dist/clikit.schema.json +423 -0
- package/dist/commands/index.d.ts +4 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/config.d.ts +118 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/hooks/auto-format.d.ts +30 -0
- package/dist/hooks/auto-format.d.ts.map +1 -0
- package/dist/hooks/comment-checker.d.ts +17 -0
- package/dist/hooks/comment-checker.d.ts.map +1 -0
- package/dist/hooks/compaction.d.ts +60 -0
- package/dist/hooks/compaction.d.ts.map +1 -0
- package/dist/hooks/empty-message-sanitizer.d.ts +9 -0
- package/dist/hooks/empty-message-sanitizer.d.ts.map +1 -0
- package/dist/hooks/env-context.d.ts +43 -0
- package/dist/hooks/env-context.d.ts.map +1 -0
- package/dist/hooks/git-guard.d.ts +14 -0
- package/dist/hooks/git-guard.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +35 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/ritual-enforcer.d.ts +29 -0
- package/dist/hooks/ritual-enforcer.d.ts.map +1 -0
- package/dist/hooks/security-check.d.ts +20 -0
- package/dist/hooks/security-check.d.ts.map +1 -0
- package/dist/hooks/session-notification.d.ts +23 -0
- package/dist/hooks/session-notification.d.ts.map +1 -0
- package/dist/hooks/subagent-question-blocker.d.ts +11 -0
- package/dist/hooks/subagent-question-blocker.d.ts.map +1 -0
- package/dist/hooks/swarm-enforcer.d.ts +31 -0
- package/dist/hooks/swarm-enforcer.d.ts.map +1 -0
- package/dist/hooks/todo-enforcer.d.ts +19 -0
- package/dist/hooks/todo-enforcer.d.ts.map +1 -0
- package/dist/hooks/truncator.d.ts +28 -0
- package/dist/hooks/truncator.d.ts.map +1 -0
- package/dist/hooks/typecheck-gate.d.ts +31 -0
- package/dist/hooks/typecheck-gate.d.ts.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5785 -0
- package/dist/skills/index.d.ts +9 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/tools/beads-memory-sync.d.ts +17 -0
- package/dist/tools/beads-memory-sync.d.ts.map +1 -0
- package/dist/tools/context-summary.d.ts +21 -0
- package/dist/tools/context-summary.d.ts.map +1 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/memory.d.ts +56 -0
- package/dist/tools/memory.d.ts.map +1 -0
- package/dist/tools/observation.d.ts +28 -0
- package/dist/tools/observation.d.ts.map +1 -0
- package/dist/tools/quick-research.d.ts +16 -0
- package/dist/tools/quick-research.d.ts.map +1 -0
- package/dist/tools/swarm.d.ts +57 -0
- package/dist/tools/swarm.d.ts.map +1 -0
- package/dist/types.d.ts +32 -0
- package/dist/types.d.ts.map +1 -0
- package/memory/_templates/handoff.md +114 -0
- package/memory/_templates/plan.md +135 -0
- package/memory/_templates/prd.md +147 -0
- package/memory/_templates/research.md +108 -0
- package/memory/_templates/review.md +117 -0
- package/memory/_templates/spec.md +116 -0
- package/memory/beads/.gitkeep +0 -0
- package/memory/handoffs/.gitkeep +0 -0
- package/memory/plans/.gitkeep +0 -0
- package/memory/prds/.gitkeep +0 -0
- package/memory/research/.gitkeep +0 -0
- package/memory/reviews/.gitkeep +0 -0
- package/memory/specs/.gitkeep +0 -0
- package/package.json +64 -0
- package/skill/accessibility-audit/SKILL.md +115 -0
- package/skill/beads/SKILL.md +56 -0
- package/skill/beads-bridge/SKILL.md +45 -0
- package/skill/brainstorming/SKILL.md +41 -0
- package/skill/chrome-devtools/SKILL.md +36 -0
- package/skill/cloudflare/SKILL.md +96 -0
- package/skill/condition-based-waiting/SKILL.md +92 -0
- package/skill/deep-research/SKILL.md +130 -0
- package/skill/defense-in-depth/SKILL.md +89 -0
- package/skill/design-system-audit/SKILL.md +136 -0
- package/skill/development-lifecycle/SKILL.md +58 -0
- package/skill/dispatching-parallel-agents/SKILL.md +94 -0
- package/skill/executing-plans/SKILL.md +54 -0
- package/skill/figma/SKILL.md +34 -0
- package/skill/finishing-a-development-branch/SKILL.md +127 -0
- package/skill/frontend-aesthetics/SKILL.md +63 -0
- package/skill/gemini-large-context/SKILL.md +80 -0
- package/skill/mockup-to-code/SKILL.md +98 -0
- package/skill/mqdh/SKILL.md +54 -0
- package/skill/notebooklm/SKILL.md +71 -0
- package/skill/playwright/SKILL.md +37 -0
- package/skill/playwriter/SKILL.md +56 -0
- package/skill/polar/SKILL.md +39 -0
- package/skill/receiving-code-review/SKILL.md +47 -0
- package/skill/requesting-code-review/SKILL.md +47 -0
- package/skill/resend/SKILL.md +85 -0
- package/skill/ritual-workflow/SKILL.md +101 -0
- package/skill/root-cause-tracing/SKILL.md +73 -0
- package/skill/session-management/SKILL.md +53 -0
- package/skill/sharing-skills/SKILL.md +50 -0
- package/skill/source-code-research/SKILL.md +138 -0
- package/skill/subagent-driven-development/SKILL.md +69 -0
- package/skill/supabase/SKILL.md +80 -0
- package/skill/supabase-postgres-best-practices/SKILL.md +168 -0
- package/skill/swarm-coordination/SKILL.md +54 -0
- package/skill/systematic-debugging/SKILL.md +58 -0
- package/skill/test-driven-development/SKILL.md +53 -0
- package/skill/testing-anti-patterns/SKILL.md +100 -0
- package/skill/testing-skills-with-subagents/SKILL.md +102 -0
- package/skill/ui-ux-research/SKILL.md +93 -0
- package/skill/using-git-worktrees/SKILL.md +129 -0
- package/skill/v0/SKILL.md +67 -0
- package/skill/v1-run/SKILL.md +85 -0
- package/skill/vercel-react-best-practices/SKILL.md +174 -0
- package/skill/verification-before-completion/SKILL.md +55 -0
- package/skill/visual-analysis/SKILL.md +113 -0
- package/skill/writing-plans/SKILL.md +55 -0
- package/skill/writing-skills/SKILL.md +68 -0
- package/src/agents/AGENTS.md +46 -0
- package/src/agents/build.md +170 -0
- package/src/agents/explore.md +113 -0
- package/src/agents/general.md +92 -0
- package/src/agents/index.ts +64 -0
- package/src/agents/librarian.md +116 -0
- package/src/agents/looker.md +107 -0
- package/src/agents/oracle.md +138 -0
- package/src/agents/plan.md +78 -0
- package/src/agents/review.md +98 -0
- package/src/agents/scout.md +84 -0
- package/src/agents/vision.md +159 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run full verification suite. Typecheck, tests, lint, build.
|
|
3
|
+
agent: build
|
|
4
|
+
subtask: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the **Build Agent**. Execute the `/verify` command.
|
|
8
|
+
|
|
9
|
+
## Your Task
|
|
10
|
+
|
|
11
|
+
Run the full verification suite and report results.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
### 1. Detect Project Tools
|
|
16
|
+
|
|
17
|
+
Check which tools are available:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Check package manager
|
|
21
|
+
ls package.json && cat package.json | head -5
|
|
22
|
+
ls bun.lockb && echo "bun" || ls pnpm-lock.yaml && echo "pnpm" || ls yarn.lock && echo "yarn" || echo "npm"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Read `package.json` scripts to determine available commands.
|
|
26
|
+
|
|
27
|
+
### 2. Run Verification Gates
|
|
28
|
+
|
|
29
|
+
Execute in order, collecting results:
|
|
30
|
+
|
|
31
|
+
| Gate | Commands (try in order) | Required |
|
|
32
|
+
|------|------------------------|----------|
|
|
33
|
+
| **Typecheck** | `pnpm typecheck`, `npm run typecheck`, `tsc --noEmit` | Yes |
|
|
34
|
+
| **Tests** | `pnpm test`, `npm test`, `bun test` | Yes |
|
|
35
|
+
| **Lint** | `pnpm lint`, `npm run lint`, `eslint .` | Yes |
|
|
36
|
+
| **Build** | `pnpm build`, `npm run build`, `bun run build` | Yes |
|
|
37
|
+
|
|
38
|
+
Run each gate. If a gate fails, continue to the next but record the failure.
|
|
39
|
+
|
|
40
|
+
### 3. Report Results
|
|
41
|
+
|
|
42
|
+
Format results clearly:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
## Verification Report
|
|
46
|
+
|
|
47
|
+
| Gate | Status | Details |
|
|
48
|
+
|------------|--------|------------------|
|
|
49
|
+
| Typecheck | ✅/❌ | [error count] |
|
|
50
|
+
| Tests | ✅/❌ | [pass/fail/skip] |
|
|
51
|
+
| Lint | ✅/❌ | [warning/error] |
|
|
52
|
+
| Build | ✅/❌ | [output] |
|
|
53
|
+
|
|
54
|
+
### Overall: PASS / FAIL
|
|
55
|
+
|
|
56
|
+
### Failures (if any)
|
|
57
|
+
[Detailed error output for each failing gate]
|
|
58
|
+
|
|
59
|
+
### Recommended Fixes
|
|
60
|
+
1. [Fix suggestion]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 4. Fix Mode (Optional)
|
|
64
|
+
|
|
65
|
+
If the user asks to fix issues:
|
|
66
|
+
- Fix typecheck errors first (most foundational)
|
|
67
|
+
- Then lint errors
|
|
68
|
+
- Then test failures
|
|
69
|
+
- Re-run verification after fixes
|
|
70
|
+
|
|
71
|
+
## Rules
|
|
72
|
+
|
|
73
|
+
- ✅ ALWAYS run all 4 gates even if one fails
|
|
74
|
+
- ✅ ALWAYS report detailed error output
|
|
75
|
+
- ✅ ALWAYS suggest fixes for failures
|
|
76
|
+
- ❌ NEVER auto-fix without user confirmation
|
|
77
|
+
- ❌ NEVER report passing if any gate fails
|
|
78
|
+
|
|
79
|
+
Now, running verification...
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review UI implementation for design quality, accessibility, and responsiveness.
|
|
3
|
+
agent: vision
|
|
4
|
+
subtask: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the **Vision Agent**. Execute the `/vision` command.
|
|
8
|
+
|
|
9
|
+
## Your Task
|
|
10
|
+
|
|
11
|
+
Review the UI implementation for design quality, accessibility, responsiveness, and visual consistency.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
### 1. Gather Context
|
|
16
|
+
|
|
17
|
+
- Identify changed/target UI files (components, styles, layouts)
|
|
18
|
+
- Load spec.md if it has UI requirements
|
|
19
|
+
- Check existing design system, tokens, component patterns
|
|
20
|
+
- Read `package.json` for CSS framework/library in use
|
|
21
|
+
|
|
22
|
+
### 2. Design Quality Review
|
|
23
|
+
|
|
24
|
+
| Aspect | Check |
|
|
25
|
+
|--------|-------|
|
|
26
|
+
| **Typography** | Font choices, hierarchy, readability, line-height |
|
|
27
|
+
| **Color** | Palette consistency, contrast, semantic usage |
|
|
28
|
+
| **Spacing** | Consistent gaps, padding, margins (tokens?) |
|
|
29
|
+
| **Layout** | Grid alignment, responsiveness, overflow handling |
|
|
30
|
+
| **Motion** | Appropriate animations, `prefers-reduced-motion` |
|
|
31
|
+
| **Consistency** | Components match existing patterns |
|
|
32
|
+
|
|
33
|
+
### 3. Accessibility Audit
|
|
34
|
+
|
|
35
|
+
| Check | Standard |
|
|
36
|
+
|-------|----------|
|
|
37
|
+
| Color contrast | WCAG AA (4.5:1 text, 3:1 large text) |
|
|
38
|
+
| Focus indicators | Visible, styled, keyboard-navigable |
|
|
39
|
+
| ARIA attributes | Labels, roles, states for interactive elements |
|
|
40
|
+
| Semantic HTML | Proper elements (button, nav, main, aside) |
|
|
41
|
+
| Screen readers | Alt text, aria-label, sr-only text |
|
|
42
|
+
| Reduced motion | `prefers-reduced-motion` media query |
|
|
43
|
+
| Touch targets | Minimum 44x44px on mobile |
|
|
44
|
+
|
|
45
|
+
### 4. Responsive Review
|
|
46
|
+
|
|
47
|
+
Check at minimum these breakpoints:
|
|
48
|
+
- Mobile: 375px
|
|
49
|
+
- Tablet: 768px
|
|
50
|
+
- Desktop: 1024px
|
|
51
|
+
- Wide: 1440px
|
|
52
|
+
|
|
53
|
+
Look for:
|
|
54
|
+
- Content overflow
|
|
55
|
+
- Illegible text sizes
|
|
56
|
+
- Touch target sizes
|
|
57
|
+
- Layout breakage
|
|
58
|
+
- Hidden content accessibility
|
|
59
|
+
|
|
60
|
+
### 5. Implementation Quality
|
|
61
|
+
|
|
62
|
+
| Aspect | Check |
|
|
63
|
+
|--------|-------|
|
|
64
|
+
| CSS architecture | Custom properties, naming conventions, specificity |
|
|
65
|
+
| Component patterns | Props, composition, reusability |
|
|
66
|
+
| Hard-coded values | Should use tokens/variables |
|
|
67
|
+
| `!important` usage | Should be minimal/justified |
|
|
68
|
+
| Unused styles | Dead CSS, redundant rules |
|
|
69
|
+
| Performance | Layout thrashing, heavy animations, large images |
|
|
70
|
+
|
|
71
|
+
### 6. Generate Report
|
|
72
|
+
|
|
73
|
+
Save to `.opencode/memory/reviews/YYYY-MM-DD-ui-review.md`
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
---
|
|
77
|
+
type: UI
|
|
78
|
+
date: YYYY-MM-DD
|
|
79
|
+
reviewer: Vision Agent
|
|
80
|
+
artifact: [paths reviewed]
|
|
81
|
+
verdict: approved | changes_required | blocked
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
# UI Review: [Feature/Component]
|
|
85
|
+
|
|
86
|
+
## Summary
|
|
87
|
+
[2-3 sentence overview]
|
|
88
|
+
|
|
89
|
+
## Design Quality
|
|
90
|
+
| Aspect | Rating | Notes |
|
|
91
|
+
|--------|--------|-------|
|
|
92
|
+
| Typography | ✅/⚠️/❌ | [Details] |
|
|
93
|
+
| Color | ✅/⚠️/❌ | [Details] |
|
|
94
|
+
| Spacing | ✅/⚠️/❌ | [Details] |
|
|
95
|
+
| Layout | ✅/⚠️/❌ | [Details] |
|
|
96
|
+
| Motion | ✅/⚠️/❌ | [Details] |
|
|
97
|
+
| Consistency | ✅/⚠️/❌ | [Details] |
|
|
98
|
+
|
|
99
|
+
## Accessibility
|
|
100
|
+
| Check | Pass | Notes |
|
|
101
|
+
|-------|------|-------|
|
|
102
|
+
| Contrast | ✅/❌ | [Ratio if failing] |
|
|
103
|
+
| Focus | ✅/❌ | [Details] |
|
|
104
|
+
| ARIA | ✅/❌ | [Missing attrs] |
|
|
105
|
+
| Semantic HTML | ✅/❌ | [Details] |
|
|
106
|
+
| Keyboard | ✅/❌ | [Details] |
|
|
107
|
+
|
|
108
|
+
## Responsive
|
|
109
|
+
| Breakpoint | Status | Issues |
|
|
110
|
+
|------------|--------|--------|
|
|
111
|
+
| Mobile 375px | ✅/❌ | [Issues] |
|
|
112
|
+
| Tablet 768px | ✅/❌ | [Issues] |
|
|
113
|
+
| Desktop 1024px | ✅/❌ | [Issues] |
|
|
114
|
+
|
|
115
|
+
## Required Changes
|
|
116
|
+
1. [Change with file:line reference]
|
|
117
|
+
|
|
118
|
+
## Suggestions
|
|
119
|
+
- [Optional improvement]
|
|
120
|
+
|
|
121
|
+
## Verdict
|
|
122
|
+
[Why this verdict]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Verdict Rules
|
|
126
|
+
|
|
127
|
+
| Verdict | Criteria |
|
|
128
|
+
|---------|----------|
|
|
129
|
+
| `approved` | No critical a11y issues, responsive OK, design consistent |
|
|
130
|
+
| `changes_required` | A11y issues OR responsive breakage OR design inconsistency |
|
|
131
|
+
| `blocked` | Critical a11y failures, major design system violations |
|
|
132
|
+
|
|
133
|
+
## Rules
|
|
134
|
+
|
|
135
|
+
- ✅ ALWAYS check accessibility (non-negotiable)
|
|
136
|
+
- ✅ ALWAYS check responsive behavior
|
|
137
|
+
- ✅ ALWAYS reference specific file:line locations
|
|
138
|
+
- ✅ ALWAYS provide actionable fix suggestions
|
|
139
|
+
- ❌ NEVER approve with accessibility failures
|
|
140
|
+
- ❌ NEVER block on subjective style preferences alone
|
|
141
|
+
|
|
142
|
+
Now, gathering UI files to review...
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAuC5C,wBAAgB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAoBxD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAE9D"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// @bun
|
|
3
|
+
|
|
4
|
+
// src/cli.ts
|
|
5
|
+
import * as fs from "fs";
|
|
6
|
+
import * as path from "path";
|
|
7
|
+
var VERSION = "0.1.0";
|
|
8
|
+
function getCwd() {
|
|
9
|
+
return process.cwd();
|
|
10
|
+
}
|
|
11
|
+
async function install() {
|
|
12
|
+
const cwd = getCwd();
|
|
13
|
+
const opencodeDir = path.join(cwd, ".opencode");
|
|
14
|
+
console.log(`\uD83D\uDE80 Installing CliKit...
|
|
15
|
+
`);
|
|
16
|
+
if (!fs.existsSync(opencodeDir)) {
|
|
17
|
+
fs.mkdirSync(opencodeDir, { recursive: true });
|
|
18
|
+
console.log("\u2705 Created .opencode directory");
|
|
19
|
+
}
|
|
20
|
+
const indexPath = path.join(opencodeDir, "index.ts");
|
|
21
|
+
if (!fs.existsSync(indexPath)) {
|
|
22
|
+
fs.writeFileSync(indexPath, `import CliKitPlugin from "clikit-plugin";
|
|
23
|
+
export default CliKitPlugin;
|
|
24
|
+
`);
|
|
25
|
+
console.log("\u2705 Created .opencode/index.ts");
|
|
26
|
+
} else {
|
|
27
|
+
console.log("\u2139\uFE0F .opencode/index.ts already exists");
|
|
28
|
+
}
|
|
29
|
+
const configPath = path.join(opencodeDir, "clikit.config.json");
|
|
30
|
+
if (!fs.existsSync(configPath)) {
|
|
31
|
+
fs.writeFileSync(configPath, JSON.stringify({
|
|
32
|
+
$schema: "https://unpkg.com/clikit-plugin/schema.json",
|
|
33
|
+
disabled_agents: [],
|
|
34
|
+
disabled_commands: [],
|
|
35
|
+
agents: {},
|
|
36
|
+
hooks: {}
|
|
37
|
+
}, null, 2));
|
|
38
|
+
console.log("\u2705 Created .opencode/clikit.config.json");
|
|
39
|
+
} else {
|
|
40
|
+
console.log("\u2139\uFE0F .opencode/clikit.config.json already exists");
|
|
41
|
+
}
|
|
42
|
+
const memoryDir = path.join(opencodeDir, "memory");
|
|
43
|
+
const memorySubdirs = ["specs", "plans", "research", "reviews", "handoffs", "beads", "prds"];
|
|
44
|
+
for (const subdir of memorySubdirs) {
|
|
45
|
+
const dir = path.join(memoryDir, subdir);
|
|
46
|
+
if (!fs.existsSync(dir)) {
|
|
47
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
48
|
+
console.log(`\u2705 Created .opencode/memory/${subdir}/`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
console.log(`
|
|
52
|
+
\u2705 CliKit installed successfully!`);
|
|
53
|
+
console.log(`
|
|
54
|
+
Next steps:`);
|
|
55
|
+
console.log(" 1. Run: bun add -d clikit-plugin");
|
|
56
|
+
console.log(" 2. Restart OpenCode");
|
|
57
|
+
console.log(`
|
|
58
|
+
Available commands: /create, /start, /plan, /ship, /verify, /review, /debug, /pr`);
|
|
59
|
+
}
|
|
60
|
+
function help() {
|
|
61
|
+
console.log(`
|
|
62
|
+
CliKit - OpenCode Plugin
|
|
63
|
+
|
|
64
|
+
Usage:
|
|
65
|
+
clikit <command>
|
|
66
|
+
|
|
67
|
+
Commands:
|
|
68
|
+
install Install CliKit in current project
|
|
69
|
+
help Show this help message
|
|
70
|
+
version Show version
|
|
71
|
+
|
|
72
|
+
Examples:
|
|
73
|
+
bunx clikit install
|
|
74
|
+
`);
|
|
75
|
+
}
|
|
76
|
+
function version() {
|
|
77
|
+
console.log(`clikit-plugin v${VERSION}`);
|
|
78
|
+
}
|
|
79
|
+
async function main() {
|
|
80
|
+
const args = process.argv.slice(2);
|
|
81
|
+
const command = args[0] || "help";
|
|
82
|
+
switch (command) {
|
|
83
|
+
case "install":
|
|
84
|
+
case "i":
|
|
85
|
+
await install();
|
|
86
|
+
break;
|
|
87
|
+
case "help":
|
|
88
|
+
case "-h":
|
|
89
|
+
case "--help":
|
|
90
|
+
help();
|
|
91
|
+
break;
|
|
92
|
+
case "version":
|
|
93
|
+
case "-v":
|
|
94
|
+
case "--version":
|
|
95
|
+
version();
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
console.error(`Unknown command: ${command}`);
|
|
99
|
+
help();
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
main().catch(console.error);
|