How can I run shortcuts via the terminal instead of using keys in hamerspoon?

I am writing in the init.lua script.

function openObsidianAndSearch()
    -- Open Obsidian
    -- Wait for a moment to ensure Obsidian has focus
    hs.timer.doAfter(1, function()
        -- Send Cmd+Shift+F to Obsidian
        hs.eventtap.keyStroke({"cmd", "shift"}, "F")

I want to run it from the terminal.

hs -c 'openObsidianAndSearch()'
fish: Unknown command: hs

I installed Hammerspoon by brew install --cask hammerspoon.

Oddly enough, my reply on this other thread just now feels relevant here. Take a look at using Obsidian’s URL scheme, or perhaps looking at one of the enhanced URL scheme plugins which extend what is possible via a URL call.