feat: add OpenCode/Codex outputs and update changelog (#104)
* Add OpenCode converter coverage and specs * Add Codex target support and spec docs * Generate Codex command skills and refresh spec docs * Add global Codex install path * fix: harden plugin path loading and codex descriptions * feat: ensure codex agents block on convert/install * docs: clarify target branch usage for review * chore: prep npm package metadata and release notes * docs: mention opencode and codex in changelog * docs: update CLI usage and remove stale todos * feat: install from GitHub with global outputs
This commit is contained in:
37
src/commands/list.ts
Normal file
37
src/commands/list.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import path from "path"
|
||||
import { promises as fs } from "fs"
|
||||
import { defineCommand } from "citty"
|
||||
import { pathExists } from "../utils/files"
|
||||
|
||||
export default defineCommand({
|
||||
meta: {
|
||||
name: "list",
|
||||
description: "List available Claude plugins under plugins/",
|
||||
},
|
||||
async run() {
|
||||
const root = process.cwd()
|
||||
const pluginsDir = path.join(root, "plugins")
|
||||
if (!(await pathExists(pluginsDir))) {
|
||||
console.log("No plugins directory found.")
|
||||
return
|
||||
}
|
||||
|
||||
const entries = await fs.readdir(pluginsDir, { withFileTypes: true })
|
||||
const plugins: string[] = []
|
||||
|
||||
for (const entry of entries) {
|
||||
if (!entry.isDirectory()) continue
|
||||
const manifestPath = path.join(pluginsDir, entry.name, ".claude-plugin", "plugin.json")
|
||||
if (await pathExists(manifestPath)) {
|
||||
plugins.push(entry.name)
|
||||
}
|
||||
}
|
||||
|
||||
if (plugins.length === 0) {
|
||||
console.log("No Claude plugins found under plugins/.")
|
||||
return
|
||||
}
|
||||
|
||||
console.log(plugins.sort().join("\n"))
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user