send / send-file / edit / delete / react / mark-read
Send messages, edit messages, delete messages, add reactions, and mark as read.
LOCO write operations require opt-in
Since v1.1.0, send, delete, edit, and react are disabled by default. Enable with safety.allow_loco_write = true in ~/.config/openkakao/config.toml. Use --dry-run to preview any action without executing.
send
Send a text message via LOCO WRITE command.
openkakao-cli send <chat_id> "message" [OPTIONS]| Flag | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
--force | Allow sending to open chats |
--dry-run | Preview the action without executing |
--me | Send to memo chat (나와의 채팅) — no chat_id needed |
--json | Output result as JSON (global flag) |
When --json is set, a successful send returns:
{"chat_id": 900000000000001, "log_id": 123456789, "status": "sent"}If you use -y, you must also allow unattended send behavior:
- CLI:
--unattended --allow-non-interactive-send - or config:
mode.unattended = trueandsend.allow_non_interactive = true
Unattended sends are rate-limited by safety.min_unattended_send_interval_secs so a bad wrapper cannot burst messages immediately.
Messages are prefixed with 🤖 [Sent via openkakao] by default. Use the global --no-prefix flag to disable:
openkakao-cli --unattended --allow-non-interactive-send --no-prefix send <chat_id> "raw message" -ysend-file
Send a file (photo, video, or document) via LOCO SHIP+POST.
openkakao-cli send-file <chat_id> <file> [OPTIONS]| Flag | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
--force | Allow sending to open chats |
--dry-run | Preview the action without executing |
As with text sends, -y requires unattended send permission.
The media type is auto-detected from file magic bytes:
| Magic Bytes | Type | LOCO Code |
|---|---|---|
FF D8 | JPEG photo | 2 |
89 50 4E 47 | PNG photo | 2 |
GIF8 | GIF animation | 14 |
ftyp (offset 4) | MP4/MOV video | 3 |
1A 45 DF A3 | WebM video | 3 |
| Other | Generic file | 26 |
send-photo
Alias for send-file. Identical behavior.
openkakao-cli --unattended --allow-non-interactive-send send-photo <chat_id> photo.jpg -y| Flag | Description |
|---|---|
--dry-run | Preview the action without executing |
edit
Edit a message via LOCO REWRITE command.
openkakao-cli edit <chat_id> <log_id> "new message" [OPTIONS]| Flag | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
--force | Allow editing in open chats |
--dry-run | Preview the action without executing |
--json | Output result as JSON (global flag) |
When --json is set:
{"chat_id": 900000000000001, "log_id": 123456789, "status": "edited"}As with send, -y requires unattended send permission.
macOS dtype=2 restriction
REWRITE returns error -203 on macOS. This is a server-enforced platform restriction — message editing only works on Android (dtype=1). The command is implemented for future cross-platform support.
delete
Delete a message via LOCO DELETEMSG. The message is replaced by a system feed (feedType:14) in DM chats.
openkakao-cli delete <chat_id> <log_id> [OPTIONS]| Flag | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
--force | Allow deleting in open chats |
--dry-run | Preview the action without executing |
--json | Output result as JSON (global flag) |
When --json is set:
{"chat_id": 900000000000001, "log_id": 123456789, "status": "deleted"}As with send, -y requires unattended send permission (--unattended --allow-non-interactive-send or the equivalent config).
MemoChat limitation
DELETEMSG returns status=0 in MemoChat but the message is not actually deleted on mobile — the message type changes to 16385 instead of being removed.
react
Add a reaction to a message via LOCO ACTION command.
openkakao-cli react <chat_id> <log_id> [OPTIONS]| Flag | Description |
|---|---|
-t, --type <N> | Reaction type (default: 1 = like) |
--dry-run | Preview the action without executing |
--json | Output result as JSON (global flag) |
When --json is set:
{"chat_id": 900000000000001, "log_id": 123456789, "reaction_type": 1, "status": "reacted"}macOS dtype=2 restriction
Only reaction type 1 (like) is supported on macOS. Other types (0, 2–16, 100) return error -203.
dry-run
All write commands support --dry-run to preview the action without making any server call.
openkakao-cli send 123 "hello" --dry-run
# [dry-run] Would send to chat 123: "🤖 [Sent via openkakao] hello"
openkakao-cli delete 123 456 --dry-run --json
# {"dry_run": true, "action": "delete", "chat_id": 123, "log_id": 456}This is safe even without allow_loco_write — no LOCO connection is made.
mark-read
Mark messages as read up to a specific logId via LOCO NOTIREAD. This is a fire-and-forget command — no response is expected from the server.
openkakao-cli mark-read <chat_id> <log_id> [OPTIONS]| Flag | Description |
|---|---|
--json | Output result as JSON (global flag) |
When --json is set:
{"chat_id": 900000000000001, "watermark": 123456789, "status": "marked_read"}