printer
Manage printers via CUPS on macOS (discover, add, print, queue, status, wake).
What this skill does
# Printer (CUPS) Control printers on macOS using built-in CUPS commands. No external CLI needed. ## Discover printers ```bash # Network printers (Bonjour/AirPrint) dns-sd -B _ipp._tcp . 2>/dev/null & sleep 3; kill $! 2>/dev/null # Get printer details (host, port, resource path) dns-sd -L "Printer Name" _ipp._tcp . 2>/dev/null & sleep 3; kill $! 2>/dev/null # CUPS-native discovery lpstat -e # available network destinations lpinfo --include-schemes dnssd -v # dnssd backends # IPP discovery ippfind --timeout 5 ``` ## Add a printer (driverless IPP Everywhere) ```bash # Recommended: driverless queue lpadmin -p MyPrinter -E -v "ipp://printer.local:631/ipp/print" -m everywhere # Set as default lpadmin -d MyPrinter # Enable SNMP supply reporting (toner levels) sudo lpadmin -p MyPrinter -o cupsSNMPSupplies=true ``` ## Print files ```bash lp filename.pdf # to default printer lp -d MyPrinter filename.pdf # specific printer lp -d MyPrinter -n 2 file.pdf # 2 copies lp -d MyPrinter -o sides=two-sided-long-edge file.pdf # duplex lp -d MyPrinter -o media=letter file.pdf lp -d MyPrinter -o ColorModel=Gray file.pdf # grayscale # Print text directly echo "Hello World" | lp -d MyPrinter ``` ## Queue management ```bash # Check status lpstat -p MyPrinter # printer status lpstat -o MyPrinter # queued jobs lpstat -t # everything lpq -P MyPrinter # BSD-style queue view # Cancel jobs cancel JOB_ID cancel -a MyPrinter # cancel all # Enable/disable cupsenable MyPrinter # resume printing cupsdisable MyPrinter # pause printer cupsaccept MyPrinter # accept new jobs cupsreject MyPrinter # reject new jobs ``` ## Printer options ```bash # List available options for a printer lpoptions -p MyPrinter -l # Set default options (per-user) lpoptions -p MyPrinter -o sides=two-sided-long-edge # Set server-side defaults sudo lpadmin -p MyPrinter -o sides-default=two-sided-long-edge ``` ## Status and diagnostics ```bash # IPP status query (detailed) ipptool -t ipp://PRINTER_IP/ipp/print get-printer-attributes.test # Filter for key info ipptool -t ipp://PRINTER_IP/ipp/print get-printer-attributes.test \ | grep -iE 'printer-state|marker|supply|media|error' ``` ## Wake printer from sleep ```bash # IPP poke (usually wakes the printer) ipptool -q -T 5 ipp://PRINTER_IP/ipp/print get-printer-attributes.test # HTTP poke (wakes web UI stack) curl -s -m 5 http://PRINTER_IP/ >/dev/null # TCP connect test nc -zw2 PRINTER_IP 631 ``` ## Keep-alive (prevent deep sleep) ```bash # Poll every 5 minutes (runs in foreground) ipptool -q -T 3 -i 300 ipp://PRINTER_IP/ipp/print get-printer-attributes.test ``` For persistent keep-alive, create a launchd agent. ## Toner levels via SNMP Requires `brew install net-snmp`: ```bash snmpwalk -v2c -c public PRINTER_IP 1.3.6.1.2.1.43.11.1.1 ``` Note: SNMP may be disabled on the printer. Check Remote UI settings. ## Remote UI (web interface) Most network printers expose a web UI at `http://PRINTER_IP/` for: - Sleep/timer settings (Settings > Timer Settings > Auto Sleep Time) - Network protocol config (enable/disable IPP, SNMP, raw 9100) - Consumables status ## Troubleshooting ```bash # Printer stuck/disabled? Re-enable it cupsenable MyPrinter # Check device URI lpstat -v MyPrinter # Remove and re-add printer lpadmin -x MyPrinter lpadmin -p MyPrinter -E -v "ipp://..." -m everywhere # CUPS error log tail -f /var/log/cups/error_log ``` ## Notes - Prefer `ipp://` or `ipps://` URIs over raw 9100 or LPD - `-m everywhere` auto-configures from printer's IPP capabilities - Option names vary by printer; use `lpoptions -l` to discover - Sleep settings are best configured via printer's Remote UI - Auto-sleep (1 min) keeps services alive - print jobs wake the printer automatically - **If the printer is completely unresponsive** (IPP port closed, HTTP timeout), it's likely in deep sleep or powered off. Message the user to check/wake the printer physically.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.