
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
A small iMessage sender for Go on macOS. It sends text and attachments via AppleScript and keeps the API minimal and stable.
go get xoba.com/imsg
Send text:
package main
import "xoba.com/imsg"
func main() {
_ = imsg.SendText("+12025550123", "Hello from Go")
}
Send a file:
package main
import "xoba.com/imsg"
func main() {
_ = imsg.SendFile("+12025550123", "/path/to/video.mp4")
}
Send both text and attachments:
package main
import "xoba.com/imsg"
func main() {
_ = imsg.Send("+12025550123", imsg.Message{
Text: "check this out",
Attachments: []string{
"/path/to/image.png",
"/path/to/video.mp4",
},
})
}
Look up chat IDs by name, then send to the chat ID:
package main
import (
"log"
"xoba.com/imsg"
)
func main() {
chatIDs, err := imsg.LookupChatIDsByName("stonks")
if err != nil {
log.Fatal(err)
}
if len(chatIDs) == 0 {
log.Fatal("no matching chats")
}
_ = imsg.SendChatID(chatIDs[0], imsg.Message{
Text: "hello group",
})
}
Send directly with a known chat ID:
package main
import "xoba.com/imsg"
func main() {
_ = imsg.SendChatID("iMessage;+;chat1234567890", imsg.Message{
Text: "hello group",
})
}
Send a file to a group chat:
package main
import "xoba.com/imsg"
func main() {
_ = imsg.SendChatID("iMessage;+;chat1234567890", imsg.Message{
Text: "see attached",
Attachments: []string{
"/path/to/file.pdf",
},
})
}
A simple sender lives in cmd/send-demo:
go run ./cmd/send-demo -to "+12025550123" -text "hello" -file "/path/to/file.png"
Lookup chat IDs by name:
go run ./cmd/lookup-demo -name "project team"
Example output:
iMessage;+;chat1234567890
Send to a chat ID:
go run ./cmd/send-chat-demo -chat-id "iMessage;+;chat1234567890" -text "hello group"
LookupChatIDsByName (Privacy & Security -> Full Disk Access)Attachments outside ~/Pictures, ~/Downloads, or ~/Documents are copied to a temporary file in ~/Pictures so Messages can access them. The temporary file is deleted after the send completes.
MessageClient (fields: ScriptTimeout, Debug; methods: Send, SendText, SendFile, SendFiles, SendChatID)Option, NewClient, DefaultClient, WithTimeout, WithDebugSend, SendText, SendFile, SendFiles, SendChatIDLookupChatIDsByNameErrUnsupportedOS, ErrMissingRecipient, ErrMissingChatID, ErrMissingChatName, ErrEmptyMessage, ErrScriptTimeout, ErrAttachmentPathEmpty, ErrAttachmentIsDirectory, ErrUnsupportedTildePathThe library generates AppleScript that targets Messages.app and executes it with osascript. This is the standard automation approach on macOS for sending iMessage content.
MIT
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.