MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / getVersion

Function getVersion

apps/cli/src/version.ts:10–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8 * Works for both tsx dev (src/) and bundled (dist/).
9 */
10export function getVersion(): string {
11 if (cached) return cached
12 try {
13 const pkgPath = resolveCliPath('package.json')
14 cached = JSON.parse(readFileSync(pkgPath, 'utf-8')).version
15 } catch {
16 cached = '0.0.0-dev'
17 }
18 return cached!
19}

Callers 6

createCliRuntimeIdentityFunction · 0.90
startCliMcpServerFunction · 0.90
cli.tsFile · 0.90
registerWebRoutesFunction · 0.90

Calls 2

resolveCliPathFunction · 0.90
parseMethod · 0.80

Tested by

no test coverage detected