Installation
Install CForge on your system.
Quick Install
Windows (PowerShell)
irm https://raw.githubusercontent.com/ChaseSunstrom/cforge/master/scripts/install.ps1 | iex
macOS / Linux
curl -sSL https://raw.githubusercontent.com/ChaseSunstrom/cforge/master/scripts/install.sh | bash
Manual Installation
From Source
# Clone the repository
git clone https://github.com/ChaseSunstrom/cforge.git
cd cforge
# Build with CMake
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
# Install (may require sudo on Linux/macOS)
cmake --install build
From Releases
- Download the latest release from GitHub Releases
- Extract the archive
- Add the
bindirectory to your PATH
Prerequisites
Required
- CMake 3.16 or later
- C++ Compiler with C++17 support:
- Windows: MSVC (Visual Studio 2019+) or MinGW-w64
- macOS: Clang (Xcode Command Line Tools)
- Linux: GCC 8+ or Clang 7+
Optional
- vcpkg - For package management (CForge can bootstrap this automatically)
- Ninja - Faster builds than Make
- clang-format - For
cforge fmtcommand - clang-tidy - For
cforge lintcommand - Doxygen - For
cforge doccommand
Verify Installation
cforge version
Expected output:
cforge 3.1.0
Shell Completions
Enable tab completion for your shell:
Bash
cforge completions bash > ~/.local/share/bash-completion/completions/cforge
Zsh
cforge completions zsh > ~/.zfunc/_cforge
# Add to .zshrc: fpath+=~/.zfunc
PowerShell
cforge completions powershell >> $PROFILE
Fish
cforge completions fish > ~/.config/fish/completions/cforge.fish
Upgrading CForge
Using the Upgrade Command
The easiest way to update cforge to the latest version:
cforge upgrade
This will automatically download, build, and install the latest version.
Using Install Script
Alternatively, run the install script again:
# Linux/macOS
curl -sSL https://raw.githubusercontent.com/ChaseSunstrom/cforge/master/scripts/install.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/ChaseSunstrom/cforge/master/scripts/install.ps1 | iex
From Source
cd cforge
git pull
cmake --build build --config Release
cmake --install build
Uninstalling
Linux/macOS
# Remove binary and data
rm -rf ~/.local/share/cforge
rm -rf ~/.config/cforge
# If installed to /usr/local
rm -f /usr/local/bin/cforge
Windows
# Remove cforge directory (includes binary and cache)
Remove-Item "$env:LOCALAPPDATA\cforge" -Recurse -Force
Data Locations
CForge stores all data in a single location per platform:
Windows: %LOCALAPPDATA%\cforge\
installed\cforge\bin\cforge.exe- Binarycache\- Binary cache for dependenciesregistry\- Package registry index
Linux/macOS: ~/.local/share/cforge/
installed/cforge/bin/cforge- Binarycache/- Binary cacheregistry/- Package registry
Config: ~/.config/cforge/config.toml (Linux/macOS)
Troubleshooting
If installation fails:
- Ensure CMake is installed:
cmake --version - Ensure a C++ compiler is available:
g++ --versionorcl - Check Troubleshooting for common issues
- File an issue on GitHub