NB: I threw this together in one and a half hours. It is likely that something will blow up if you use it.
A simple CLI interface for managing your GoPro Hero 12.
# List all available devices
gpctl devices
# List all files and directories in the root folder
gpctl ls /
# Download a file from the device
gpctl cp /100GOPRO/GX010008.MP4 /home/user/Downloads/awesome-vid.mp4
# Delete a file from the device
gpctl rm /100GOPRO/GX010008.MP4
# Start webcam mode (must be run with `sudo` and `-u` for now)
gpctl webcam start -u $USER
# Stop webcam mode
gpctl webcam stop
To build the code, you will need to have Go 1.21
or higher installed.
# Install in default location (~/.local/bin/gpctl)
make build && make install
# Use PREFIX to change the install location
make build && make install PREFIX=/usr/local/bin
# Uninstall from default location
make uninstall