Make src-cli installable via npm
Created by: olafurpg
The Code Intel team is soon announcing two precise language indexers (TypeScript and Python) that will be installed via npm. To simplify CI installation, it would be nice if users of those indexers can also install src-cli via npm instead of via curl
commands. Installing src-cli via npm also makes it easier for users to update to the latest src-cli version.
- https://www.npmjs.com/package/tree-sitter-cli Rust binary that's downloaded as a post-install hook. The benefit of this approach is that users only install one binary that's compatible with their OS/CPU.
- https://www.npmjs.com/package/@bazel/bazelisk Go binary that's embedded with the npm package. The downside of this approach is that users download multiple binaries for all supported OS/CPU.
I propose we use the same approach as tree-sitter-cli.
Related Slack conversation https://sourcegraph.slack.com/archives/C07KZF47K/p1653896066944809