https://github.com/jacoblincool/node-regctl
Easily install regctl on macOS, linux, and Windows.
https://github.com/jacoblincool/node-regctl
cli linux macos nodejs regctl windows
Last synced: 2 months ago
JSON representation
Easily install regctl on macOS, linux, and Windows.
- Host: GitHub
- URL: https://github.com/jacoblincool/node-regctl
- Owner: JacobLinCool
- License: mit
- Created: 2022-08-02T21:33:20.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T17:52:03.000Z (over 2 years ago)
- Last Synced: 2025-02-25T16:16:39.035Z (over 1 year ago)
- Topics: cli, linux, macos, nodejs, regctl, windows
- Language: TypeScript
- Homepage: https://jacoblincool.github.io/node-regctl
- Size: 78.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-regctl
Easily install regctl on macOS, linux, and Windows.
Just run one of:
- `pnpm i -g regctl`
- `npm i -g regctl`
- `yarn global add regctl`
> Notice: The version of this package is not related to the version of `regctl` binary.
> This package always tries to use the latest version of `regctl` binary, but you can install a specific version of `regctl` by using `regctl bin install [version]`.
## Usage
You can find the usage of `regctl` here:
Or just try:
```sh
regctl --help
```
### Extra: `bin` subcommand
There is an extra subcommand: `regctl bin`. You can use it to manage the regctl binary version.
```sh
❯ regctl bin --help
regctl bin : Prints the path to the binary
regctl bin remove : Removes the binary
regctl bin install [version] : Installs the binary
regctl bin help : Prints this help message
Examples:
regctl bin install : Installs the latest version of regctl
regctl bin install v0.4.4 : Installs regctl v0.4.4
You can find releases at https://github.com/regclient/regclient/releases
```
## Library Usage
### Binary Path & Install
```js
import { bin, install } from "regctl";
import fs from "node:fs";
import { spawn } from "node:child_process";
if (!fs.existsSync(bin)) {
// install regctl binary
await install(bin);
}
// run regctl
spawn(bin, ["version"], { stdio: "inherit" });
```
- `bin`: The path of the binary.
- `install`: A function that installs the binary to the given path.