Impro Plugins #
Impro includes an Obsidian-style plugin system to enable extra functionality. You can find an example plugin here: https://github.com/improsocial/impro-sample-plugin.
Local development #
To develop a plugin locally:
- Clone and run Impro locally
- Fork the sample plugin (linked above) and clone it locally
- Symlink your plugin directory into the local plugins directory:
ln -s /path/to/my_plugin_dir /path/to/impro/plugins-local/my_plugin_dir
Your plugin should now appear in the "Community Plugins" page: http://localhost:8080/settings/plugins/community
- Watch for changes with
npm start
Publishing a plugin #
To publish a plugin version, tag a commit with the version number (e.g. "0.1.0", no v) and push it to a public GitHub or Tangled repository. To include your plugin in the Community Plugins listing, make a pull request to https://github.com/improsocial/impro-releases with the plugin info.
API surface #
Autogenerated documentation for the plugin SDK can be found here.
Plugins are currently in beta as the API surface is being expanded. However, here are some basic guidelines about what plugins can do:
Plugins CAN: #
- Inject custom CSS
- Add context menu and sidebar items
- Open modals and toasts with custom content
- Add a settings panel to manage their settings
- Store settings on a user account
- Override component rendering with custom HTML (e.g. posts, profiles, badges etc) [in-progress]
- Add a full page with custom HTML content [in-progress]
- Add custom feed filters
- Transform rich text in posts
- Make whitelisted network requests (requires permissions)
- Read appview data with the current user as the viewer (profiles, posts, etc.)
- Query a backlink index for records that link to a subject (e.g. list members, replies)
- Mute, block, or send feed feedback ("show more/less like this") on the user's behalf (requires permissions)
- Store private plugin data on a user's account (shared across devices) or in local storage
Plugins CANNOT: #
- Make arbitrary network requests
- Read or modify page HTML directly
If there's a use case you'd like Impro to support that it doesn't currently, please open an issue in this repository to discuss!