examples/

directory
v0.6.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: MIT

Directories

Path Synopsis
accelerate
matmul command
Command matmul benchmarks matrix multiplication using Apple Accelerate BLAS (cblas_sgemm) versus a naive pure-Go implementation.
Command matmul benchmarks matrix multiplication using Apple Accelerate BLAS (cblas_sgemm) versus a naive pure-Go implementation.
appkit
alert command
Alert shows a native macOS alert dialog from the command line.
Alert shows a native macOS alert dialog from the command line.
alert-dialog command
Command alert-dialog shows the smallest NSAlert example in this tree.
Command alert-dialog shows the smallest NSAlert example in this tree.
counter command
Command counter displays a small AppKit window with a label and two buttons.
Command counter displays a small AppKit window with a label and two buttons.
file-picker command
Command file-picker opens an NSOpenPanel and prints the selected paths.
Command file-picker opens an NSOpenPanel and prints the selected paths.
hello-window command
Command hello-window opens a macOS window with one centered label.
Command hello-window opens a macOS window with one centered label.
menubar-clock command
Command menubar-clock shows the current time in the macOS menu bar.
Command menubar-clock shows the current time in the macOS menu bar.
pbd command
Pbd is a pasteboard tool, an improvement over pbcopy/pbpaste.
Pbd is a pasteboard tool, an improvement over pbcopy/pbpaste.
sf-symbols command
Command sf-symbols shows a small grid of SF Symbols in an AppKit window.
Command sf-symbols shows a small grid of SF Symbols in an AppKit window.
swiftui-host command
Command swiftui-host loads a Swift package that defines SwiftUI content and hosts it inside an AppKit window.
Command swiftui-host loads a Swift package that defines SwiftUI content and hosts it inside an AppKit window.
todo-app command
Command todo-app builds a small multi-window todo list in AppKit.
Command todo-app builds a small multi-window todo list in AppKit.
avfaudio
audiosay command
Command audiosay speaks text using Apple's speech synthesis APIs.
Command audiosay speaks text using Apple's speech synthesis APIs.
escaping-tap-regression command
escaping-tap-regression demonstrates the original use-after-free that motivated applegen's escaping-block classifier (appledocs c09228c541).
escaping-tap-regression demonstrates the original use-after-free that motivated applegen's escaping-block classifier (appledocs c09228c541).
inputtap command
Command inputtap captures audio from the default microphone via AVAudioEngine + tap, resamples it to PCM16 mono at 24 kHz with AVAudioConverter, and prints frame counts and peak amplitude every second.
Command inputtap captures audio from the default microphone via AVAudioEngine + tap, resamples it to PCM16 mono at 24 kHz with AVAudioConverter, and prints frame counts and peak amplitude every second.
speechbuffers command
Command speechbuffers renders an utterance into AVAudioBuffer callbacks.
Command speechbuffers renders an utterance into AVAudioBuffer callbacks.
avfoundation
audiomix command
Command audiomix demonstrates editing audio with AVAudioMix.
Command audiomix demonstrates editing audio with AVAudioMix.
coreimage
imgfilter command
Command imgfilter processes images using Apple's CoreImage framework.
Command imgfilter processes images using Apple's CoreImage framework.
coreml
multiarray-bytes command
Command multiarray-bytes creates an MLMultiArray and reads its backing bytes.
Command multiarray-bytes creates an MLMultiArray and reads its backing bytes.
predict command
Command predict loads a CoreML model and prints its description as JSON.
Command predict loads a CoreML model and prints its description as JSON.
dispatch
parallel-work command
Parallel-work dispatches concurrent tasks using GCD groups and semaphores.
Parallel-work dispatches concurrent tasks using GCD groups and semaphores.
queues command
Command queues demonstrates a serial queue, a group, and a semaphore.
Command queues demonstrates a serial queue, a group, and a semaphore.
foundation
http-fetch command
Command http-fetch downloads a URL with Foundation and prints a short preview.
Command http-fetch downloads a URL with Foundation and prints a short preview.
nsdefaults command
Command nsdefaults reads and writes NSUserDefaults values.
Command nsdefaults reads and writes NSUserDefaults values.
process-info command
Command process-info prints basic details about the current process.
Command process-info prints basic details about the current process.
sysinfo command
Command sysinfo prints system information and optionally lists running applications.
Command sysinfo prints system information and optionally lists running applications.
user-defaults command
Command user-defaults shows a small round-trip through NSUserDefaults.
Command user-defaults shows a small round-trip through NSUserDefaults.
uuid-date command
Command uuid-date prints the current NSDate and a freshly generated NSUUID.
Command uuid-date prints the current NSDate and a freshly generated NSUUID.
hypervisor
hvinfo command
metal
escaping-block-regression command
escaping-block-regression demonstrates an ObjC API pattern that broke before applegen learned to skip `defer block.Release()` for escaping blocks.
escaping-block-regression demonstrates an ObjC API pattern that broke before applegen learned to skip `defer block.Release()` for escaping blocks.
metal4-triangle command
metal4-triangle renders a rotating triangle using the Metal 4 API.
metal4-triangle renders a rotating triangle using the Metal 4 API.
naturallanguage
embedding command
Command embedding computes word distances and nearest neighbors using Apple's NaturalLanguage word embeddings.
Command embedding computes word distances and nearest neighbors using Apple's NaturalLanguage word embeddings.
ngrep command
Command ngrep searches lines for semantic similarity to a query using Apple's NaturalLanguage embeddings — a neural alternative to grep.
Command ngrep searches lines for semantic similarity to a query using Apple's NaturalLanguage embeddings — a neural alternative to grep.
nlp command
Command nlp provides Unix-native text analysis using Apple's NaturalLanguage framework.
Command nlp provides Unix-native text analysis using Apple's NaturalLanguage framework.
nsort command
Command nsort sorts lines by semantic similarity using Apple's NaturalLanguage sentence embeddings — a neural alternative to Unix sort.
Command nsort sorts lines by semantic similarity using Apple's NaturalLanguage sentence embeddings — a neural alternative to Unix sort.
network
txtrecord command
Command txtrecord creates and reads a Network TXT record.
Command txtrecord creates and reads a Network TXT record.
objc
exception-handler command
Exception-handler demonstrates Objective-C exception handling from Go.
Exception-handler demonstrates Objective-C exception handling from Go.
rdma
rdmainfo command
Command rdmainfo probes Apple's RDMA userspace bindings.
Command rdmainfo probes Apple's RDMA userspace bindings.
rdmaperf command
Command rdmaperf measures TCP and RDMA readiness paths.
Command rdmaperf measures TCP and RDMA readiness paths.
screencapturekit
screenshot command
Command screenshot captures a screenshot of a display or window using the ScreenCaptureKit framework and saves it as a PNG file.
Command screenshot captures a screenshot of a display or window using the ScreenCaptureKit framework and saves it as a PNG file.
streamframes command
Command streamframes captures screen frames with SCStreamOutput.
Command streamframes captures screen frames with SCStreamOutput.
windowlist command
Command windowlist enumerates all windows, displays, and running applications using the ScreenCaptureKit framework and outputs the results as JSON.
Command windowlist enumerates all windows, displays, and running applications using the ScreenCaptureKit framework and outputs the results as JSON.
security
auth-dialog command
Command auth-dialog triggers the macOS authentication dialog using LocalAuthentication's LAContext.
Command auth-dialog triggers the macOS authentication dialog using LocalAuthentication's LAContext.
keychain command
Command keychain demonstrates macOS Security framework keychain operations using the generated security and corefoundation bindings.
Command keychain demonstrates macOS Security framework keychain operations using the generated security and corefoundation bindings.
uniformtypeidentifiers
file-types command
Command file-types shows a few common Uniform Type Identifier lookups.
Command file-types shows a few common Uniform Type Identifier lookups.
typeid command
Command typeid resolves Uniform Type Identifiers for file extensions, MIME types, and UTI strings.
Command typeid resolves Uniform Type Identifiers for file extensions, MIME types, and UTI strings.
virtualization
vminfo command
Command vminfo queries Apple Virtualization framework capabilities.
Command vminfo queries Apple Virtualization framework capabilities.
vision
face-detect command
Face-detect uses the Vision framework to detect faces in an image.
Face-detect uses the Vision framework to detect faces in an image.
ocr command
Command ocr extracts text from an image file using the Vision framework.
Command ocr extracts text from an image file using the Vision framework.
screenctx command
Command screenctx captures screen context by combining CGWindowListCopyWindowInfo with Vision OCR to produce an XML map of on-screen text attributed to the owning application.
Command screenctx captures screen context by combining CGWindowListCopyWindowInfo with Vision OCR to produce an XML map of on-screen text attributed to the owning application.
vndetect command
Command vndetect detects objects in images using the Vision framework.
Command vndetect detects objects in images using the Vision framework.
vnocr command
Command vnocr extracts text from images using the Vision framework.
Command vnocr extracts text from images using the Vision framework.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL