hammerspoon2-docs
    Preparing search index...

    Function set

    • Store a secret, replacing any secret already stored for the same service and account.

      Parameters

      • service: string

        What the secret is for, such as a host name or a Spoon's name. Can't be empty.

      • account: string

        Whose secret it is, such as a user name. Can't be empty.

      • secret: string

        The secret itself

      • Optionaloptions:
            | {
                comment?: string;
                label?: string;
                requireUserPresence?: boolean;
                synchronizable?: boolean;
            }
            | null

        How to store the secret

        • {
              comment?: string;
              label?: string;
              requireUserPresence?: boolean;
              synchronizable?: boolean;
          }
          • Optionalcomment?: string

            A note about the secret, shown by items()

          • Optionallabel?: string

            A name for the secret, shown by items()

          • OptionalrequireUserPresence?: boolean

            Ask you to authenticate (with Touch ID, an Apple Watch, or your password) each time the secret is read. Such secrets aren't listed by items(), but can be replaced and removed without authenticating. Defaults to false.

          • Optionalsynchronizable?: boolean

            Sync the secret to your other Macs through iCloud Keychain. Defaults to false. Can't be combined with requireUserPresence.

        • null

      Returns void

      Throws an Error on failure; wrap calls in try/catch to handle it.