openCLI / packages /cli /src /utils /version.ts
Jimmi42's picture
Upload folder using huggingface_hub
40e575e verified
Raw History Blame Contribute Delete
305 Bytes
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { getPackageJson } from './package.js';
export async function getCliVersion(): Promise<string> {
const pkgJson = await getPackageJson();
return process.env.CLI_VERSION || pkgJson?.version || 'unknown';
}