- Feel free to open issues and submit pull requests.
- See Open source etiquette for general guidelines.
- By contributing, you agree that your contributions will be dual-licensed under MPL-2.0 OR GPL-3.0-or-later.
- Ghostbird is a Thunderbird add-on that allows you to edit email text in your favorite text editor using the GhostText protocol.
- It works by connecting to a GhostText server (listening on port 4001 by default) via WebSocket and relaying messages between the compose window and the server.
- You can find a sequence diagram in
doc/design.md.
You need at least the following:
- Git
- Thunderbird
- Node.js LTS (v22.18.0 as of writing) or a compatible one that can run Yarn
- Your favorite code editor (e.g., VSCodium)
- a GitHub account*
Running yarn will fetch the rest of JS tools.
* If you don't like GitHub, we have mirrors on Codeberg and GitLab, although it may not be as up-to-date. Try pinging by raising an issue on one of those platforms.
- If the edit doesn't touch the code, you can skip the build and test steps below.
- You can just edit the file on the GitHub website and create a PR.
- Pick a task from our project board or add your own issue.
- Pinging maintainers on the issue page or the discussion page is a good practice.
- Submitting PRs directly to start a discussion is also fine.
- Fork the repo.
- Clone your forked repo and
cdinto it. - Install Yarn by
corepack install && corepack enable.- See
.devcontainer/init.shfor example. - You might have to prefix the command with
npx corepackif you're using Node.js v25+. - You can continue using
corepack yarnwithout installing Yarn globally. - See the note about
corepackin the Yarn documentation for details.
- See
- Run
yarnto install dependencies. - Run
yarn test. If it fails, that's on the maintainers; please open an issue and attachbuild/test/result.xml. - Make your changes and debug.
- Run
yarn buildto build the extension. - Run
yarn startto launch Thunderbird with the extension loaded temporarily. - Add unit tests as a byproduct of debugging, or if you feel generous.
- Run
yarn checkandyarn fixto lint and format.
- Run
- Run
yarn testagain. - Commit and push your changes.
- Create a pull request.
- Install the changed add-on and dogfood your changes in Thunderbird in the meantime. (You're using Thunderbird daily, aren't you?)
- Run
yarn buildto build. A zip file will be created indist/. - Run
yarn watchto watch for changes and rebuild automatically while editing.
- See the Structure section of
design.mdfor how the code is organized. - Run
yarn docto generate API documentation. - Ask on the issue or discussion pages if documentation is insufficient to figure out how to implement something.
- Use your favorite code editor.
- Run
yarn checkto check code style and types. - Run
yarn fixto fix issues found withyarn check. - Run
yarn formatto format code. - Running
yarn sdk $your_editor_namemight make it work more smoothly, e.g., Vim, Emacs, or VSCode. See Yarn SDK for details.
- Run
yarn test. - Results are output to
build/test/. - See
doc/testing.mdfor details. - Not adding test cases is fine, but please describe how to test the changed part manually in the commit message.
- It's convenient to use
yarn exec web-ext runto start Thunderbird with Ghostbird loaded temporarily. It's aliased asyarn start.- However, by default, it starts Firefox, which is not what we want.
- Copy
.web-ext-config.example.mjsto.web-ext-config.mjsand adjust to your environment.
web-extwill start Thunderbird with a blank profile. You may want to use--keep-profile-changesto prepare a testing profile.- Also, VSCode can be used as a debugger. See
.vscode/launch.example.jsonfor an example config. Copy to.vscode/launch.jsonand edit the paths as needed.
- Run
yarn fixto lint and format the code. - Commit your changes. If you're wondering what to write, here's a template:
{fix|feat|feat!|docs|refactor|test|chore}: ${what_I_changed_in_imperative_mood}
${you_should_merge_my_awesome_commit_heres_why}
${this_change_impacts_users_like_this}
${this_change_can_be_tested_by_doing_these_steps}
- Push to your forked repo.
- Create a pull request on the GitHub website, or your favorite GitHub client.
- We mostly adhere to biome defaults for formatting and linting, with some exceptions that reflect my personal preferences.
- You can adjust
.editorconfigandbiome.jsoncto your taste locally, but please make sure to runyarn fixwith the original config before sending a PR. - PRs that suggest adjusting these are also welcome, as long as they don't cause a huge rewrite.
- See
doc/faq.md.