Installation
Getting forg onto your system is quick and easy. We provide a one-line installer for most Unix-like systems.
One-Line Install
Run the following command in your terminal to download and install the latest version of forg:
curl -sSL https://raw.githubusercontent.com/Abhijeet-Gautam5702/forg/main/install.sh | bash
This script will:
- Detect your Operating System and Architecture.
- Download the appropriate binary.
- Place it in
~/.local/bin(or/usr/local/binif root).
Verifying Installation
After installation, verify that forg is correctly installed and accessible:
which forg
# output: "/Users/<username>/.local/bin/forg" OR "/usr/local/bin/forg"
forg --version
If you receive a command not found error, you may need to add ~/.local/bin to your PATH.
Adding to PATH (macOS/Linux)
For Zsh (default on macOS):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
For Bash:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Build from Source
Ensure you have Rust and Cargo installed, then clone and build:
git clone https://github.com/Abhijeet-Gautam5702/forg.git
cd forg
cargo build --release
After building, the binary will be located at ./target/release/forg. You can move it to your path manually:
mv ./target/release/forg ~/.local/bin/
Updating
forg can update itself! Simply run:
forg self-update
Alternatively, you can re-run the installation script to overwrite the existing binary with the latest version.
Uninstallation
If you wish to remove forg and its configuration files:
forg uninstall
uninstall command is not available (versions < 0.1.4), you can manually remove the binary and config:
rm $(which forg)
rm -rf ~/.forg