Forrest logo
tool overview
On this page you find all important commands for the CLI tool spctl. If the command you are looking for is missing please ask our AI.

spctl

The spctl command line tool in macOS is used to manage and manipulate the Gatekeeper security feature. Gatekeeper is designed to prevent the execution of malicious software downloaded from the internet.

With spctl, users can evaluate and verify the digital signature of an application or package, which helps determine its authenticity. This tool allows users to check the source of the software and verify if it has been tampered with or altered.

The spctl tool allows users to enable or disable Gatekeeper, thus controlling the types of applications that can be installed on their Mac. Users can also set various security levels, such as allowing apps only from the Mac App Store or those that are signed by identified developers.

The spctl command can also be used to add custom rules to Gatekeeper, allowing users to create exceptions for specific applications. This can be useful for developers or users who frequently work with non-certified or self-signed applications.

Additionally, spctl can be used to retrieve information about an application, such as its Team Identifier or designated requirement, which defines the necessary conditions for the app to run on a system. These details can aid in troubleshooting or identifying compatibility issues.

Overall, the spctl command line tool is a powerful utility that enables users to manage the Gatekeeper security feature on macOS, providing control and protection against potentially malicious applications.

List of commands for spctl:

  • spctl:tldr:0e847 spctl: Add a rule to allow an application to run (labeling of rule is optional).
    $ spctl --add --label ${rule_name} ${filename}
    try on your machine
    explain this command
  • spctl:tldr:6ab6c spctl: Turn on Gatekeeper.
    $ spctl --master-enable
    try on your machine
    explain this command
  • spctl:tldr:99256 spctl: Turn off Gatekeeper.
    $ spctl --master-disable
    try on your machine
    explain this command
  • spctl:tldr:b797d spctl: List all rules on the system.
    $ spctl --list
    try on your machine
    explain this command
tool overview