Sashi is an advanced admin tool that allows you to label functions in your codebase and perform admin tasks using AI.
- sashi-lib: Middleware library for integrating Sashi into your codebase
- sashi-ui: AI-powered frontend interface
- Label functions in your codebase for AI access
- Subscribe to functions from external repositories
- AI-powered bot for executing admin tasks
- Security option to require confirmation for sensitive functions
-
Install sashi-lib in your project:
npm install @sashimo/lib
-
Import necessary components from sashi-lib:
import { AIArray, AIFunction, AIObject, registerFunctionIntoAI } from "@sashimo/lib";
-
Define AI objects and functions:
const UserObject = new AIObject("User", "a user in the system", true) .field({ name: "email", description: "the email of the user", type: "string", required: true }) // ... add other fields ... const GetUserByIdFunction = new AIFunction("get_user_by_id", "get a user by id") .args({ name: "userId", description: "a users id", type: "number", required: true }) .returns(UserObject) .implement(async (userId: number) => { const user = await getUserById(userId); return user; }); // Register the function registerFunctionIntoAI("get_user_by_id", GetUserByIdFunction);
-
Use the Sashi UI to interact with your labeled functions using the AI interface.
For detailed documentation and advanced usage, visit our documentation site.
We welcome contributions! Please see our Contributing Guide for more details.
Sashi is released under the MIT License.