diff --git a/src/commands/create.ts b/src/commands/create.ts index ee18962..257ce3f 100644 --- a/src/commands/create.ts +++ b/src/commands/create.ts @@ -372,7 +372,7 @@ export function registerCreateCommand(program: Command): void { deploySpinner.stop('Deployment is still building'); clack.log.info(`Deployment ID: ${result.deploymentId}`); clack.log.warn('Deployment did not finish within 2 minutes.'); - clack.log.info(`Check status with: insforge deployments status ${result.deploymentId}`); + clack.log.info(`Check status with: npx @insforge/cli deployments status ${result.deploymentId}`); } } catch (err) { clack.log.warn(`Deploy failed: ${(err as Error).message}`); @@ -540,7 +540,7 @@ async function downloadGitHubTemplate( dbSpinner?.stop('Database migration failed'); if (!json) { clack.log.warn(`Migration failed: ${(err as Error).message}`); - clack.log.info('You can run the migration manually: insforge db query --unrestricted "$(cat migrations/db_init.sql)"'); + clack.log.info('You can run the migration manually: npx @insforge/cli db query --unrestricted "$(cat migrations/db_init.sql)"'); } else { throw err; } diff --git a/src/commands/deployments/deploy.ts b/src/commands/deployments/deploy.ts index 45a2694..ddf8427 100644 --- a/src/commands/deployments/deploy.ts +++ b/src/commands/deployments/deploy.ts @@ -207,7 +207,7 @@ export function registerDeploymentsDeployCommand(deploymentsCmd: Command): void } else { clack.log.info(`Deployment ID: ${result.deploymentId}`); clack.log.warn('Deployment did not finish within 2 minutes.'); - clack.log.info(`Check status with: insforge deployments status ${result.deploymentId}`); + clack.log.info(`Check status with: npx @insforge/cli deployments status ${result.deploymentId}`); } } await reportCliUsage('cli.deployments.deploy', true); diff --git a/src/commands/docs.ts b/src/commands/docs.ts index 3a5f2c8..8443d7d 100644 --- a/src/commands/docs.ts +++ b/src/commands/docs.ts @@ -17,11 +17,11 @@ Features: ${FEATURES.join(', ')} Languages: ${LANGUAGES.join(', ')} Examples: - insforge docs List all available docs - insforge docs instructions Show setup instructions - insforge docs db typescript Show TypeScript database SDK docs - insforge docs auth swift Show Swift auth SDK docs - insforge docs storage rest-api Show REST API storage docs`) + npx @insforge/cli docs List all available docs + npx @insforge/cli docs instructions Show setup instructions + npx @insforge/cli docs db typescript Show TypeScript database SDK docs + npx @insforge/cli docs auth swift Show Swift auth SDK docs + npx @insforge/cli docs storage rest-api Show REST API storage docs`) .action(async (feature: string | undefined, language: string | undefined, _opts, cmd) => { const { json } = getRootOpts(cmd); try { diff --git a/src/commands/info.ts b/src/commands/info.ts index b0fbf7b..28e76ac 100644 --- a/src/commands/info.ts +++ b/src/commands/info.ts @@ -48,7 +48,7 @@ export function registerContextCommand(program: Command): void { console.log(` Region: ${projectConfig.region}`); console.log(` OSS Host: ${projectConfig.oss_host}`); } else { - console.log('\n Project: (not linked — run `insforge link`)'); + console.log('\n Project: (not linked — run `npx @insforge/cli link`)'); } console.log(''); diff --git a/src/lib/credentials.ts b/src/lib/credentials.ts index 5f87833..5e0ef90 100644 --- a/src/lib/credentials.ts +++ b/src/lib/credentials.ts @@ -36,7 +36,7 @@ export async function requireAuth(apiUrl?: string, allowOssBypass = true): Promi const retry = await clack.confirm({ message: 'Would you like to try again?' }); if (clack.isCancel(retry) || !retry) { - throw new AuthError('Authentication required. Run `insforge login` to authenticate.'); + throw new AuthError('Authentication required. Run `npx @insforge/cli login` to authenticate.'); } } } @@ -45,7 +45,7 @@ export async function requireAuth(apiUrl?: string, allowOssBypass = true): Promi export async function refreshAccessToken(apiUrl?: string): Promise { const creds = getCredentials(); if (!creds?.refresh_token) { - throw new AuthError('Refresh token not found. Run `insforge login` again.'); + throw new AuthError('Refresh token not found. Run `npx @insforge/cli login` again.'); } const platformUrl = getPlatformApiUrl(apiUrl); @@ -74,6 +74,6 @@ export async function refreshAccessToken(apiUrl?: string): Promise { const newCreds = await performOAuthLogin(apiUrl); return newCreds.access_token; } - throw new AuthError('Failed to refresh token. Run `insforge login` again.'); + throw new AuthError('Failed to refresh token. Run `npx @insforge/cli login` again.'); } } diff --git a/src/lib/errors.ts b/src/lib/errors.ts index d2ec448..103e013 100644 --- a/src/lib/errors.ts +++ b/src/lib/errors.ts @@ -12,14 +12,14 @@ export class CLIError extends Error { } export class AuthError extends CLIError { - constructor(message: string = 'Not authenticated. Run `insforge login` first.') { + constructor(message: string = 'Not authenticated. Run `npx @insforge/cli login` first.') { super(message, 2, 'AUTH_ERROR'); } } export class ProjectNotLinkedError extends CLIError { constructor() { - super('No project linked. Run `insforge link` first.', 3, 'PROJECT_NOT_LINKED'); + super('No project linked. Run `npx @insforge/cli link` first.', 3, 'PROJECT_NOT_LINKED'); } }