Hello World Integration
Let's start with the simplest possible integration - one that just displays a Hello World message on any GitHub page.
How it looks in the extension
The code
Create a file called hello.integration.js with the following contents:
module.exports = {
metadata: {
name: 'hello-world',
description: 'A simple hello world integration',
match: {
contextType: 'github'
}
},
run: async function () {
return [
{
type: 'text',
content: 'Hello World!',
status: 'important'
}
];
}
};
Breaking It Down
Metadata Section
The metadata section describes the integration and when it should be processed (in our case, on all GitHub pages).
metadata: {
name: 'hello-world', // Unique identifier
description: 'A simple hello world integration', // Human-readable description
match: { // Context matching rules
contextType: 'github'
}
}
Run Function
The run function processes the integration and returns the results which will be shown on the bar in the browser.
run: async function () {
return [/* results */];
}
Result
There are many types of results available, but for now let's stick with a simple text
{
type: 'text', // Result type (text, link, or dropdown)
content: 'Hello World!' // What to display
}
Testing Your Integration
- Save the file as
hello-world.integration.jsin your integrations directory - Navigate to any Github repo that matches your context (e.g.,
https://github.com/tooljump/tooljump) - The integration should run and display "Hello World!"
If it doesn't work, check the Debugging guide.
Next Steps
Now that you understand the basics, learn about:
- Result Types - Different ways to display information
- When to Run - Controlling when integrations execute
- Caching - Making integrations faster
Browse integration recipes for tool-specific implementation patterns.