In June 2024, we deprecated our old CLI tool (Node based) and released our new CLI tool (Go based). The reasoning was to drastically improve the developer experience for our CLI and for CI integrations.
A) Windows (via Powershell):
iwr -useb <https://raw.githubusercontent.com/hathora/ci/main/install.ps1> | iex
B) MacOS/Linux (via bash/zsh):
curl -s <https://raw.githubusercontent.com/hathora/ci/main/install.sh> | sh
C) Download raw binaries
amd64 (x86, etc) and arm64 (Apple M-series, etc) platforms supported for Windows/Linux/MacDarwin binaries for MacOShathora (instead of hathora-cloud)hathora-cloud login token, you will need to replace that with one of 2 options:
-t flag with each commandHATHORA_TOKEN, on your build agentsdeploy command flagsThe naming and syntax for command flags have changed slightly for consistency and portability.
hathora-cloud deploy command, then you will want to update to use hathora deploy
Note: You’ll likely want to include the flag --from-latest which was previously default behavior in the old CLI, where the deployment created will default to existing values from the latest deployment version (transport-type, container-port, etc) unless explicitly passed
Example deploy command:
hathora deploy \\
--file $FILE_OR_DIRECTORY \\
--build-tag $BUILD_TAG \\
--rooms-per-process $ROOMS_PER_PROCESS \\
--container-port $CONTAINER_PORT \\
--transport-type $TRANSPORT_TYPE \\
--requested-memory-mb $MEMORY_MB \\
--requested-cpu $CPU \\
--env ENV1=$ENV1_VALUE \\
--env ENV2=$ENV2_VALUE \\
--idle-timeout-enabled $BOOLEAN\\
--app-id $APP_ID \\
--token ${{ secrets.HATHORA_TOKEN }}
Full docs for deploy flags: https://hathora.dev/docs/hathora-cli#deploy-flags
hathora-cloud build and hathora-cloud deployment previously, then you will want to update to use hathora build create and hathora deployment create
Example build create command:
hathora build create \\
--file $FILE_OR_DIRECTORY \\
--build-tag $BUILD_TAG \\
--app-id $APP_ID \\
--token ${{ secrets.HATHORA_TOKEN }}
build flags: https://hathora.dev/docs/hathora-cli#build-flagsExample deployment create command:
--from-latest which was previously default behavior in the old CLI, where the deployment created will default to existing values from the latest deployment version (transport-type, container-port, etc) unless explicitly passedhathora deployment create \\
--build-id $BUILD_ID \\
--rooms-per-process $ROOMS_PER_PROCESS \\
--container-port $CONTAINER_PORT \\
--transport-type $TRANSPORT_TYPE \\
--requested-memory-mb $MEMORY_MB \\
--requested-cpu $CPU \\
--env ENV1=$ENV1_VALUE \\
--env ENV2=$ENV2_VALUE \\
--idle-timeout-enabled $BOOLEAN\\
--app-id $APP_ID \\
--token ${{ secrets.HATHORA_TOKEN }}
deployment flags: https://hathora.dev/docs/hathora-cli#deployment-flags