Back to Moon

bin

website/docs/proto/commands/bin.mdx

2.2.41.2 KB
Original Source

import VersionLabel from '@site/src/components/Docs/VersionLabel';

The proto bin <tool> [version] command will return an absolute path to a tool's binary within the toolchain. When a tool has not been installed, or a version cannot be resolved, the command will exit with a failure.

shell
$ proto bin node 16.10.0
/Users/example/.proto/tools/node/16.10.0/bin/node

This command can also return directories using the --dir option.

shell
$ proto bin node 16.10.0 --dir exes
/Users/example/.proto/tools/node/16.10.0/bin

$ proto bin node 16.10.0 --dir globals
/Users/example/.proto/tools/node/globals/bin

Arguments

  • <tool> - Type of tool.
  • [version] - Version of tool. If not provided, will attempt to detect the version.

Options

  • --all - Return multiple paths, separated by newlines, instead of the first path. <VersionLabel version="0.50.0" />
  • --dir <dir> - Return a directory instead of of the main file. <VersionLabel version="0.50.0" />
    • exes - Returns the executable's directory.
    • globals - Returns the globals/packages directory.
  • --bin - When applicable, return the ~/.proto/bin path.
  • --shim - When applicable, return the ~/.proto/shims path.