agentlytics
Comprehensive analytics dashboard for AI coding agents — Cursor, Windsurf, Claude Code, VS Code Copilot, Zed, Antigravi…
Record the screen on macOS
git clone https://github.com/wulkano/Aperture.gitwulkano/ApertureRecord the screen on macOS
Add the following to Package.swift:
.package(url: "https://github.com/wulkano/Aperture", from: "3.0.0")
import Foundation
import Aperture
let recorder = Aperture.Recorder()
let screens = try await Aperture.Devices.screen()
guard let screen = screens.first else {
// No screens
exit(1)
}
try await recorder.start(
target: .screen,
options: Aperture.RecordingOptions(
destination: URL(filePath: "./screen-recording.mp4"),
targetID: screen.id,
)
)
try await Task.sleep(for: .seconds(5))
try await recorder.stop()
destinationType: URL
The filepath where the resulting recording should be written to.
targetIDType: String
The ID of the target to record
losslessAudioType: Bool
Default: false
Will use the lossless ALAC codec if enabled, AAC otherwise.
recordSystemAudioType: Bool
Default: false
Record the system audio.
microphoneDeviceIDType: String?
A microphone device ID to record.
framesPerSecondType: Int
Default: 60
Number of frames per seconds.
showCursorType: Bool
Default: true
Show the cursor in the screen recording.
highlightClicksType: Bool
Default: false
Highlight cursor clicks in the screen recording.
Note: This will only apply on macOS 15+
videoCodecType: Aperture.VideoCodec
Default: .h264
Values: .h264, .hevc, .proRes422, .proRes4444
The video codec to be used.
Use Aeprture.Devices.screen to discover the available screens
And then start recording with target: .screen
try await recorder.start( target: .screen, options: Aperture.RecordingOptions( destination: fileURL, targetID: screen.id, framesPerSecond: 60, cropRect: CGRect(x: 10, y: 10, width: 100, height: 100), showCursor: true, highlightClicks: true, videoCodec: .h264, losslessAudio: true, recordSystemAudio: true, microphoneDeviceID: microphone.id, ) )
Accepts all the base video and audio options along with:
cropRectType: CGRect?
Record only an area of the screen.
Use Aeprture.Devices.window to discover the available windows
And then start recording with target: .window
try await recorder.start( target: .window, options: Aperture.RecordingOptions( destination: fileURL, targetID: window.id, framesPerSecond: 60, showCursor: true, highlightClicks: true, videoCodec: .h264, losslessAudio: true, recordSystemAudio: true, microphoneDeviceID: microphone.id, ) )
Accepts all the base video and audio options
Use Aeprture.Devices.audio to discover the available audio devices
And then start recording with target: .audioOnly
try await recorder.start( target: .audioOnly, options: Aperture.RecordingOptions( destination: fileURL, losslessAudio: true, recordSystemAudio: true, microphoneDeviceID: microphone.id, ) )
Accepts all the base audio options.
Use Aeprture.Devices.iOS to discover the available external devices
And then start recording with target: .externalDevice
try await recorder.start( target: .externalDevice, options: Aperture.RecordingOptions( destination: fileURL, targetID: device.id, framesPerSecond: 60, videoCodec: .h264, losslessAudio: true, recordSystemAudio: true, microphoneDeviceID: microphone.id, ) )
Accepts the base video options except for cursor related ones, and all the audio options.
let screens = try await Aperture.Devices.screen()
let windows = try await Aperture.Devices.window(excludeDesktopWindows: true, onScreenWindowsOnly: true)
excludeDesktopWindowsType: Bool
Default: true
onScreenWindowsOnlyType: Bool
Default: true
let devices = Aperture.Devices.audio()
let devices = Aperture.Devices.iOS()
Run ./example.sh or ./example-ios.sh.
more like this
Comprehensive analytics dashboard for AI coding agents — Cursor, Windsurf, Claude Code, VS Code Copilot, Zed, Antigravi…
Free open-source Cloudflare R2 desktop client and S3 GUI for macOS, Windows, and Linux. Manage Cloudflare R2, AWS S3, M…
Interactively take screenshots and record video captures with Sway.
search projects, people, and tags