Apache License 2.0

项目介绍

ZekeSnider/Jared 是一个托管在 GitHub 上的开源项目,主要使用 Swift 编写,采用 Apache License 2.0 许可证,目前获得 584 个 Star、62 次 Fork。

仓库全名
ZekeSnider/Jared
开源许可证
Apache License 2.0
Star 数
584
Fork 数
62
未关闭 Issue
25

README 摘要

Download Links Please check out the release page for an up to date pre-compiled download. What is Jared? A powerful and easily extensible iMessage bot. It makes it possible to add chat bot features to any iMessage conversation. It includes some basic commands built in. API integrations, games, custom emotes, and much more can be added by using webhooks, the REST API, or by installing plugins. Any pull requests and…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Jared 用什么语言开发?

主要使用 Swift 编写,采用 Apache License 2.0 许可证,目前有 584 个 Star。

Jared 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 Jared 的源码?

可以直接克隆仓库:git clone https://github.com/ZekeSnider/Jared.git,默认分支为 master;安装与运行步骤见仓库 README。

Jared 最近还在维护吗?

仓库最近一次更新为 2023年4月25日,当前有 25 个未关闭 Issue;Star 数为 584,可作为社区活跃度的参考。

关于

An easily extensible chat bot for iMessage written in Swift.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
719
价值分
368
活跃状态
活跃

语言占比

Objective-C
Swift

Release

README

Build Status Carthage compatible Swift 5.0

Jared - An iMessage chat bot

Please check out the release page for an up to date pre-compiled download.

What is Jared?

A powerful and easily extensible iMessage bot. It makes it possible to add chat bot features to any iMessage conversation. It includes some basic commands built in. API integrations, games, custom emotes, and much more can be added by using webhooks, the REST API, or by installing plugins.

Jared usage screenshot

Any pull requests and new GitHub issues are much appreciated! If you would like to develop a plugin for Jared, see the plugin section below. I’m always available on Twitter if you have any ideas/suggestions.

Installation

Jared Main Window

Jared must be run a machine running macOS with an active messages account logged in. It has only been tested on 10.14 Mojave and later. It may work on old versions of macOS but this is not guaranteed as there may have been changes to the message database’s schema. If you don’t want Jared posting as you, it is recommended that you create a new Apple ID and user account on your mac, and run it in the background under that user. That way it’s not using your main Apple ID.

  1. Download Jared.app and move it to the applications folder.

See download section at the top.

  1. Run Jared.app, Allow Jared “Full Disk Access” in System Preferences.

This is required because of macOS permissions that limit access to the messages database.

  1. Grant access to automate Messages

If you are running macOS Catalina or later, you will need to allow Jared access to automate the message app. This allows Jared to send messages.

  1. (Optional) Allow contacts access

You can optionally allow Jared access to your contacts so that it can provide and update names of contacts. The contacts are used to set/retrieve names only.

  1. (Optional) Start REST API server

If you wish to use the REST API, you will need to enable it. If you have a firewall enabled on your mac, you will see a dialog prompting you to allow Jared access to the port it is binding.

Built in commands

For reference, here is a list of the commands built in to Jared. Because functionality can be added with plugins, the built in functionality is kept light.

  • /help: Lists all commands. /help,[command name] will give you information on a specific route.
  • /reload: Reload plugins
  • /enable: Enables Jared
  • /disable: Disables Jared
  • /ping: Check if the chat bot is available
  • /version: Get the version of Jared running
  • /send: Send a message repeatedly
  • /schedule: Schedule messages
  • /name: Change what Jared calls you
  • /whoami: Get your name
  • /barf: Returns a json representation of your message, used for debugging
  • Thank you Jared: Thanks Jared

Configuration

A configuration file is located at ~/Library/Application Support/Jared/config.json which allows you to:

  • Configure webhooks
  • Set REST API port
  • Disable specific routes

See config-sample.json for an example.

Extensions

Jared Provides a variety of APIs to allow you to easily add your own commands, automate messages, and more. For all API documentation, see the documentation hub.

Plugins

Additional routes can be added via modularized plugins, written in native Swift code. Plugins are loaded dynamically from the ~/Library/Application Support/Jared/Plugins folder. To install a module, drag it in there and then send /reload to Jared, or click Reload Plugins in the UI.

For more information on developing your own plugins, see the plugin documentation. If you developed any plugins, please contact me a link so I can add a link here! I will be working on a few extra modules of my own as well, and will add them here when they are complete.

Webhooks

Jared supports webhooks for sending your server information about incoming and outgoing messages. Your server can respond to these requests to send messages, or use the REST API to send messages at any time. To configure webhooks, add them to the config.json mentioned above. For more info on the webhooks API, check out the webhook documentation.

REST API

Jared contains a web server with a REST API that can be enabled. This allows you make HTTP requests to send messages to any recipient. For more information, check out the REST API documentation.

How Jared works

Jared reads from the Messages database on a set interval and queries for new messages. It provides a routing framework for actioning on messages, and uses AppleScript to send outgoing messages. It’s also multi-threaded so it can take care of multiple requests at once. Jared allows expansion via .bundle plugin files, webhooks, and a REST API. This allows commands to be added without modifying the main Jared code base.

I’ve tried using private APIs such as MessagesKit to send/receive messages to no avail so far. If you have any leads on this front I’d love to hear about it.

评论

暂无评论