@practicalkit/plugin-sdk
v0.0.2-b
Published
The official SDK for building plugins for [PracticalKit](https://practicalkit.com) - a desktop app that brings AI to your files.
Readme
PracticalKit Plugin SDK
The official SDK for building plugins for PracticalKit - a desktop app that brings AI to your files.
Installation
npm install @practicalkit/plugin-sdkOr with pnpm:
pnpm add @practicalkit/plugin-sdkQuick Start
import { PracticalKitSdk } from "@practicalkit/plugin-sdk";
// Create and initialize the SDK
const sdk = new PracticalKitSdk();
sdk.init();
// Read files from the workspace
const content = await sdk.vfs.readFile("notes.md");
// Register a tool for the AI assistant
await sdk.llm.registerTool({
name: "sayHello",
description: "Greets someone by name",
parameters: {
type: "object",
properties: {
name: { type: "string", description: "Name to greet" },
},
required: ["name"],
},
handler: async (args) => {
const { name } = args as { name: string };
return `Hello, ${name}!`;
},
});Documentation
Full documentation is available at practicalkit.com/docs/plugins/intro:
License
ISC
