Skip to content

m devcontainer pnpm

Run pnpm in the devcontainer.

This command is meant to be used as an alias for pnpm in a devcontainer. If you want view the help for the pnpm command you can run::

command pnpm --help

Depending on the pnpm command that we want to run, this command will change the working directory to the mounted volume and execute the pnpm command.

Currently the main commands that will be executed in the mounted volume are

  • add
  • install
  • remove
  • uninstall

If you need to run other commands in the mounted volume you can use the --force-cd flag.

Source code in m/cli/commands/devcontainer/pnpm.py
class Arguments(BaseModel):
    """Run pnpm in the devcontainer.

    This command is meant to be used as an alias for `pnpm` in a devcontainer.
    If you want view the help for the `pnpm` command you can run::

        command pnpm --help

    Depending on the pnpm command that we want to run, this command will change
    the working directory to the mounted volume and execute the pnpm command.

    Currently the main commands that will be executed in the mounted volume
    are

    - add
    - install
    - remove
    - uninstall

    If you need to run other commands in the mounted volume you can use the
    `--force-cd` flag.
    """

    force_cd: bool = Arg(default=False, help='force `cd` to the mounted volume')

    pnpm_args: list[str] = RemainderArgs(help='arguments to pass to pnpm')

Options

--force-cd

  • default: false

force cd to the mounted volume

pnpm_args

  • default: []

arguments to pass to pnpm