Skip to main content
The whoami command displays detailed information about your development environment, including system details, installed tools, and all Refine packages in your project.

Usage

refine whoami

How It Works

The whoami command:
  1. Collects system information (OS, CPU)
  2. Checks installed development tools (Node, npm, Yarn)
  3. Detects available browsers (Chrome, Firefox, Safari)
  4. Scans for all installed @refinedev/* packages
  5. Displays everything in a formatted markdown output

Examples

View Environment Details

Run the command to see your development environment:
refine whoami
Output
 Loading environment details...

## System:
 - OS: macOS 14.1.1
 - CPU: Apple M2 Pro (12)

## Binaries:
 - Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
 - Yarn: 1.22.19 - /usr/local/bin/yarn
 - npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm

## Browsers:
 - Chrome: 120.0.6099.109
 - Firefox: 121.0
 - Safari: 17.1.2

## Refine Packages:
 - @refinedev/core: 4.46.0
 - @refinedev/cli: 2.16.0
 - @refinedev/antd: 5.36.0
 - @refinedev/react-router-v6: 4.5.5
 - @refinedev/simple-rest: 5.0.1
 - @refinedev/react-table: 5.6.4
 - @refinedev/devtools: 1.1.6
 - @refinedev/devtools-server: 1.1.6

Copy Output for Bug Reports

Use the output when reporting issues:
refine whoami > environment.txt
Then attach environment.txt to your GitHub issue.

Share Environment with Team

Share your setup with team members:
refine whoami | pbcopy  # macOS
refine whoami | xclip   # Linux

Output Sections

System Information

Displays your operating system and CPU:
## System:
 - OS: macOS 14.1.1
 - CPU: Apple M2 Pro (12)
Useful for:
  • Debugging platform-specific issues
  • Verifying system requirements
  • Performance troubleshooting

Binaries

Shows installed development tools and their versions:
## Binaries:
 - Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
 - Yarn: 1.22.19 - /usr/local/bin/yarn
 - npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
Useful for:
  • Verifying Node.js version compatibility
  • Checking package manager versions
  • Troubleshooting installation issues

Browsers

Lists available browsers and versions:
## Browsers:
 - Chrome: 120.0.6099.109
 - Firefox: 121.0
 - Safari: 17.1.2
Useful for:
  • Cross-browser testing
  • Debugging browser-specific issues
  • Verifying browser support

Refine Packages

Shows all installed @refinedev/* packages:
## Refine Packages:
 - @refinedev/core: 4.46.0
 - @refinedev/cli: 2.16.0
 - @refinedev/antd: 5.36.0
 - @refinedev/react-router-v6: 4.5.5
Useful for:
  • Debugging version compatibility issues
  • Verifying package installations
  • Reporting bugs with version information

Common Use Cases

Bug Reports

Include environment details in bug reports:
refine whoami
Copy the output to your GitHub issue:
### Environment

<details>
<summary>Click to expand</summary>

[paste output here]

</details>

Team Onboarding

New team members can share their setup:
refine whoami
Compare with the recommended environment in your documentation.

CI/CD Debugging

Add to CI pipeline for debugging:
.github/workflows/test.yml
- name: Display environment
  run: npx refine whoami

Version Verification

Quickly check installed package versions:
refine whoami | grep @refinedev

Pre-flight Check

Before starting development, verify your environment:
refine whoami
Ensure Node.js, npm, and all Refine packages are properly installed.

Troubleshooting

Node Version Mismatch

If you see an unexpected Node version:
# Check which Node is being used
which node

# Use nvm to switch versions
nvm use 20

# Verify
refine whoami

Missing Package Manager

If a package manager shows “Not Found”:
# Install Yarn globally
npm install -g yarn

# Verify installation
refine whoami

Browser Not Detected

If a browser you have isn’t shown:
  • The command only checks Chrome, Firefox, and Safari
  • Other browsers won’t appear in the output
  • This doesn’t affect functionality

No Refine Packages Shown

If no packages appear under “Refine Packages”:
  1. Ensure you’re in a Refine project:
    ls package.json
    
  2. Verify packages are installed:
    npm list | grep @refinedev
    
  3. Install dependencies:
    npm install
    
  4. Run again:
    refine whoami
    

Outdated Information

If information seems outdated:
  1. Clear CLI cache (if any)
  2. Reinstall dependencies:
    rm -rf node_modules
    npm install
    
  3. Run again:
    refine whoami
    

CI/CD Integration

GitHub Actions

Add environment info to workflow:
.github/workflows/build.yml
name: Build

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '20'
      
      - name: Install dependencies
        run: npm ci
      
      - name: Display environment
        run: npx refine whoami
      
      - name: Build
        run: npm run build

GitLab CI

Add to your pipeline:
.gitlab-ci.yml
build:
  stage: build
  script:
    - npm ci
    - npx refine whoami
    - npm run build

Jenkins

Add to your Jenkinsfile:
stage('Environment') {
  steps {
    sh 'npm ci'
    sh 'npx refine whoami'
  }
}

Comparison with Similar Commands

vs npm list

# npm list shows ALL packages
npm list

# refine whoami shows environment + Refine packages
refine whoami

vs node —version

# node --version shows only Node version
node --version

# refine whoami shows Node + npm + Yarn + more
refine whoami

vs system commands

# Individual commands for each detail
uname -a              # OS info
node --version        # Node version
npm --version         # npm version

# refine whoami combines everything
refine whoami

Best Practices

1. Include in Bug Reports

Always run whoami when reporting bugs:
refine whoami > bug-environment.txt
Attach the file to your GitHub issue.

2. Verify After Setup

After setting up a new project:
refine whoami
Confirm all tools and packages are installed correctly.

3. Document Team Environment

Create a baseline for your team:
refine whoami > docs/environment-baseline.md
Team members can compare their setup.

4. Add to Onboarding Checklist

New developers should run:
refine whoami
And verify their output matches the team standard.

5. Regular Environment Audits

Periodically check your environment:
refine whoami
Ensure you’re using supported versions.

Advanced Usage

Filter Output

Show only Refine packages:
refine whoami | grep -A 100 "Refine Packages"

Compare Environments

Compare two developers’ environments:
# Developer 1
refine whoami > dev1.txt

# Developer 2
refine whoami > dev2.txt

# Compare
diff dev1.txt dev2.txt

Save to File

Save output for documentation:
refine whoami > environment-$(date +%Y%m%d).txt

Format for Markdown

The output is already in markdown format, perfect for:
  • GitHub issues
  • Documentation
  • Team wikis
  • README files

Next Steps

Build docs developers (and LLMs) love