Installation
We provide two versions of Context Generator:
- a native binary
- a PHAR file.
The native binary is the recommended version, because it does not require PHP to be installed on your system. You can use it on Linux and MacOS.
The PHAR file can be used on any system with PHP 8.2 or higher.
Using bash (Recommended)
Requirements
- Linux,
- MacOS
- or Windows with or without WSL
The easiest way to install Context Generator is by using our installation script. This automatically downloads the latest version and sets it up for immediate use.
# Install to /usr/local/bin (will be added to PATH in most Linux distributions)
curl -sSL https://raw.githubusercontent.com/context-hub/generator/main/download-latest.sh | shWhat the script does
- Detects the latest version
- Downloads the binary file from GitHub releases
- Installs it (
ctx) to your bin directory (default:/usr/local/bin) - Makes it executable
If you install to a system directory like /usr/local/bin, you probably need sudo:
curl -sSL https://raw.githubusercontent.com/context-hub/generator/main/download-latest.sh | sudo shNote: When using
sudo, to run the script, you may need usesudoto run thectxcommand as well.
Install to a custom path to avoid using sudo:
curl -sSL https://raw.githubusercontent.com/context-hub/generator/main/download-latest.sh | sh -s $HOME/.local/binAfter installation, you can use it by simply running the command to generate context:
ctxPHAR File
If you prefer to use a PHAR file, you can download the latest version from the GitHub releases page
Requirements
- PHP 8.2 or higher