Run a camera command as npx darkgrade camera <command>: it opens the camera, does one thing and closes it. Run the commands from This computer on as npx darkgrade <command>. Required inputs come in order; the rest are flags.
Every camera command also takes --camera VID:PID, to choose between several cameras, and --json, written after the command, plus the global flags. --duration takes 10s, 2m or 1h, from 1 second to 24 hours; a bare number is seconds. A value that starts with -, such as an exposure compensation of -1.0, is read as a flag and cannot be passed today. Output and scripting covers --json, --output and the commands that hold.
On a Mac, if a command fails with an access or busy error, see If a ready camera will not open.
Connection
| Command | Does |
|---|---|
connect | Connect. Open the camera. Flags: --[no-]observe-only |
get-info | Camera info. Make, model, firmware and connection. |
get-capabilities | What the camera can do. Every setting, its choices, and what works right now. |
set-control <id> <value> | Set any setting. Change a setting by its id. Flags: --frames-per-second <number> |
recover | Recover a stuck camera. Bring back a camera that stopped answering. Flags: --step-timeout-milliseconds <number>, --wait-for-device-milliseconds <number>, --[no-]allow-port-reset |
disconnect | Disconnect. Close the camera and put it back as it was. |
connect and disconnect exist to match Slate: every other command connects and disconnects by itself. To list cameras without opening one, use cameras. recover exits 0 whether or not the camera came back: read recovered in its result.
Exposure
| Command | Does |
|---|---|
get-exposure-modeset-exposure-mode <value> | Read or set Exposure mode. |
get-shutter-speedset-shutter-speed <value> | Read or set Shutter speed. |
get-apertureset-aperture <value> | Read or set Aperture. |
get-isoset-iso <value> | Read or set ISO. |
get-exposure-compensationset-exposure-compensation <value> | Read or set Exposure compensation. |
get-metering-modeset-metering-mode <value> | Read or set Metering. |
Focus
| Command | Does |
|---|---|
autofocus | Autofocus. Focus once and say whether it locked. |
set-focus-point <x> <y> | Focus on a point. Focus on a spot in the frame. Flags: --[no-]autofocus |
reset-focus-point | Reset the focus point. Put the focus point back in the centre. |
nudge-focus <near|far> <small|medium|large> | Nudge manual focus. Step focus nearer or farther. |
get-focus-modeset-focus-mode <value> | Read or set Focus mode. |
get-focus-areaset-focus-area <value> | Read or set Focus area. |
get-subject-detectionset-subject-detection <On|Off> | Read or set Subject detection. |
get-detection-subjectset-detection-subject <value> | Read or set Detection subject. |
get-eye-selectionset-eye-selection <Auto|Off|Right|Left> | Read or set Eye selection. |
get-continuous-autofocusset-continuous-autofocus <On|Off> | Read or set Continuous AF. |
Zoom and stabilisation
| Command | Does |
|---|---|
zoom-to <focal-length-millimetres> | Zoom to a focal length. Go to 35 mm, for example. |
start-zoom <in|out> <slow|medium|fast> | Start zooming. Zoom in or out until stopped. Flags: --duration <duration> |
stop-zoom | Stop zooming. Stop the zoom. |
get-digital-zoomset-digital-zoom <value> | Read or set Digital zoom. |
get-image-stabilizationset-image-stabilization <value> | Read or set Image stabilisation. |
Photos
| Command | Does |
|---|---|
take-photo | Take a photo. Take one photo and get its file name. Flags: --[no-]autofocus, --destination (card, computer, computerOnly), --[no-]download, --raw-compression (Compressed, Lossless, High efficiency★, High efficiency), --[no-]include-info, --output <path> |
get-drive-modeset-drive-mode <value> | Read or set Drive mode. |
get-shutter-typeset-shutter-type <value> | Read or set Shutter type. |
get-flash-modeset-flash-mode <value> | Read or set Flash. |
get-photo-formatset-photo-format <value> | Read or set Photo format. |
get-photo-sizeset-photo-size <value> | Read or set Photo size. |
get-aspect-ratioset-aspect-ratio <value> | Read or set Aspect ratio. |
get-jpeg-qualityset-jpeg-quality <value> | Read or set JPEG quality. |
get-raw-compressionset-raw-compression <value> | Read or set RAW compression. |
Live view
| Command | Does |
|---|---|
get-live-view-frame | Read a live-view frame. The current picture, as a JPEG. Flags: --[no-]overlay, --output <path> |
get-live-view-qualityset-live-view-quality <Low|Medium|High> | Read or set Live-view quality. |
Video
| Command | Does |
|---|---|
start-recording | Start recording. Start a video recording. Flags: --duration <duration> |
stop-recording | Stop recording. Stop and get the finished clip. |
get-recording-state | Recording state. Whether the camera is recording. |
get-photo-video-modeset-photo-video-mode <photo|video> | Read or set Photo / video. |
get-video-formatset-video-format <value> | Read or set Video format. |
get-video-qualityset-video-quality <value> | Read or set Video quality. |
get-frame-rateset-frame-rate <value> | Read or set Frame rate. |
get-audio-recordingset-audio-recording <value> | Read or set Audio recording. |
get-audio-levelset-audio-level <value> | Read or set Audio level. |
Colour and look
| Command | Does |
|---|---|
get-white-balanceset-white-balance <value> | Read or set White balance. |
get-color-temperatureset-color-temperature <value> | Read or set Colour temperature. |
get-picture-styleset-picture-style <value> | Read or set Look. |
get-picture-profileset-picture-profile <value> | Read or set Picture profile. |
Card and files
| Command | Does |
|---|---|
get-card-status | Card space. Free space, photos and recording time left. |
list-media | List photos and clips. The photos and clips on the card, newest first. |
get-media-preview <id> | Preview a file. A small JPEG of a photo or clip. Flags: --size (thumbnail, preview), --output <path> |
download-media <id> | Download a file. Copy a photo or clip off the card. Flags: --output <path> |
Battery and clock
| Command | Does |
|---|---|
get-battery | Battery. Charge, minutes left and power source. |
set-clock | Set the clock. Set the camera's date and time. Flags: --moment <ISO 8601> |
Events
watch is a camera command too: run it as npx darkgrade camera watch. Events shows the same on every product.
| Command | Does |
|---|---|
watch | Print a line each time a setting changes on the camera or a new photo or clip lands, until Ctrl-C or --duration. With --json, each line is {"event": …, "at": …}. Watch for eventsFlags: --duration <duration> |
AI apps
| Command | Does |
|---|---|
mcp | Serve the camera tools to an AI app over MCP. Serve your camera to an AI app Flags: --camera <VID:PID>, --output <folder> |
This computer
| Command | Does |
|---|---|
cameras | List the cameras attached over USB. List cameras Flags: --json |
doctor | Check this computer and any attached camera. Check your setup Flags: --json |
Diagnostics sharing
Benchmark and sharing explains each of these.
| Command | Does |
|---|---|
telemetry benchmark | Run every check on the attached camera. Benchmark your camera Flags: --camera <VID:PID>, --no-photo, --no-live-view, --json |
telemetry status | Show the sharing preference. See the sharing preference Flags: --email, --json |
telemetry opt-in | Share diagnostics. Turn sharing off or on |
telemetry opt-out | Stop sharing diagnostics. Turn sharing off or on |
telemetry delete | Turn sharing off and delete what was shared. Delete what was shared Flags: -y, --yes |
telemetry whoami | Print your diagnostic ID. Your diagnostic ID |
telemetry login <email> | Link an email to your contributions. Link an email |
telemetry logout | Remove the linked email. Link an email |
Shell
| Command | Does |
|---|---|
completions <bash|zsh|fish> | Print a shell completion script. Tab completion |
man | Open the manual page. The manual page |
help [command] | Show help for a command. Get help in the terminal |
version | Print the version. Run or install Flags: --json |