Skip to content

tstrijdhorst/capetown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A keybase.io bot framework

This package is currently in alpha mode. It's fully functional but the API implementation is far from complete. Accepting PRs for further implementation.

This is a small framework for writing keybase.io bots in PHP.

Usage

  • Clone this repo
  • Install the commands you want with composer
  • Add the FQN of the commandclass to EnabledCommands.php
  • (If Necessary) Copy the name.env.dist file from the plugin to config/name.env and fill in the required information
  • Run app/run.php and you are good to go!

You can trigger the commands by sending a message to the bot prefixed with @botname <commandname> (param1 param2 param3 ...).

Architecture

Note

While the author really likes to keep things separate there is nothing from stopping you to implement your plugin in a different way. As long as you implement the CommandInterface and you are able to add the FQN of your command to the app/EnabledCommands.php it will be fine.

For plugin development in might be handy to fork this framework and develop the plugin locally first. An example Command has been provided in app/commands/ExampleCommand.php to illustrate the design further.

The runner (this)

This is where you add the commands you want to enable via composer and run the actual bot with.

This is all the core code that both the runner and all the command plugins depend on. In this way we ensure that both the runner and all the plugins never depend on eachother and each is free to do what they want as long as you implement the CommmandInterface.

Official command plugins

About

Keybase.io Bot Framework in PHP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages