Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

539 B
Raw Blame
import { Command } from "@commander-js/extra-typings";
import { readFileSync } from "node:fs";

declare const __KARAKEEP_SKILL_CONTENT__: string;

const skillContent =
  typeof __KARAKEEP_SKILL_CONTENT__ === "string"
    ? __KARAKEEP_SKILL_CONTENT__
    : readFileSync(
        new URL("../../../../skills/SKILL.md", import.meta.url),
        "utf8",
      );

export const skillCmd = new Command()
  .name("skill")
  .description("prints the official Karakeep agent skill")
  .action(() => {
    process.stdout.write(skillContent);
  });