Repository: strapi/strapi
File: packages/core/strapi/src/cli/commands/transfer/command.ts (TypeScript)

Code before:
        'preAction',
        async (thisCommand) => {
          const opts = thisCommand.opts();
          
          // If neither --from nor --to are provided, prompt for transfer direction
          if (!(opts.from || opts.to)) {
            // Log environment variables status
            const hasUrl = Boolean(process.env.STRAPI_TRANSFER_URL);
            const hasToken = Boolean(process.env.STRAPI_TRANSFER_TOKEN);

            console.info('ℹ️  Data transfer documentation: https://docs.strapi.io/dev-docs/data-management/transfer');

            if (hasUrl && hasToken) {
              console.info('ℹ️  Found transfer configuration in your environment:');
              console.info('   → STRAPI_TRANSFER_URL environment variable value will be used as default URL');
              console.info('   → STRAPI_TRANSFER_TOKEN environment variable value will be used as default token');
            } else if (hasUrl || hasToken) {
              if (hasUrl) {
                console.info('ℹ️  Found partial transfer configuration:');
                console.info('   → STRAPI_TRANSFER_URL environment variable value will be used as default URL');
                console.info('   → STRAPI_TRANSFER_TOKEN environment variable not found ');
              } else {
                console.info('ℹ️  Found partial transfer configuration:');
                console.info('   → STRAPI_TRANSFER_URL environment variable not found');
                console.info('   → STRAPI_TRANSFER_TOKEN environment variable value will be used as default token');
              }
            } else {
              console.info('ℹ️  No transfer configuration found in environment variables');
              console.info('   → Add STRAPI_TRANSFER_URL and STRAPI_TRANSFER_TOKEN environment variables to make the transfer process faster for future runs');
            }
            console.log(); // Empty line for better readability

            const { direction } = await inquirer.prompt([
              {
                type: 'list',
                name: 'direction',
                message: 'Choose transfer direction:',
                choices: [
                  { name: 'Pull data from remote Strapi to local', value: 'from' },
                  { name: 'Push local data to remote Strapi', value: 'to' }
                ]
              }
            ]);

            if (direction === 'from') {
              const { remoteUrl, token } = await inquirer.prompt([
                {
                  type: 'input',
                  name: 'remoteUrl',
                  message: 'Enter the URL of the remote Strapi instance to get data from:',
                  default: process.env.STRAPI_TRANSFER_URL,

Review comment (bug):
```suggestion
            if (hasUrl || hasToken) {
              console.info('ℹ️  Found transfer configuration in your environment:');
              if (hasUrl) {
                console.info('   → STRAPI_TRANSFER_URL environment variable value will be used as default URL');
              }
              if(hasToken) {
                console.info('   → STRAPI_TRANSFER_TOKEN environment variable value will be used as default token');
              }
```

I found this a little confusing/distracting when I was testing it. If I only set one of the two, I don't expect to see the other, and my brain doesn't want to read all that but is forced to to find out why there's something I didn't set, it felt like something went wrong 😆 For me, I'd prefer to just see the item that I set.

If we do want to keep it this way, maybe we could make the "found" items green or something and the not-found items yellow or something?

Code after:
        'preAction',
        ifOptions(
          (opts) =>
            (opts.from && opts.to) || (opts.from && opts.toToken) || (opts.to && opts.fromToken),
          async () =>
            exitWith(1, 'Only one remote source (from) or destination (to) option may be provided')
        )
      )
      .hook('preAction', async (thisCommand) => {
        const opts = thisCommand.opts();
        const hasEnvUrl = process.env.STRAPI_TRANSFER_URL;
        const hasEnvToken = process.env.STRAPI_TRANSFER_TOKEN;

        const logDocumentation = () => {
          console.info(
            'ℹ️  Data transfer documentation: https://docs.strapi.io/dev-docs/data-management/transfer'
          );
        };

        const logEnvironmentVariables = () => {
          if (!hasEnvUrl && !hasEnvToken) {
            console.info('ℹ️  No transfer configuration found in environment variables');
            console.info(
              '   → Add STRAPI_TRANSFER_URL and STRAPI_TRANSFER_TOKEN environment variables to make the transfer process faster for future runs'
            );
            return;
          }

          console.info('ℹ️  Found transfer configuration in your environment:');

          if (hasEnvUrl) {
            console.info(
              `   → Environment STRAPI_TRANSFER_URL (${hasEnvUrl}) will be used as the transfer URL`
            );
          }

          if (hasEnvToken) {
            console.info(
              '   → Environment STRAPI_TRANSFER_TOKEN value will be used as the transfer token'
            );
          }

          console.info(); // Empty line for better readability
        };

        const determineDirection = async () => {
          // If user has not provided a direction from CLI, log the documentation
          if (!opts.from && !opts.to) {
            logDocumentation();
          }