movebin-zig is a small utility to install (move) a local binary into a system directory such as /usr/local/bin.
- Copy a binary to
/usr/local/binand avoid accidental overwrites. - Prompts before overwriting; supports a force flag to skip confirmation.
- Zig (the project uses the included
build.zig). Ensurezigis available on your PATH. - You will generally need elevated privileges (e.g.
sudo) to install into/usr/local/bin.
curl -L https://github.com/tacheraSasi/movebin-zig/releases/download/v0.0.3/movebin-v0.0.3-aarch64-macos.tar.gz -o movebin.tar.gz
sudo tar -C /usr/local/bin -xzf movebin.tar.gz
rm movebin.tar.gzcurl -L https://github.com/tacheraSasi/movebin-zig/releases/download/v0.0.3/movebin-v0.0.3-x86_64-macos.tar.gz -o movebin.tar.gz
sudo tar -C /usr/local/bin -xzf movebin.tar.gz
rm movebin.tar.gzcurl -L https://github.com/tacheraSasi/movebin-zig/releases/download/v0.0.3/movebin-v0.0.3-x86_64-linux.tar.gz -o movebin.tar.gz
sudo tar -C /usr/local/bin -xzf movebin.tar.gz
rm movebin.tar.gzcurl -L https://github.com/tacheraSasi/movebin-zig/releases/download/v0.0.3/movebin-v0.0.3-aarch64-linux.tar.gz -o movebin.tar.gz
sudo tar -C /usr/local/bin -xzf movebin.tar.gz
rm movebin.tar.gzDownload the zip from the latest release, extract movebin.exe, and add it to your PATH.
Or with PowerShell:
Invoke-WebRequest -Uri https://github.com/tacheraSasi/movebin-zig/releases/download/v0.0.3/movebin-v0.0.3-x86_64-windows.zip -OutFile movebin.zip
Expand-Archive movebin.zip -DestinationPath C:\Windows\System32
Remove-Item movebin.zipTo build the project locally:
zig buildThe built executable is placed under zig-out/bin/movebin.
To run the program directly from the build output:
./zig-out/bin/movebin <path/to/binary>Basic usage:
sudo movebin <binary_path> [args...]If a file already exists at the destination the program prompts before overwriting. You can skip the prompt with the force flag:
sudo movebin -f <binary_path>
sudo movebin --force <binary_path>Example:
sudo movebin ./my-tool
# destination will be: /usr/local/bin/my-tool- The project contains helper utilities in
src/utils.zig(for checking file existence, prompting, and handling the-f/--forceflags). build.zigis provided; see it for additional build targets.
- Fork the repository and create a topic branch.
- Make your changes and run
zig build(orzig testif you add tests). - Open a pull request with a clear description of your changes.
This project is licensed under the MIT License - see the LICENSE file for details.