import type { PackageDotJson } from './package-json';
import { type PackageManager } from './package-manager';
import type { CloudRegion, WizardOptions } from './types';
import { type AppId } from '../lib/wizard-session';
export interface CliSetupConfig {
    filename: string;
    name: string;
    gitignore: boolean;
    likelyAlreadyHasAuthToken(contents: string): boolean;
    tokenContent(authToken: string): string;
    likelyAlreadyHasOrgAndProject(contents: string): boolean;
    orgAndProjContent(org: string, project: string): string;
    likelyAlreadyHasUrl?(contents: string): boolean;
    urlContent?(url: string): string;
}
export interface CliSetupConfigContent {
    authToken: string;
    org?: string;
    project?: string;
    url?: string;
}
/** @deprecated Use wizardAbort() directly for new code. */
export declare function abort(message?: string, status?: number): Promise<never>;
export declare function isInGitRepo(): boolean;
export declare function getUncommittedOrUntrackedFiles(): string[];
export declare function isReact19Installed({ installDir, }: Pick<WizardOptions, 'installDir'>): Promise<boolean>;
/**
 * Installs or updates a package with the user's package manager.
 *
 * IMPORTANT: This function modifies the `package.json`! Be sure to re-read
 * it if you make additional modifications to it after calling this function!
 */
export declare function installPackage({ packageName, alreadyInstalled, packageNameDisplayLabel, packageManager, forceInstall, integration, installDir, }: {
    packageName: string;
    alreadyInstalled: boolean;
    packageNameDisplayLabel?: string;
    packageManager?: PackageManager;
    forceInstall?: boolean;
    integration?: string;
    installDir: string;
}): Promise<{
    packageManager?: PackageManager;
}>;
/**
 * Get package.json or abort the wizard if not found.
 * Only use where package.json is required (e.g., package install, overrides).
 * For detection/version-checks, use tryGetPackageJson() instead.
 */
export declare function getPackageDotJson({ installDir, }: Pick<WizardOptions, 'installDir'>): Promise<PackageDotJson>;
/**
 * Try to get package.json, returning null if it doesn't exist.
 * Use this for detection purposes where missing package.json is expected (e.g., Python projects).
 *
 * Re-exported from `./package-json-light` so that callers who import this
 * symbol from `setup-utils` keep working, while framework `detect()` paths
 * can import it from the light module to avoid pulling the rest of
 * `setup-utils` (chalk, OAuth, analytics, …) into the cold-start graph.
 */
export declare const tryGetPackageJson: (options: Pick<WizardOptions, 'installDir'>) => Promise<PackageDotJson | null>;
export declare function updatePackageDotJson(packageDotJson: PackageDotJson, { installDir }: Pick<WizardOptions, 'installDir'>): Promise<void>;
/**
 * Detect and return the package manager. Pure — no prompts.
 * Falls back to first detected or npm if ambiguous.
 */
export declare function getPackageManager(options: Pick<WizardOptions, 'installDir'> & {
    ci?: boolean;
}): Promise<PackageManager>;
export declare function isUsingTypeScript({ installDir, }: Pick<WizardOptions, 'installDir'>): boolean;
/**
 * Best-effort credentials for `--ci` when `--api-key` / AMPLITUDE_WIZARD_API_KEY
 * is not set: locally stored key (.env.local / per-user cache), then OAuth id token from
 * ~/.ampli.json plus org/project from ampli.json (same resolution as interactive bootstrap).
 */
export declare function tryResolveCredentialsForCi(installDir: string): Promise<{
    host: string;
    projectApiKey: string;
    accessToken: string;
    cloudRegion: CloudRegion;
} | null>;
/**
 * Get project data for the wizard via Amplitude OAuth or CI API key.
 *
 * Pass installDir to enable fresh-auth detection: when no local ampli.json
 * exists, the cached ~/.ampli.json token is bypassed so the user explicitly
 * authenticates and picks the right Amplitude account for this project.
 */
export declare function getOrAskForProjectData(_options: Pick<WizardOptions, 'authOnboardingPath' | 'ci' | 'apiKey' | 'appId'> & {
    installDir?: string;
}): Promise<{
    host: string;
    projectApiKey: string;
    accessToken: string;
    /** Branded `AppId` once known; `0` when the env hasn't been picked yet. */
    appId: AppId | 0;
    cloudRegion: CloudRegion;
}>;
/**
 * Creates a new config file with the given filepath and codeSnippet.
 */
export declare function createNewConfigFile(filepath: string, codeSnippet: string, { installDir }: Pick<WizardOptions, 'installDir'>, moreInformation?: string): Promise<boolean>;
