@vicinae/api
    Preparing search index...

    Interface Environment

    interface Environment {
        appearance: "light" | "dark";
        assetsPath: string;
        commandMode: "menu-bar" | "view" | "no-view";
        commandName: string;
        extensionName: string;
        isDevelopment: boolean;
        isRaycast: boolean;
        launchContext?: LaunchContext;
        launchType: LaunchType;
        ownerOrAuthorName: string;
        raycastVersion: string;
        supportPath: string;
        textSize: "medium" | "large";
        theme: "light" | "dark";
        vicinaeVersion: { commit: string; tag: string };
        canAccess(api: unknown): boolean;
    }
    Index

    Properties

    appearance: "light" | "dark"

    The appearance used by the Raycast application.

    assetsPath: string

    The absolute path to the assets directory of the extension.

    This directory is used internally to load icons, images, and other bundled assets.

    commandMode: "menu-bar" | "view" | "no-view"

    The mode of the launched command, as specified in package.json

    commandName: string

    The name of the launched command, as specified in package.json

    extensionName: string

    The name of the extension, as specified in package.json

    isDevelopment: boolean

    Indicates whether the command is a development command (vs. an installed command from the Store).

    isRaycast: boolean

    Whether we run an actual Raycast extension in compatibility mode. This is used internally to provide Raycast-compatible interfaces.

    launchContext?: LaunchContext

    Use the top-level prop launchContext instead.

    launchType: LaunchType

    The type of launch for the command (user initiated or background).

    ownerOrAuthorName: string

    The name of the extension owner (if any) or author, as specified in package.json

    raycastVersion: string

    The version of the main Raycast app

    supportPath: string

    The absolute path for the support directory of an extension. Use it to read and write files related to your extension or command.

    textSize: "medium" | "large"

    The text size used by the Raycast application.

    theme: "light" | "dark"

    The theme used by the Raycast application.

    Use appearance instead

    vicinaeVersion: { commit: string; tag: string }

    The Vicinae version. Vicinae extensions should rely on this and ignore raycastVersion.

    Methods

    • Returns whether the user has access to the given API.

      Parameters

      • api: unknown

      Returns boolean

      import { unstableAI, environment } from "@raycast/api";

      export default function Command() {
      if (environment.canAccess(unstableAI)) {
      // use unstableAI
      }
      }