codehere 2.0.0 → 2.0.1

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.
Files changed (2) hide show
  1. package/bin/codehere.js +4 -0
  2. package/package.json +2 -2
package/bin/codehere.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import fs from 'node:fs';
2
3
  import { runHook } from '../src/hooks.js';
3
4
  import * as cmd from '../src/commands.js';
4
5
 
@@ -83,6 +84,9 @@ const run = async () => {
83
84
  case 'stats':
84
85
  return cmd.stats();
85
86
  default:
87
+ if (flags.version || command === '-v') {
88
+ return console.log(`codehere ${JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version}`);
89
+ }
86
90
  if (!command || command === '-h') return console.log(USAGE);
87
91
  // stderr only: a hook's stdout can land in the agent's context (e.g. a codehere 1.x
88
92
  // user-level hook such as `codehere scan-tool`). Exit 0 when a hook called us.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "codehere",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "A git-native team brain for vibe coders. Silent fixes for AI coding agents: breaks doom loops, verifies 'done', blocks test tampering, and shares what your team learned.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/muhammadegaa/codehere.git",
8
8
  "directory": "v2"
9
9
  },
10
- "homepage": "https://github.com/muhammadegaa/codehere/tree/v2-team-brain/v2#readme",
10
+ "homepage": "https://github.com/muhammadegaa/codehere/tree/main/v2#readme",
11
11
  "type": "module",
12
12
  "bin": {
13
13
  "codehere": "bin/codehere.js"