Codeforge is a Swift-based command-line tool designed to generate random, unique codes and save them in a CSV file. It is ideal for tasks such as creating promo codes or other bulk code generation needs. Codeforge is highly efficient, capable of generating up to 1,000,000 unique codes in just 3 seconds. This guide will walk you through the steps to install and run Codeforge on your system.
Follow these steps to install Codeforge:
-
Download the Prebuilt Binary: Visit the Codeforge Releases Page on GitHub and download the latest release for your operating system.
-
Install the Executable: After downloading, move the binary to a directory in your PATH for easier access:
mv codeforge /usr/local/bin/codeforge
Note for macOS Users: You might need to grant execute permissions:
chmod +x /usr/local/bin/codeforge
Once installed, you can run Codeforge from the terminal:
codeforgeThe program will prompt you for options and parameters to execute its functionality. The output files will be saved wherever you called codeforge from.
If you encounter a security warning when running the program (e.g., "codeforge cannot be opened because the developer cannot be verified"), follow these steps:
- Open System Preferences > Security & Privacy.
- Under the General tab, you should see a message about
codeforge. Click Allow Anyway. - Re-run the program:
codeforge
If you encounter a "Permission denied" error, ensure the executable has the correct permissions:
chmod +x /usr/local/bin/codeforgeTo remove Codeforge from your system, delete the executable:
rm /usr/local/bin/codeforgeIf you prefer to build Codeforge yourself, clone the repository and use Swift Package Manager (SPM) to build the project:
Before you begin, ensure you have the following installed on your system:
-
Swift: Version 6.0 or higher. You can check your Swift version by running:
swift --version
If Swift is not installed, download it from Swift.org.
-
Git: To clone the repository. Verify installation with:
git --version
-
macOS or Linux: This guide assumes you are using macOS or a Linux distribution. It should compile just fine on a Windows machine, but I have not tested it.
git clone https://github.com/seanmckenzie428/codeforge-cli.git
cd codeforge
swift build -c release
cp .build/release/codeforge /usr/local/bin/codeforgeFor further assistance, please refer to the Swift Documentation or open an issue on the project's GitHub repository.