API Docs

Module for accessing information about the Hammerspoon application itself

Properties

hs.appinfo.appName

string
The application's internal name (e.g., "Hammerspoon 2")

hs.appinfo.displayName

string
The application's display name shown to users

hs.appinfo.version

string
The application's version string (e.g., "2.0.0")

hs.appinfo.minimumOSVersion

string
The minimum macOS version required to run this application

hs.appinfo.bundleIdentifier

string
The application's bundle identifier (e.g., "com.hammerspoon.Hammerspoon-2")

hs.appinfo.bundlePath

string
The filesystem path to the application bundle

hs.appinfo.resourcePath

string
The filesystem path to the application's resource directory

hs.appinfo.configPath

string
The filesystem path to the main Hammerspoon 2 configuration file

hs.appinfo.configDir

string
The filesystem path to the directory Hammerspoon 2 loaded its config from

hs.appinfo.machineName

string
The user-assigned name of this Mac, as shown in System Settings > Sharing

hs.appinfo.pid

number
Hammerspoon 2's Process Identifier (PID)

hs.appinfo.arguments

string[]
The command-line arguments Hammerspoon 2 was launched with

hs.appinfo.environment

{[key: string]: string}
The environment variables Hammerspoon 2 was launched with

hs.appinfo.osVersion

string
The version of macOS Hammerspoon 2 is currently running on (e.g., "Version 26.5.2 (Build 25F84)")

hs.appinfo.osVersionParts

{[key: string]: number}
The version of macOS Hammerspoon 2 is currently running on, broken into its numeric components Keys: `major`, `minor`, `patch`.

hs.appinfo.cpuCount

number
The number of logical CPU cores available on this Mac

hs.appinfo.ramAmount

number
The amount of physical RAM installed on this Mac, in gigabytes

Methods

This module has no methods.