Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-3-5-sonnet-20241022· AnthropicHugging Face LMArena Human Preference 140K

Is there a way to list currently cached or recently run npx commands?

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with chatgpt-4o-latest-20250326’s answer.
  1. User

    Is there a way to list currently cached or recently run npx commands?

  2. Claude Assistant

    There isn't a direct command to list recently run npx commands specifically. However, you can check your shell's history to see recently run commands including npx:

    For bash/zsh:

    history | grep npx
    

    For PowerShell:

    Get-History | Where-Object {$_.CommandLine -like "*npx*"}
    

    As for cached npx packages, they're stored in your npm cache. You can see the full npm cache contents with:

    npm cache ls
    

    Would you like me to explain more about how npx caching works or how to manage these cached packages?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.