hkcli v0.4.1

Start

Quickstart#

1. Install#

go install github.com/vinaycodeaxe/hkcli/cmd/hkcli@latest
hkcli --version

No Go? Download the file for your system from the latest release; see Install.

hkcli auth

auth prints a QR code. On your phone, open Hike, go to Settings > Web QR Login, and scan it. Once the phone confirms, hkcli saves the login and downloads your chats and recent messages.

If the code does not scan, run hkcli auth --qr-format png to open it as an image, or log in with an SMS code: hkcli auth --phone +919876543210. More on Auth. Later, do not log this account out of the Hike app: that logs hkcli out too (see gotchas).

3. Look around#

hkcli chats list
hkcli messages list --chat Asha
hkcli messages search "lunch"

--chat takes a name, a phone number with country code, or the id shown by chats list.

4. Send a message#

hkcli send text --to Asha --message "hi from the terminal"
hkcli send file --to Asha --file ./notes.pdf --caption "notes"

See Send for replies, piped text and how recipients are matched.

5. Keep it up to date#

hkcli sync

sync catches up, then stays connected and saves new messages until you press Ctrl+C. For a one-off catch-up use hkcli sync --once. To run it all the time, see Run sync as a service.

6. Use it from scripts and agents#

hkcli --json chats list --unread
hkcli --read-only messages search "invoice" --json
HKCLI_READONLY=1 hkcli send text --to Asha --message "x"   # refused

Every command accepts --json. See Commands for the output format and exit codes, and OpenClaw to give your agent access.

Edit this page on GitHub