GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fedify-dev/botkit: A framework for creating ActivityPub bots

BranchesTags
Open more actions menu

Latest commit

 

History

559 Commits
559 Commits

Folders and files

NameName
Last commit message
Last commit date
.agents/skills/sacho
.agents/skills/sacho
 
 
.github
.github
 
 
.vscode
.vscode
 
 
changes.d
changes.d
 
 
docs
docs
 
 
examples
examples
 
 
packages
packages
 
 
scripts
scripts
 
 
.cursorrules
.cursorrules
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.hongdown.toml
.hongdown.toml
 
 
.windsurfrules
.windsurfrules
 
 
AGENTS.md
AGENTS.md
 
 
AI_POLICY.md
AI_POLICY.md
 
 
CHANGES.md
CHANGES.md
 
 
CLAUDE.md
CLAUDE.md
 
 
DESIGN.md
DESIGN.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
codecov.yaml
codecov.yaml
 
 
deno.json
deno.json
 
 
deno.lock
deno.lock
 
 
logo.svg
logo.svg
 
 
mise.toml
mise.toml
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
sacho.toml
sacho.toml
 
 
skills-lock.json
skills-lock.json
 
 

Repository files navigation

BotKit by Fedify

BotKit by Fedify

JSR npm GitHub Actions Codecov Fediverse

BotKit is a framework for creating ActivityPub bots. It is powered by Fedify, a lower-level library for creating ActivityPub server applications. Unlike Mastodon bots, BotKit is designed to create a standalone ActivityPub bot, which is a complete ActivityPub server in itself and not limited to Mastodon's capabilities (such as the 500-character limit per post).

BotKit's API is so simple and easy to use that you can create a complete bot in a single TypeScript file. Here's an example of a simple bot that just greets:

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot<void>({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the display name:
  name: "Greet Bot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  summary: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@[email protected]")}.`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.onMention = async (session, message) => {
  await message.reply(text`Hi, ${message.actor}!`);
};

// Or, a bot also can actively publish a post:
const session = bot.getSession("https://mydomain/");
setInterval(async () => {
  await session.publish(text`Hi, folks! It's an hourly greeting.`);
}, 1000 * 60 * 60);

export default bot;

For more information, see the BotKit docs.

About

A framework for creating ActivityPub bots

botkit.fedify.dev/

Topics

activitypubbotfedifyfediversehacktoberfest

Resources

Readme
AGPL-3.0 license

Security policy

Security policy
Activity
Custom properties

Stars

108 stars

Watchers

4 watching

Forks

11 forks
Report repository

Releases

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.