@content-reviewer/cli 0.0.3 → 0.0.5

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @content-reviewer/cli
2
2
 
3
- CLI tool for reviewing written content using LLMs.
3
+ An LLM-powered CLI for reviewing written content.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,7 @@ npx @content-reviewer/cli article.md
18
18
 
19
19
  ## Quick Start
20
20
 
21
- ### 1. Set up your API key
21
+ ### 1. Set up an API key
22
22
 
23
23
  Set environment variables in your shell:
24
24
 
@@ -83,7 +83,7 @@ Create a `.reviewrc.json` file in your project root:
83
83
 
84
84
  ### Custom Instruction (Persona & Guidelines)
85
85
 
86
- You can use a text file (such as a Markdown file) for review instructions, defining the reviewer's persona and specific guidelines:
86
+ You can provide an instruction file (e.g., Markdown) to define the reviewer's persona and guidelines:
87
87
 
88
88
  ```bash
89
89
  content-review article.md --instruction ./my-instruction.md
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ var import_consola = require("consola");
42
42
  // package.json
43
43
  var package_default = {
44
44
  name: "@content-reviewer/cli",
45
- version: "0.0.3",
45
+ version: "0.0.5",
46
46
  description: "CLI tool for reviewing written content using LLMs",
47
47
  bin: {
48
48
  "content-review": "./dist/index.js"
@@ -161,6 +161,7 @@ async function loadConfiguration(options) {
161
161
  );
162
162
  }
163
163
  }
164
+ const severityLevel = options.severityLevel ?? fileConfig.severityLevel;
164
165
  const config = (0, import_core.createReviewConfig)({
165
166
  ...fileConfig,
166
167
  instruction: instructionContent,
@@ -170,7 +171,8 @@ async function loadConfiguration(options) {
170
171
  provider: options.provider ?? fileConfig.llm?.provider,
171
172
  apiKey: options.apiKey ?? fileConfig.llm?.apiKey,
172
173
  model: options.model ?? fileConfig.llm?.model
173
- }
174
+ },
175
+ severityLevel
174
176
  });
175
177
  (0, import_core.validateConfig)(config);
176
178
  return config;
@@ -199,11 +201,6 @@ function formatReviewResult(result) {
199
201
  let output = "";
200
202
  output += `${import_picocolors.default.bold(`Review Result: ${result.source}`)}
201
203
 
202
- `;
203
- output += `${import_picocolors.default.bold("Summary:")}
204
- `;
205
- output += `${result.summary}
206
-
207
204
  `;
208
205
  if (result.issues.length === 0) {
209
206
  output += `${import_picocolors.default.green("\u2713 No issues found!")}
@@ -317,6 +314,9 @@ async function handleReviewAction(file, options) {
317
314
  }
318
315
  }
319
316
 
317
+ // src/index.ts
318
+ var import_core4 = require("@content-reviewer/core");
319
+
320
320
  // src/options.ts
321
321
  var import_core3 = require("@content-reviewer/core");
322
322
  var CLI_OPTIONS = {
@@ -337,6 +337,11 @@ var CLI_OPTIONS = {
337
337
  description: "review language (ja, en)",
338
338
  defaultValue: import_core3.DEFAULT_CONFIG.language
339
339
  },
340
+ SEVERITY_LEVEL: {
341
+ flag: "-s, --severity-level <level>",
342
+ description: `minimum severity level to display (${Object.keys(import_core3.SEVERITY_LEVELS).join(", ")})`,
343
+ defaultValue: import_core3.DEFAULT_SEVERITY_LEVEL
344
+ },
340
345
  API_KEY: {
341
346
  flag: "--api-key <key>",
342
347
  description: "LLM provider API key",
@@ -377,5 +382,9 @@ function getOptionDescription(option) {
377
382
  // src/index.ts
378
383
  var program = new import_commander.Command();
379
384
  program.name(PROGRAM_NAME).description(PROGRAM_DESCRIPTION).version(PROGRAM_VERSION);
380
- program.argument("<file>", "File to review").option(CLI_OPTIONS.CONFIG.flag, getOptionDescription(CLI_OPTIONS.CONFIG)).option(CLI_OPTIONS.INSTRUCTION.flag, getOptionDescription(CLI_OPTIONS.INSTRUCTION)).option(CLI_OPTIONS.OUTPUT.flag, getOptionDescription(CLI_OPTIONS.OUTPUT)).option(CLI_OPTIONS.LANGUAGE.flag, getOptionDescription(CLI_OPTIONS.LANGUAGE)).option(CLI_OPTIONS.PROVIDER.flag, getOptionDescription(CLI_OPTIONS.PROVIDER)).option(CLI_OPTIONS.MODEL.flag, getOptionDescription(CLI_OPTIONS.MODEL)).option(CLI_OPTIONS.API_KEY.flag, getOptionDescription(CLI_OPTIONS.API_KEY)).option(CLI_OPTIONS.JSON.flag, getOptionDescription(CLI_OPTIONS.JSON)).option(CLI_OPTIONS.DRY_RUN.flag, getOptionDescription(CLI_OPTIONS.DRY_RUN)).action(handleReviewAction);
385
+ var severityLevelOption = new import_commander.Option(
386
+ CLI_OPTIONS.SEVERITY_LEVEL.flag,
387
+ getOptionDescription(CLI_OPTIONS.SEVERITY_LEVEL)
388
+ ).choices(Object.keys(import_core4.SEVERITY_LEVELS)).default(CLI_OPTIONS.SEVERITY_LEVEL.defaultValue);
389
+ program.argument("<file>", "File to review").option(CLI_OPTIONS.CONFIG.flag, getOptionDescription(CLI_OPTIONS.CONFIG)).option(CLI_OPTIONS.INSTRUCTION.flag, getOptionDescription(CLI_OPTIONS.INSTRUCTION)).option(CLI_OPTIONS.OUTPUT.flag, getOptionDescription(CLI_OPTIONS.OUTPUT)).option(CLI_OPTIONS.LANGUAGE.flag, getOptionDescription(CLI_OPTIONS.LANGUAGE)).addOption(severityLevelOption).option(CLI_OPTIONS.PROVIDER.flag, getOptionDescription(CLI_OPTIONS.PROVIDER)).option(CLI_OPTIONS.MODEL.flag, getOptionDescription(CLI_OPTIONS.MODEL)).option(CLI_OPTIONS.API_KEY.flag, getOptionDescription(CLI_OPTIONS.API_KEY)).option(CLI_OPTIONS.JSON.flag, getOptionDescription(CLI_OPTIONS.JSON)).option(CLI_OPTIONS.DRY_RUN.flag, getOptionDescription(CLI_OPTIONS.DRY_RUN)).action(handleReviewAction);
381
390
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@content-reviewer/cli",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "CLI tool for reviewing written content using LLMs",
5
5
  "bin": {
6
6
  "content-review": "./dist/index.js"
@@ -41,7 +41,7 @@
41
41
  "consola": "^3.4.2",
42
42
  "cosmiconfig": "^9.0.0",
43
43
  "picocolors": "^1.1.1",
44
- "@content-reviewer/core": "0.0.3"
44
+ "@content-reviewer/core": "0.0.5"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^24.10.1",