Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Update semver to 7.8.6 and tar to 7.5.23 while preserving the supported Node.js runtime and TypeScript compiler line.
- `init --workflow <path>` now writes the workflow without also needing `--ci`, instead of exiting 0 with no workflow, and `init --help` lists the flag. Thanks @KrasimirKralev.

## 0.4.6 - 2026-11-06

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ npx @openclaw/plugin-inspector init --ci --scripts --dry-run
npx @openclaw/plugin-inspector init --ci --scripts
```

`--ci` writes the workflow to `.github/workflows/plugin-inspector.yml`; pass
`--workflow <path>` to write it somewhere else, with or without `--ci`.

`init` detects `packageManager` and common lockfiles. Override that with
`--package-manager npm`, `--package-manager pnpm`, `--package-manager yarn`, or
`--package-manager bun`. Existing files are protected unless you pass `--force`.
Expand Down
4 changes: 2 additions & 2 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ async function runInit(commandArgs) {
configPath,
workflowPath,
packageManager,
ci: commandArgs.includes("--ci"),
ci: commandArgs.includes("--ci") || commandArgs.includes("--workflow"),
dryRun: commandArgs.includes("--dry-run"),
scripts: commandArgs.includes("--scripts"),
force: commandArgs.includes("--force"),
Expand Down Expand Up @@ -440,7 +440,7 @@ Usage:
plugin-inspector
plugin-inspector check [--plugin-root <path>] [--config <path>] [--out <dir>] [--openclaw <path> | --openclaw-version latest|beta|<exact> | --no-openclaw] [--runtime] [--mock-sdk|--real-sdk] [--allow-execute] [--author-facing] [--json]
plugin-inspector config [--plugin-root <path>] [--config <path>] [--json]
plugin-inspector init [--plugin-root <path>] [--config <path>] [--ci] [--scripts] [--package-manager npm|pnpm|yarn|bun] [--dry-run] [--json] [--force]
plugin-inspector init [--plugin-root <path>] [--config <path>] [--ci] [--workflow <path>] [--scripts] [--package-manager npm|pnpm|yarn|bun] [--dry-run] [--json] [--force]
plugin-inspector report --config <path> [--out <dir>] [--openclaw <path> | --openclaw-version latest|beta|<exact> | --no-openclaw] [--author-facing] [--check] [--json]
plugin-inspector batch <folder> [--out <dir>] [--openclaw <path> | --openclaw-version latest|beta|<exact> | --no-openclaw] [--concurrency <n>] [--keep-plugin-reports] [--author-facing] [--check] [--json]
plugin-inspector inspect [--plugin-root <path>] [--config <path>] [--out <dir>] [--openclaw <path> | --openclaw-version latest|beta|<exact> | --no-openclaw] [--author-facing] [--check] [--json] [--sarif [path]] [--junit [path]] [--allow-execute]
Expand Down
18 changes: 18 additions & 0 deletions test/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createWeatherPlugin } from "./helpers/weather-plugin.js";
import { createTempDir } from "./helpers/temp-dir.js";
import assert from "node:assert/strict";
import { execFile } from "node:child_process";
import { existsSync } from "node:fs";
import { mkdir, readFile, writeFile } from "node:fs/promises";
import os from "node:os";
import path from "node:path";
Expand Down Expand Up @@ -404,6 +405,23 @@ test("init command writes plugin config and CI workflow", async (t) => {
assert.match(workflow, /pnpm dlx @openclaw\/plugin-inspector ci --no-openclaw --runtime --mock-sdk --allow-execute/);
});

test("init command --workflow writes the workflow without --ci", async (t) => {
const rootDir = await createCliPluginRoot(t, "plugin-inspector-cli-init-workflow-");
const cliPath = path.resolve("src/cli.js");
const args = [cliPath, "init", "--plugin-root", rootDir, "--workflow", "ci/inspect.yml", "--force"];

const dryRun = await execFileAsync(process.execPath, [...args, "--dry-run"]);
assert.match(dryRun.stdout, /^would write ci\/inspect\.yml$/m);
assert.equal(existsSync(path.join(rootDir, "ci", "inspect.yml")), false);

const { stdout } = await execFileAsync(process.execPath, args);
const workflow = await readFile(path.join(rootDir, "ci", "inspect.yml"), "utf8");

assert.match(stdout, /^wrote ci\/inspect\.yml$/m);
assert.match(workflow, /@openclaw\/plugin-inspector ci --no-openclaw --runtime --mock-sdk --allow-execute/);
assert.equal(existsSync(path.join(rootDir, ".github", "workflows", "plugin-inspector.yml")), false);
});

test("init command detects plugin package managers", async (t) => {
const rootDir = await createCliPluginRoot(t, "plugin-inspector-cli-init-pm-");
const cliPath = path.resolve("src/cli.js");
Expand Down
Loading