If you have Nix installed and Flakes enabled, just do
nix run github:42LoCo42/getFTBpack <pack ID> <version ID>
Else, install Go and clone & run with these commands:
git clone https://github.com/42LoCo42/getFTBpack
cd getFTBpack
go run . <pack ID> <version ID>
On the FTB website of a pack (example), go to the versions tab and find the ID of the version you want.
To find the pack ID, scroll down a bit until you see the section labelled “Developer / Server Admin”. Here the pack ID and latest release ID are located.