Official document says:
Installation
To create a Tree-sitter parser, you need to use the tree-sitter CLI. You can install the CLI in a few different ways:
Build the tree-sitter-cli Rust crate from source using cargo, the Rust package manager. This works on any platform. See the contributing docs for more information.
Install the tree-sitter-cli Node.js module using npm, the Node package manager. This approach is fast, but is only works on certain platforms, because it relies on pre-built binaries.
Download a binary for your platform from the latest GitHub release, and put it into a directory on your PATH.