/** Package managers this CLI can name in the commands it prints. */
export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
/**
 * Detect the package manager for a project.
 *
 * `npm_config_user_agent` is first then lockfile detection.
 */
export declare function detectPackageManager(dir?: string): PackageManager | undefined;
/**
 * The command that runs this CLI, matched to the detected package manager.
 * Falls back to `npx`
 *
 * Yarn is weird: detected from a lockfile alone also falls bac
 * lockfile name does not differentiate Yarn 1 vs Yarn 2+
 */
export declare function runCommand(bin: string, dir?: string): string;
/** The command that installs dependencies, matched to the detected package manager. */
export declare function installCommand(dir?: string): string;
/** Clear the lockfile lookup cache. Tests use this after they move fixtures. */
export declare function resetPackageManagerCache(): void;
