How it works
- Install raio on your Slack workspace.
- Type
@raio login
and follow the link. - Add plugins to it or write your own.
- Ask
@raio
to do stuff.
Examples
List deployments
@raio show me the latest 2 deployments
🟢 webapp core-7qhbihljw-project.vercel.app
10/9/2023, 1:27:38 PM by gimenete - to production
New onboarding flow
🟢 docs docs-9yg5jdvxd-project.vercel.app
10/9/2023, 1:17:18 PM by gimenete - to production
Add full text search support
List environment variables
@raio list all vercel environment variables for webapp
These are the environment variables for project webapp
NEXT_PUBLIC_APP_URL development, preview, production
NEXT_PUBLIC_DOCS_URL development, preview, production
NEXT_PUBLIC_SITE_URL development, preview, production
How to write a plugin?
We provide a web UI with an IDE-like text editor to create and test plugins. A plugin can be fairly simple:
import { defineCommand, queryString } from "raio";
defineCommand({
name: "Dad jokes",
description: "Search for dad jokes. Get a random one or search for a term.",
args: {
term: {
type: "string",
description: "Search term to find jokes about",
required: false,
},
},
allowedHostnames: ["icanhazdadjoke.com"],
run: async ({ args, secrets, response }) => {
const path = args.term ? "search" : "";
const query = queryString(args);
const endpoint = `https://icanhazdadjoke.com/${path}?${query}`;
const result = await fetch(endpoint, { headers: { "Accept": "application/json" } });
if (!result.ok) throw new Error(`HTTP error! status: ${result.status}`);
const json = await result.json();
if (json.joke) {
response.setSummary(json.joke);
response.addText(json.joke);
} else {
response.setSummary(`Jokes about ${args.term}`)
for (const joke of json.results) {
response.addText(joke.joke);
}
}
},
});