Skip to content

pantoken / ai/pantoken-ai/src / installAgentAssets

Funzione: installAgentAssets()

installAgentAssets(tool, dir?): string[]

Alpha

Scrivi gli asset dell'agente di pantoken per uno strumento in un repository consumer.

Parametri

tool

AgentTool | "all"

Uno specifico AgentTool, o "all" per ogni asset.

dir?

string = "."

La directory di destinazione (predefinita ".").

Restituisce

string[]

I percorsi scritti.

Esempi

Installa gli asset di uno strumento in un repository

ts
import { installAgentAssets } from "@pantoken/ai";

const written = installAgentAssets("cursor", "./my-app");
// → ["my-app/.cursor/rules/pantoken.mdc"]

Installa tutti gli asset nella directory corrente

ts
import { installAgentAssets } from "@pantoken/ai";

installAgentAssets("all");
// writes AGENTS.md, llms.txt, and the Cursor/Copilot/Windsurf/Claude assets