Cupholder
:tea: Remote CD tray ejection
Install / Use
/learn @xyproto/CupholderREADME
cupholder
Local or remote CD tray ejection, for Linux.
cupholder can be useful:
- If you have a large server room with many computers with CD trays, this can be used for finding a specific server.
- If you need an example for how to call
ioctlsfrom Go without using C (https://github.com/xyproto/cdrom/blob/main/cd.go).
Usage
cupholder
Or when building a project that takes a while, as a notification utility:
<build command>; cupholder
For specifying a specific device:
cupholder /dev/cdrom
All arguments are treated as device filenames.
Use -s for silent operation and set the NO_COLOR environment variable to disable colors.
Screenshot

Web server
cupholder includes a web server that can be launched with the -l or --listen flag, that lets you eject the CD remotely, just by visiting the HTTP page at port 3280 (3280 = 0x0CD0).

For ejecting the tray using curl, a command like this can then be used:
curl --silent --output /dev/null --write-out '%{http_code}\n' http://localhost:3280/
Replace localhost with the hostname or IP address of the server where cupholder -l is running.
Requirements
- Go 1.18 or later
General info
- Version: 1.2.1
- License: GPL2
- Author: Alexander F. Rødseth <xyproto@archlinux.org>
Related Skills
node-connect
337.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
