Skip to content

caido.config.ts ​

The caido.config.ts file is used to configure your package. It will used to generate the manifest.json automatically.

ts
import { defineConfig } from "@caido-community/dev";

export default defineConfig({
  id: "my-plugin",
  name: "My Plugin",
  description: "A plugin for Caido",
  version: "0.0.0",
  author: {
    name: "Caido Labs Inc.",
    email: "dev@caido.io",
    url: "https://caido.io",
  },
  plugins: [
    {
      kind: "frontend",
      id: "my-frontend",
      name: "My Frontend",
      root: "packages/my-frontend",
      backend: {
        id: "my-backend",
      },
      assets: ["my-assets/*.png"],
    },
    {
      kind: "backend",
      id: "my-backend",
      name: "My Backend",
      root: "packages/my-backend",
    },
  ],
});

Global Options ​

OptionTypeRequiredDescription
idstringYesMust be unique and must only consist of lowercase letters, numbers, hyphens and underscores (the order of which must satisfy the regex: ^[a-z]+(?:[_-][a-z0-9]+)*$).
namestringYesThe name of your plugin. This is the name that will be displayed when a user installs your plugin.
descriptionstringYesThe description of your plugin. This is the description that will be displayed when a user installs your plugin.
versionstringYesRepresents the version of your plugin using Semantic Versioning.

Author Options ​

OptionTypeRequiredDescription
namestringYesThe name of the author of your plugin.
emailstringNoThe email of the author of your plugin.
urlstringNoThe URL of the author of your plugin.

Frontend Plugin Options ​

OptionTypeRequiredDescription
kind"frontend"YesThe kind of plugin.
idstringYesThe id of the plugin.
namestringNoThe name of the plugin. Defaults to the id.
rootstringYesThe root directory of the frontend plugin. (e.g. packages/my-frontend)
backend.idstringYesThe id of the backend plugin that this frontend plugin is associated with.
viteViteConfigNoAdditional Vite configuration for the frontend plugin.
assetsArray<string>NoAssets to package with the plugin. Supports glob for files and directories (recursive copy)

Backend Plugin Options ​

OptionTypeRequiredDescription
kind"backend"YesThe kind of plugin.
idstringYesThe id of the plugin.
namestringNoThe name of the plugin. Defaults to the id.
rootstringYesThe root directory of the backend plugin. (e.g. packages/my-backend)
assetsArray<string>NoAssets to package with the plugin. Supports glob for files and directories (recursive copy)