Forrest logo
tool overview
On this page you find all important commands for the CLI tool npx. If the command you are looking for is missing please ask our AI.

npx

This command allows you to run an arbitrary command from an npm package (either one installed locally, or fetched remotely), in a similar context as running it via npm run.

Articles in our magazine for npx:

Exploring the Nuxt Command Line

Using the command line is often faster and more effective. Event when using frontend frameworks like nuxt. Here are the most important commands.

List of commands for npx:

  • cypress:open Open Cypress. This will open Cypress in a new window.
    $ npx cypress open
    try on your machine
    explain this command
  • cypress:open:mobile-viewport Open Cypress With a Mobile Viewport
    $ npx cypress open --config viewportWidth=${width},viewportHeight=${height}
    try on your machine
    explain this command
  • cypress:run Run Cypress Headless
    $ npx cypress run
    try on your machine
    explain this command
  • cypress:run:mobile-viewport Run Cypress Headless With a Mobile Viewport
    $ npx cypress run --config viewportWidth=${width},viewportHeight=${height}
    try on your machine
    explain this command
  • nextjs:app:create Create Next.JS app
    $ npx create-next-app ${project_name} --use-${package_manager}
    try on your machine
  • npm:packages:find:unused Find unused npm packages in package.json
    $ npx depcheck
    try on your machine
  • npx:tldr:2ebf2 npx: Run a command if it exists in the current path or in `node_modules/.bin`.
    $ npx --no-install ${command} ${command_arguments}
    try on your machine
    explain this command
  • npx:tldr:87890 npx: Execute the command from a local or remote `npm` package.
    $ npx ${command} ${arg1 arg2 ---}
    try on your machine
    explain this command
  • npx:tldr:b3828 npx: Display help.
    $ npx --help
    try on your machine
    explain this command
  • npx:tldr:d26ab npx: In case multiple commands with the same name exist, it is possible to specify the package name.
    $ npx --package ${package_name} ${command}
    try on your machine
    explain this command
  • npx:tldr:fa977 npx: Execute a specific command suppressing any output from `npx` itself.
    $ npx --quiet ${command} ${arg1 arg2 ---}
    try on your machine
    explain this command
  • nuxt:install Install the latest version of nuxt and create a new project
    $ npx nuxi@latest init ${project-name}
    try on your machine
    explain this command
  • nx:warp:01981 Migrate Create-React-App project into a Nx Workspace
    $ npx cra-to-nx
    try on your machine
    explain this command
  • nx:warp:01c49 Add Nx to an Existing Project
    $ npx add-nx-to-monorepo
    try on your machine
    explain this command
  • nx:warp:23a90 Create a new Nx workspace with a React application
    $ npx create-nx-workspace@latest ${name} --preset=react
    try on your machine
    explain this command
  • nx:warp:2798e Remove project from Nx workspace
    $ npx nx generate @nrwl/workspace:remove --projectName=${name}
    try on your machine
    explain this command
  • nx:warp:2a924 Generate a new application in your Nx workspace
    $ npx nx g @nrwl/${framework}:application --name=${name}
    try on your machine
    explain this command
  • nx:warp:6df8c View the project graph
    $ npx nx graph
    try on your machine
    explain this command
  • nx:warp:755c4 Test only the affected code in your Nx workspace
    $ npx nx affected:test
    try on your machine
    explain this command
  • nx:warp:879d0 Generate a new library in your Nx workspace
    $ npx nx g @nrwl/${framework}:library --name=${name}
    try on your machine
    explain this command
  • nx:warp:9a387 Create a new Nx workspace
    $ npx create-nx-workspace@latest ${name}
    try on your machine
    explain this command
  • playwright:file:run Run a single Playwright test file
    $ npx playwright test ${pathToFile}
    try on your machine
  • playwright:project:run Run a single Playwright project
    $ npx playwright test --project=${projectName}
    try on your machine
  • playwright:report:show Show report on Playwright tests
    $ npx playwright show-report
    try on your machine
  • playwright:run-all Run all Playwright tests
    $ npx playwright test
    try on your machine
  • playwright:test:run Run Playwright test with the title
    $ npx playwright test --g "${testTitle}"
    try on your machine
  • playwright:test:run:debug-mode Run Playwright tests in debug mode
    $ npx playwright test --debug
    try on your machine
  • playwright:test:run:headed-mode Run Playwright tests in headed mode
    $ npx playwright test --headed
    try on your machine
  • playwright:warp:43f95 Run Playwright test in a specific browser
    $ npx playwright test --browser=${browser}
    try on your machine
    explain this command
  • playwright:warp:9f294 Auto-generate Playwright tests with Codegen
    $ npx playwright codegen ${url}
    try on your machine
    explain this command
tool overview