Skip to content

Commit cc986bf

Browse files
authored
Merge pull request #4 from thinkgrid-labs/dev
fix: resolve CLI help-menu default and sync to v0.3.3
2 parents 1586029 + 8736cfe commit cc986bf

6 files changed

Lines changed: 34 additions & 46 deletions

File tree

apps/local-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@diffmind/cli",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "diffmind CLI — local-first AI code review for your git diffs",
55
"author": "Thinkgrid Labs <hello@thinkgrid.com>",
66
"license": "MIT",

apps/local-cli/src/index.ts

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -48,66 +48,54 @@ const TOKENIZER_URL =
4848
// ─── CLI Definition ───────────────────────────────────────────────────────────
4949

5050
const program = new Command();
51-
52-
program
53-
.command("index")
54-
.description("Build a symbol index of the local repository for context-aware reviews")
55-
.action(async () => {
56-
await runIndexer();
57-
});
51+
const opts: {
52+
branch: string;
53+
format: "markdown" | "json";
54+
output?: string;
55+
minSeverity: Severity;
56+
stdin: boolean;
57+
color: boolean;
58+
context?: string;
59+
} = {} as any;
5860

5961
program
6062
.name("diffmind")
6163
.description("Local-first AI code review for your git diffs")
62-
.version("0.3.2")
64+
.version("0.3.3")
6365
.option("-b, --branch <name>", "Target branch to diff against", "main")
64-
.option(
65-
"-f, --format <type>",
66-
'Output format: "markdown" or "json"',
67-
"markdown"
68-
)
66+
.option("-f, --format <type>", 'Output format: "markdown" or "json"', "markdown")
6967
.option("-o, --output <file>", "Write output to a file instead of stdout")
70-
.option(
71-
"-c, --context <text|file>",
72-
"Business context (ticket description, acceptance criteria)"
73-
)
74-
.option(
75-
"--min-severity <level>",
76-
'Minimum severity to report: "high", "medium", or "low"',
77-
"low"
78-
)
68+
.option("-c, --context <text|file>", "Business context (ticket description, acceptance criteria)")
69+
.option("--min-severity <level>", 'Minimum severity to report: "high", "medium", or "low"', "low")
7970
.option("--stdin", "Read git diff from stdin instead of running git diff")
80-
.option("--no-color", "Disable colored output");
71+
.option("--no-color", "Disable colored output")
72+
.action(async (options) => {
73+
// This is the default action (no subcommand used)
74+
Object.assign(opts, options);
75+
await main().catch((err) => {
76+
console.error(chalk.red(`Fatal Error: ${err.message}`));
77+
process.exit(1);
78+
});
79+
});
80+
81+
program
82+
.command("index")
83+
.description("Build a symbol index of the local repository for context-aware reviews")
84+
.action(async () => {
85+
await runIndexer();
86+
});
8187

8288
// ─── Entry Point ──────────────────────────────────────────────────────────────
8389

8490
function run() {
8591
program.parse(process.argv);
86-
87-
// If no subcommand is used, run the default analysis
88-
if (!program.args.length || program.args[0] !== "index") {
89-
main().catch((err) => {
90-
console.error(chalk.red(`Fatal Error: ${err.message}`));
91-
process.exit(1);
92-
});
93-
}
9492
}
9593

9694
// Only run if executed directly
9795
if (require.main === module) {
9896
run();
9997
}
10098

101-
const opts = program.opts<{
102-
branch: string;
103-
format: "markdown" | "json";
104-
output?: string;
105-
minSeverity: Severity;
106-
stdin: boolean;
107-
color: boolean;
108-
context?: string;
109-
}>();
110-
11199
// ─── Main Logic ───────────────────────────────────────────────────────────────
112100

113101
import { Worker } from "worker_threads";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "diffmind",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"private": true,
55
"description": "Local-first AI code review agent — powered by on-device Wasm inference",
66
"author": "Thinkgrid Labs <dennis@thinkgrid.dev>",

packages/core-wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "core-wasm"
3-
version = "0.3.2"
3+
version = "0.3.3"
44
edition = "2021"
55
description = "diffmind Wasm core — on-device security analysis via Qwen2.5-Coder"
66

packages/core-wasm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@diffmind/core-wasm",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "diffmind Wasm core — compiled from Rust via wasm-pack",
55
"license": "MIT",
66
"author": "Thinkgrid Labs <hello@thinkgrid.com>",

packages/shared-types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@diffmind/shared-types",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "Shared TypeScript types for diffmind review findings",
55
"license": "MIT",
66
"author": "Thinkgrid Labs <hello@thinkgrid.com>",

0 commit comments

Comments
 (0)