### Get Setup Instructions Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/adapters/api/examples.mdx Get human-readable setup instructions for the statusline. Provide the path to the user's .cleo directory. ```typescript import { getSetupInstructions } from './statusline.js'; console.log(getSetupInstructions('/home/user/.cleo')); ``` -------------------------------- ### Setup New Project: Verify Installation Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/LLM-AGENT-GUIDE.md Verifies the installation of skills and MCP servers by listing them. This confirms that the previous setup steps were successful. ```bash # 4. Verify installation caamp skills list --json ``` ```bash caamp mcp list --json ``` -------------------------------- ### Get Setup Instructions Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/SKILL-monorepo/references/API-REFERENCE.md Obtain human-readable setup instructions. Pass the absolute path to the CLEO home directory to this function to get a formatted setup instructions string. ```typescript (cleoHome: string) => string ``` ```typescript import { getSetupInstructions } from './statusline.js'; console.log(getSetupInstructions('/home/user/.cleo')); ``` -------------------------------- ### getSetupInstructions() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/adapters/api/examples.mdx Get human-readable setup instructions. ```APIDOC ## `getSetupInstructions()` ### Description Get human-readable setup instructions. ### Usage ```typescript import { getSetupInstructions } from './statusline.js'; console.log(getSetupInstructions('/home/user/.cleo')); ``` ``` -------------------------------- ### Setup New Project: Install MCP Servers Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/LLM-AGENT-GUIDE.md Installs specified MCP servers. Use `--yes` to automatically confirm installations. ```bash # 3. Install essential MCP servers caamp mcp install @anthropic/mcp-server-fetch --json --yes ``` ```bash caamp mcp install @modelcontextprotocol/server-github --json --yes ``` -------------------------------- ### Get Setup Instructions Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Generates human-readable setup instructions. Requires the absolute path to the CLEO home directory. ```javascript import { getSetupInstructions } from './statusline.js'; console.log(getSetupInstructions('/home/user/.cleo')); ``` -------------------------------- ### getSetupInstructions(cleoHome) Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/adapters/api/functions.mdx Get human-readable setup instructions. ```APIDOC ## getSetupInstructions(cleoHome) ### Description Get human-readable setup instructions. ### Parameters #### Path Parameters - **cleoHome** (string) - Required - Absolute path to the CLEO home directory ### Returns Formatted setup instructions string ### Example ```typescript import { getSetupInstructions } from './statusline.js'; console.log(getSetupInstructions('/home/user/.cleo')); ``` ``` -------------------------------- ### Install Skill Result Example Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/caamp/api/examples.mdx Demonstrates handling the result of installing a skill, checking for success and accessing installation details like canonical path and linked agents. ```typescript const result = await installSkill(sourcePath, "my-skill", providers, true); if (result.success) { console.log(`Installed to ${result.canonicalPath}`); console.log(`Linked to: ${result.linkedAgents.join(", ")}`); } ``` -------------------------------- ### CAAMP MCP Install Command Examples Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/claudedocs/VISION.md Demonstrates various ways to install MCP servers using the CAAMP CLI, showcasing options for installing to all detected agents, specific agents, dry runs for previewing changes, and JSON output for automation. ```bash # Auto-detect which agents are installed, install to all of them caamp mcp install @anthropic/mcp-server-filesystem --all # CAAMP figures out: # - Which agents are installed (binary check, directory check, app bundle check) # - Where each agent's config file lives # - What format each config file uses # - What config key each agent expects # - Whether a transform is needed ``` ```bash # Simple: install to all detected agents caamp mcp install https://mcp.example.com --all ``` ```bash # Targeted: install to specific agents caamp mcp install https://mcp.example.com -a claude-code -a cursor ``` ```bash # Controlled: preview without writing caamp mcp install https://mcp.example.com --all --dry-run ``` ```bash # Scriptable: JSON output for automation caamp providers detect --json ``` -------------------------------- ### Setup New Project: Install Core Skills Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/LLM-AGENT-GUIDE.md Installs the 'core' profile of skills. The `--yes` flag bypasses confirmation prompts. ```bash # 2. Install core skills caamp skills install --profile core --json --yes ``` -------------------------------- ### Install MCP Provider From File Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/generated/llms-full.txt Installs an MCP provider using a configuration from a local JSON file. Useful for reproducible setups. ```bash caamp mcp install github --provider cursor --from ./github.json ``` -------------------------------- ### getOtelSetupCommands() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/api-reference.mdx Gets the setup commands for OpenTelemetry. ```APIDOC ## getOtelSetupCommands() ### Description Gets the setup commands for OpenTelemetry. ### Method Not specified (likely a function call) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Development Setup for LAFS Protocol Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/lafs/CONTRIBUTING.md Clone the repository, install dependencies, run tests, and type-check the project. ```bash git clone https://github.com/kryptobaseddev/cleo.git cd cleo/packages/lafs pnpm install pnpm test pnpm run typecheck ``` -------------------------------- ### Cleo Agent Command-Line Interface Examples (Bash) Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/analysis/cleoos-sentient-harness-analysis.md Provides examples of how to use the Cleo Agent CLI for starting interactive sessions, running one-shot tasks, and delegating to subagents. ```bash # Start an interactive agent session cleo agent start --model anthropic/claude-opus-4 --toolsets "terminal,file,web" ``` ```bash # Run a one-shot task cleo agent "Find all TODO comments in the codebase and create tasks for each" ``` ```bash # Run with specific context cleo agent "Review the authentication code" --file src/auth.ts --toolsets "file,web" ``` ```bash # Delegate to subagents cleo agent "Implement the full feature" --delegate --workers 3 ``` ```bash # Use the sentient daemon cleo sentient start # Starts Tier-1 daemon cleo sentient propose enable # Enable Tier-2 LLM proposals cleo sentient sandbox start # Start autonomous improvement loop ``` -------------------------------- ### SKILL.md YAML Frontmatter Example Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/claudedocs/specs/CAAMP-SPEC.md Example of a SKILL.md file starting with YAML frontmatter, including required and optional fields like name, description, version, and allowed tools. ```yaml --- name: my-skill-name description: A description of what this skill does license: MIT # Optional compatibility: claude-code, cursor # Optional version: 1.0.0 # Optional allowed-tools: # Optional (also accepts allowedTools) - Read - Write - Bash metadata: # Optional key-value pairs category: development --- # Skill body content here (markdown instructions for the AI agent) ``` -------------------------------- ### getSetupInstructions(cleoHome: string) Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Generates human-readable setup instructions for CLEO. Requires the absolute path to the CLEO home directory. ```APIDOC ## getSetupInstructions(cleoHome: string) ### Description Get human-readable setup instructions. ### Parameters #### Path Parameters - **cleoHome** (string) - Required - Absolute path to the CLEO home directory ### Returns Formatted setup instructions string ### Example ```javascript import { getSetupInstructions } from './statusline.js'; console.log(getSetupInstructions('/home/user/.cleo')); ``` ``` -------------------------------- ### Setup New Project: Detect Agents Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/LLM-AGENT-GUIDE.md Part of the new project setup, this command detects installed agents. Ensure you have CAAMP installed and configured. ```bash # 1. Detect installed agents caamp providers detect --json ``` -------------------------------- ### getSetupInstructions Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/SKILL-monorepo/SKILL.md Provides human-readable instructions for setting up the environment. ```APIDOC ## getSetupInstructions() ### Description Get human-readable setup instructions. ### Method ```typescript getSetupInstructions(): string; ``` ``` -------------------------------- ### KimiInstallProvider.install() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/adapters/api/functions.mdx Install CLEO into a Kimi environment. ```APIDOC ## install(options: InstallOptions) ### Description Install CLEO into a Kimi environment. ### Method `install(options: InstallOptions) => Promise` ### Parameters #### Path Parameters - `options` (InstallOptions) - Description: Options for installation. ### Returns - `Promise` ``` -------------------------------- ### CAAMP Skill Installation Response Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/LLM-AGENT-GUIDE.md Example JSON response after attempting to install a skill. It details which skills were installed, failed, and provides counts. ```json { "success": true, "result": { "installed": [{ "name": "ct-gitbook", "scopedName": "ct-gitbook", "canonicalPath": "/home/user/.agents/skills/ct-gitbook", "providers": ["claude-code", "cursor"] }], "failed": [], "count": { "installed": 1, "failed": 0, "total": 1 } } } ``` -------------------------------- ### initProject() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/core/api/index.mdx Run full project initialization. Creates the .cleo/ directory structure, installs dependencies, and sets up the project. ```APIDOC ## initProject() ### Description Run full project initialization. Creates the .cleo/ directory structure, installs dependencies, and sets up the project. ### Method function ### Endpoint N/A (Function Call) ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Detect Installed CAAMP Providers Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/LLM-AGENT-GUIDE.md Use this command to list all installed CAAMP providers and those that are not installed. It helps in understanding the current environment setup. ```bash caamp providers detect --json ``` -------------------------------- ### getLockFilePath() Example Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/generated/packages/api/examples.mdx Example showing how to get the path to the CAAMP lock file using `getLockFilePath()`. ```APIDOC ## `getLockFilePath()` *Returns the path to the CAAMP lock file.* [View in API reference](/packages/./api/functions#getlockfilepath) ```typescript const lockPath = getLockFilePath(); // e.g., "/home/user/.local/share/caamp/.caamp-lock.json" ``` ``` -------------------------------- ### resolveProviderSkillsDirs() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/api-reference.mdx Gets all target directories for skill installation based on provider precedence. ```APIDOC ## resolveProviderSkillsDirs() ### Description Gets all target directories for skill installation based on provider precedence. ### Parameters - `provider` (Provider) - Provider to resolve paths for - `scope` (PathScope) - Whether to resolve global or project paths - `projectDir` (string) - Optional - Project directory for project-scope resolution ### Returns - `string[]` - Array of target directories for symlink creation ### Example ```typescript const dirs = resolveProviderSkillsDirs(provider, "project", "/home/user/project"); for (const dir of dirs) { console.log("Install skill to:", dir); } ``` ``` -------------------------------- ### getCanonicalSkillsDir() Example Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/generated/packages/api/examples.mdx Example of using `getCanonicalSkillsDir()` to get the canonical skills storage directory path. ```APIDOC ## `getCanonicalSkillsDir()` *Returns the canonical skills storage directory path.* [View in API reference](/packages/./api/functions#getcanonicalskillsdir) ```typescript const dir = getCanonicalSkillsDir(); // e.g., "/home/user/.local/share/caamp/skills" ``` ``` -------------------------------- ### Running a Setup Section with Studio IO Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/plans/E-CLEO-SETUP-V2.md Demonstrates how to run a specific setup section like 'integrations' using Studio's IO implementation and non-interactive mode with specific configurations. ```typescript import { createDefaultWizardRunner } from '@cleocode/core/setup'; const runner = createDefaultWizardRunner(); // StudioWizardIO implements WizardIO via SvelteKit form/event bus const result = await runner.runSection('integrations', studioIO, { nonInteractive: true, signaldockEnabled: true, signaldockEndpoint: formData.endpoint, }); ``` -------------------------------- ### Get Installed Alias Version Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/core/api/functions.mdx Retrieves the installed alias version from a shell RC file. ```typescript getInstalledVersion(filePath: string) => string | null ``` -------------------------------- ### Get Claude Code Setup Instructions Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/adapters/README.md Retrieve the setup instructions for Claude Code integration. ```typescript // Get setup instructions const instructions = getSetupInstructions(); ``` -------------------------------- ### getAgentsConfigPath() Example Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/generated/packages/api/examples.mdx Example of using `getAgentsConfigPath()` to get the `config.toml` path within the `.agents/` standard structure. ```APIDOC ## `getAgentsConfigPath()` *Gets the config.toml path within the `.agents/` standard structure.* [View in API reference](/packages/./api/functions#getagentsconfigpath) ```typescript const configPath = getAgentsConfigPath("global"); // e.g., "/home/user/.agents/config.toml" ``` ``` -------------------------------- ### installSkill Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/SKILL-monorepo/references/API-REFERENCE.md Installs a skill from a local path to the canonical location and links it to specified agents. It handles both global and project-specific installations. ```APIDOC ## installSkill ### Description Install a skill from a local path to the canonical location and link to agents. ### Signature ```typescript (sourcePath: string, skillName: string, providers: Provider[], isGlobal: boolean, projectDir?: string) => Promise ``` ### Parameters #### Path Parameters - `sourcePath` (string) - Local path to the skill directory to install - `skillName` (string) - Name for the installed skill - `providers` (Provider[]) - Target providers to link the skill to - `isGlobal` (boolean) - Whether to link to global or project skill directories - `projectDir` (string) - Project directory (defaults to `process.cwd()`) ### Returns - Install result with linked agents and any errors ``` -------------------------------- ### Setup Wizard - `@cleocode/core/setup` Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/api/CORE-API-AGENT-GUIDE.md Provides functionalities for setting up Cleo, including LLM credentials, identity, and other configurations. Supports both interactive and programmatic usage. ```APIDOC ## `setup` — `@cleocode/core/setup` **Stability**: stable Interactive setup wizard sections — LLM credentials, identity, harness, brain mode. ### Exports - `createDefaultWizardRunner`: Factory: WizardRunner pre-wired with all built-in sections - `WizardRunner`: Step-through wizard executor - `StubWizardIO`: Non-interactive IO adapter for programmatic setup - `createLlmSection`: LLM credentials section constructor - `createIdentitySection`: Agent identity section constructor - `createSentientSection`: Sentient daemon section constructor - `createHarnessSection`: Harness selection section constructor - `createBrainSection`: BRAIN memory mode section constructor - `createProjectConventionsSection`: Project strictness preset section constructor ### Programmatic Usage Example ```typescript import { createDefaultWizardRunner, StubWizardIO } from '@cleocode/core/setup'; const io = new StubWizardIO({ 'llm.transport': 'anthropic', 'llm.apiKey': process.env.ANTHROPIC_API_KEY!, }); const runner = createDefaultWizardRunner(); const result = await runner.run(process.cwd(), io); ``` ``` -------------------------------- ### Get Installed Providers Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/caamp/api/examples.mdx Retrieve only the providers that are currently installed on the system. This is a convenience function that filters the results of `detectAllProviders`. ```typescript const installed = getInstalledProviders({ forceRefresh: true }); console.log(installed.map(p => p.toolName).join(", ")); ``` -------------------------------- ### computeStartupSummary() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/core/api/index.mdx Compute startup summary for an epic. ```APIDOC ## computeStartupSummary() ### Description Compute startup summary for an epic. ### Method function ### Parameters None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### Promotion Command Example Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/architecture/config-platform.md Example of a command to promote a configuration change from one scope to another. ```bash cleo config promote --from agent:coder --to project ``` -------------------------------- ### Initialize a Cleo Project Source: https://github.com/kryptobaseddev/cleo/blob/main/README.md Navigate to your project directory and initialize a new Cleo project using the `cleo init` command. ```bash cd my-project cleo init ``` -------------------------------- ### Get Installed Skill Version Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/core/api/functions.mdx Asynchronously retrieves the currently installed version of a specific skill from the CAAMP lock state. ```typescript getInstalledVersionAsync(name: string) ``` -------------------------------- ### End-User Example Format Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/skills/skills/ct-docs-write/references/audience-targeting.md Presents a realistic, copy-paste-able example with expected output, suitable for end-users. ```bash $ cleo show T9567 T9567 — E-SKILLS-DEPTH-BACKFILL Status: pending Acceptance: 1. Each of 6+ stub skills gains references/ with min 3 docs each ... ``` -------------------------------- ### InstallOptions Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Options for the install method. ```APIDOC ## InstallOptions ### Description Options for the install method. ### Properties - **projectDir** (string): The project directory. - **global** (boolean | undefined): Whether to install globally. ``` -------------------------------- ### CLI Setup Meta Description Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/plans/E-AUDIT-V2-FIXES.md This string provides a meta description for the `cleo setup` command, listing the sections that are currently documented. It omits 'harness' and 'brain' sections. ```bash 'llm | identity | sentient | project-conventions' ``` -------------------------------- ### getInstalledProviders() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/caamp/api/examples.mdx Get only providers that are currently installed on the system. Convenience wrapper that filters `detectAllProviders` results to only those with `installed === true`. ```APIDOC ## `getInstalledProviders()` *Get only providers that are currently installed on the system. Convenience wrapper that filters `detectAllProviders` results to only those with `installed === true`.* [View in API reference](/packages/caamp/api/functions#getinstalledproviders) ```typescript const installed = getInstalledProviders({ forceRefresh: true }); console.log(installed.map(p => p.toolName).join(", ")); ``` ``` -------------------------------- ### initCoreSkills() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/core/index.mdx Install CLEO core skills to the canonical skills directory via CAAMP. T4707 ```APIDOC ## initCoreSkills() ### Description Install CLEO core skills to the canonical skills directory via CAAMP. T4707 ### Method function ### Endpoint /packages/core/api/index#initcoreskills ``` -------------------------------- ### installSkill() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/caamp/api/examples.mdx Install a skill from a local path to the canonical location and link to agents. ```APIDOC ## `installSkill()` *Install a skill from a local path to the canonical location and link to agents.* [View in API reference](/packages/caamp/api/functions#installskill) ```typescript const result = await installSkill("/tmp/my-skill", "my-skill", providers, true, "/my/project"); if (result.success) { console.log(`Linked to: ${result.linkedAgents.join(", ")}`); } ``` ``` -------------------------------- ### CAAMP MCP Server Installation Response Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/LLM-AGENT-GUIDE.md Example JSON response after installing an MCP server. It confirms the installation and shows the server's name, associated providers, and execution configuration. ```json { "success": true, "result": { "installed": [{ "name": "@anthropic/mcp-server-fetch", "providers": ["claude-code"], "config": { "command": "npx", "args": ["-y", "@anthropic/mcp-server-fetch"] } }] } } ``` -------------------------------- ### Get Installed Providers Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Retrieves only the providers that are currently installed on the system. This is a convenience wrapper that filters `detectAllProviders` results to include only those with `installed === true`. Options can be passed for cache control. ```typescript const installed = getInstalledProviders({ forceRefresh: true }); console.log(installed.map(p => p.toolName).join(", ")); ``` -------------------------------- ### recordSkillInstall() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/api-reference.md Records an installation of a skill. ```APIDOC ## recordSkillInstall() ### Description Records an installation of a skill. ### Method Not applicable (function call) ### Parameters None explicitly documented. ### Request Example None explicitly documented. ### Response None explicitly documented. ``` -------------------------------- ### installSkill Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/api-reference.mdx Installs a skill. ```APIDOC ## installSkill() ### Description Installs a skill. ### Method N/A (Function Call) ### Parameters None specified in the provided TOC. ### Response N/A (Function Return Value) ``` -------------------------------- ### Version Format Examples Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/skills/skills/ct-docs-lookup/references/version-specific-docs.md These examples show different ways to specify versions when looking up documentation. Use the granularity that matches the user's query. ```text /vercel/next.js # all versions; unspecified /vercel/next.js/v15 # latest within v15.x /vercel/next.js/v15.0.0 # exactly v15.0.0 /vercel/next.js/v15.0.0-canary.7 # specific canary ``` -------------------------------- ### getAgentsMcpDir() Example Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/generated/packages/api/examples.mdx Examples of using `getAgentsMcpDir()` to get the MCP directory within the `.agents/` standard structure, for both global and project scopes. ```APIDOC ## `getAgentsMcpDir()` *Gets the MCP directory within the `.agents/` standard structure.* [View in API reference](/packages/./api/functions#getagentsmcpdir) ```typescript const globalMcp = getAgentsMcpDir("global"); const projectMcp = getAgentsMcpDir("project", "/home/user/project"); ``` ``` -------------------------------- ### Batch Installation Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/api-reference.mdx Functions for batch installation with rollback capabilities. ```APIDOC ## batchInstallWithRollback() ### Description Installs items in a batch with rollback support. ### Method APIDOC ### Endpoint APIDOC ### Parameters APIDOC ### Request Example APIDOC ### Response APIDOC ``` -------------------------------- ### installSkill() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/core/api/functions.mdx Installs a single skill via CAAMP. ```APIDOC ## installSkill() ### Description Install a single skill via CAAMP. ### Signature ```typescript (skillName: string, projectDir?: string) => Promise<{ installed: boolean; path: string; error?: string; }> ``` ``` -------------------------------- ### resolveProviderSkillsDirs Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Gets all target directories for skill installation based on provider precedence. This function returns an array of directories where skills can be installed. ```APIDOC ## resolveProviderSkillsDirs() ### Description Gets all target directories for skill installation based on provider precedence. ### Parameters - **provider** (Provider) - Provider to resolve paths for - **scope** (PathScope) - Whether to resolve global or project paths - **projectDir** (string) - Optional - Project directory for project-scope resolution ### Returns (string[]) - Array of target directories for symlink creation ### Example ```javascript const dirs = resolveProviderSkillsDirs(provider, "project", "/home/user/project"); for (const dir of dirs) { console.log("Install skill to:", dir); } ``` ``` -------------------------------- ### Install All Agents Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/SKILL-monorepo/references/API-REFERENCE.md Installs all agents found in the project's agents/ directory by creating symbolic links. Returns an array indicating the installation status for each agent. ```typescript (cwd?: string) => Array<{ name: string; installed: boolean; error?: string; }> ``` -------------------------------- ### Install CleoOS CLI Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/plans/CLEO-ULTRAPLAN.md Installs the CleoOS command-line interface globally using npm. The post-installation script handles initial setup, including path resolution, extension copying, and skill installation. ```bash $ npm i -g @cleocode/cleo-os # postinstall: # - resolves XDG paths # - creates ~/.local/share/cleo/ hub # - copies bridge + chatroom extensions # - scaffolds empty .cant tree # - installs all CleoOS skills via PiHarness # - writes default model-routing.cant $ cleoos # batteries-included $ cleo # raw CLI (unchanged) $ pi # raw Pi (unchanged) ``` -------------------------------- ### installPrompt() Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/generated/api-reference.md Installs a Pi prompt from a source directory into the specified tier. ```APIDOC ## installPrompt() ### Description Install a Pi prompt from a source directory into the given tier. ### Parameters - `sourceDir` (string) - The source directory of the prompt. - `name` (string) - The name of the prompt. - `tier` (HarnessTier) - The target tier for installation (`project`/`user`/`global`). - `projectDir` (string, optional) - The project directory (required when `tier='project'`). - `opts` (HarnessInstallOptions, optional) - Additional installation options. ``` -------------------------------- ### recordSkillInstall() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Records a skill installation in the lock file, including details like name, source, and installation type. ```APIDOC ## recordSkillInstall() ### Description Record a skill installation in the lock file. ### Parameters #### Path Parameters - **skillName** (string) - Required - Skill name - **scopedName** (string) - Required - Scoped name (may include marketplace scope) - **source** (string) - Required - Original source string - **sourceType** (SourceType) - Required - Classified source type - **agents** (string[]) - Required - Provider IDs the skill was linked to - **canonicalPath** (string) - Required - Absolute path to the canonical installation - **isGlobal** (boolean) - Required - Whether this is a global installation - **projectDir** (string) - Optional - Project directory (for project-scoped installs) - **version** (string) - Optional - Version string or commit SHA ### Returns Promise ### Example ```js import { getCanonicalSkillsDir } from "../paths/standard.js"; import { join } from "node:path"; await recordSkillInstall( "my-skill", "my-skill", "owner/repo", "github", ["claude-code"], join(getCanonicalSkillsDir(), "my-skill"), true, ); ``` ``` -------------------------------- ### PDF Processing Quick Start Example Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/skills/skills/ct-skill-creator/SKILL.md Demonstrates extracting text from a PDF using the pdfplumber library. This is a basic example for quick integration. ```markdown # PDF Processing ## Quick start Extract text with pdfplumber: [code example] ``` -------------------------------- ### Orchestrator Migration Hint Example Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/specs/T832-gate-integrity-spec.md Provides examples of how agents can perform a quick migration by providing evidence for specific gates using the `cleo verify` command. ```bash Evidence is now required. See ADR-051. Quick migration: cleo verify --gate implemented --evidence commit:;files: cleo verify --gate testsPassed --evidence tool:pnpm-test cleo verify --gate qaPassed --evidence tool:biome;tool:tsc ``` -------------------------------- ### Install Skill Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Installs a skill to one or more providers. Can be installed globally or to a specific project. Requires skill name and project root. ```typescript toolsSkillInstall(name: string, projectRoot: string, source?: string, isGlobal?: boolean) => Promise; targets: string[]; }>> ``` -------------------------------- ### install.global Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/specs/CLEO-OPERATION-CONSTITUTION.md Refreshes the global CLEO setup, including providers and CLI configurations. ```APIDOC ## mutate install.global ### Description Refresh global CLEO setup (providers, CLI configs). ### Method mutate ### Endpoint install.global ### Parameters --- ### Request Example ```json { "mutate": "install.global" } ``` ### Response #### Success Response (200) - **message** (string) - A message confirming the global setup refresh. ### Response Example ```json { "message": "Global CLEO setup refreshed successfully." } ``` ``` -------------------------------- ### resolveProviderSkillsDirs() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/caamp/api/index.mdx Gets all target directories for skill installation based on provider precedence. This function considers multiple scopes to determine where skills should be installed. ```APIDOC ## resolveProviderSkillsDirs() ### Description Gets all target directories for skill installation based on provider precedence. ### Method function ### Endpoint N/A (Function call) ### Parameters None ### Request Example ```javascript const skillDirs = resolveProviderSkillsDirs(); console.log(skillDirs); ``` ### Response #### Success Response (Array) - An array of absolute paths to directories where skills can be installed, ordered by precedence. #### Response Example ```json [ "/path/to/project/.agents/skills", "/usr/local/lib/caamp/skills" ] ``` ``` -------------------------------- ### initialize Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Initialize the adapter for a given project directory. This method sets up the adapter to communicate with Kimi. ```APIDOC ## initialize(projectDir: string) ### Description Initialize the adapter for a given project directory. ### Parameters #### Path Parameters - **projectDir** (string) - Required - Root directory of the project ``` -------------------------------- ### Get Statusline Configuration Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/adapters/api/examples.mdx Get the statusline setup command for Claude Code settings. Provide the path to the user's .cleo directory. ```typescript import { getStatuslineConfig } from './statusline.js'; const config = getStatuslineConfig('/home/user/.cleo'); ``` -------------------------------- ### installSkill() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/caamp/index.mdx Installs a skill from a local path to the canonical location and links it to agents. ```APIDOC ## installSkill() ### Description Install a skill from a local path to the canonical location and link to agents. ### Function Signature `installSkill()` ``` -------------------------------- ### installSkill(sourcePath: string, skillName: string, providers: Provider[], isGlobal: boolean, projectDir?: string) Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/generated/llms-full.txt Installs a skill from a local path to the canonical location and links it to specified agents. ```APIDOC ## installSkill(sourcePath: string, skillName: string, providers: Provider[], isGlobal: boolean, projectDir?: string) ### Description Install a skill from a local path to the canonical location and link to agents. ### Parameters - **sourcePath** (`string`): Local path to the skill directory to install. - **skillName** (`string`): Name for the installed skill. - **providers** (`Provider[]`): Target providers to link the skill to. - **isGlobal** (`boolean`): Whether to link to global or project skill directories. - **projectDir** (`string`, optional): Project directory (defaults to `process.cwd()`). ### Returns - `Promise`: Install result with linked agents and any errors. ### Example ```javascript const result = await installSkill("/tmp/my-skill", "my-skill", providers, true, "/my/project"); if (result.success) { console.log(`Linked to: ${result.linkedAgents.join(", ")}`); } ``` ``` -------------------------------- ### Clone Cleo Repository and Install Dependencies Source: https://github.com/kryptobaseddev/cleo/blob/main/README.md Clone the Cleo repository from GitHub and install its dependencies using pnpm. This is part of the development setup. ```bash git clone https://github.com/kryptobaseddev/cleo.git cd cleo pnpm install pnpm build pnpm test ``` -------------------------------- ### startTask() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/api-reference.mdx Starts a new task. ```APIDOC ## startTask() ### Description Initiates the execution of a new task. ### Method Not specified (likely a function call within an SDK) ### Endpoint Not applicable (SDK function) ### Parameters Details of the task to start are not specified. ### Request Example ``` startTask() ``` ### Response Information about the started task. Specific structure not provided. ``` -------------------------------- ### dispatchInstallSkillAcrossProviders() Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/generated/packages/api/examples.mdx Install a skill across a mixed set of providers, dispatching to their `Harness` implementation or falling back to a legacy installer. The example shows installing a skill across multiple providers and logging the result. ```APIDOC ## `dispatchInstallSkillAcrossProviders()` *Install a skill across a mixed set of providers, dispatching each provider to its `Harness` implementation when one exists and falling through to the legacy canonical+symlink installer for generic providers.* [View in API reference](/packages/./api/functions#dispatchinstallskillacrossproviders) ```typescript const result = await dispatchInstallSkillAcrossProviders( "/abs/path/to/skill", "my-skill", [getProvider("pi")!, getProvider("claude-code")!], true, ); console.log(result.linkedAgents); // e.g. ["pi", "claude-code"] ``` ``` -------------------------------- ### renderStart() Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/packages/cleo/api/functions.mdx Renders 'start' related data. Accepts data and a quiet flag. ```APIDOC ## renderStart() **Signature** ```typescript (data: Record, quiet: boolean) => string ``` ``` -------------------------------- ### Get Task with History Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/lafs/specs/external/specification.md Example of a GET request to retrieve a specific task, including a query parameter to specify the length of the task history to be returned. ```http GET /tasks/{id}?historyLength=10 ``` -------------------------------- ### Basic Command Example Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/skills/README.md Illustrates a basic command-line usage within a skill's example section. ```bash # Command example ``` -------------------------------- ### sessionStartNext Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/api-reference.md Starts the next session. ```APIDOC ## sessionStartNext() ### Description Starts the next session. ### Method Not specified (assumed to be a function call within an SDK or library) ### Endpoint Not applicable ### Parameters None specified ### Request Example ```javascript cleo.sessionStartNext(); ``` ### Response None specified ``` -------------------------------- ### Start Task Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/SKILL-monorepo/references/API-REFERENCE.md Start working on a specific task. Delegates to core/task-work/startTask. ```typescript (projectRoot: string, taskId: string) => Promise> ``` -------------------------------- ### Guide Format Structure Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/CLEO-DOCUMENTATION-SOP.md Guides in `docs/guides/` follow a practical, task-oriented structure. They prioritize step-by-step instructions and practical examples over formal specification language. ```markdown # Title **Task**: T#### **Epic**: T#### --- ## Overview What this guide covers and when to use it. ## Prerequisites What you need before starting. ## Steps / Architecture / Details The main content, organized by topic. ## Troubleshooting Common issues and solutions. ``` -------------------------------- ### End-to-End CLI Workflow Example Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/skills/skills/ct-docs-lookup/references/ctx7-workflow.md Illustrates a typical user interaction with the CLI for fetching documentation. It includes resolving libraries and fetching specific documentation, followed by composing an answer. ```bash # User asked: "How do I do streaming server actions in Next.js 15?" # Step 1 — resolve $ npx ctx7@latest library "Next.js" "How do I do streaming server actions in Next.js 15?" > /vercel/next.js/v15 (benchmark 0.87, snippets 1240, source: High) > /vercel/next.js (benchmark 0.85, snippets 5230, source: High) > ... # Step 2 — fetch (use version-pinned ID) $ npx ctx7@latest docs /vercel/next.js/v15 "How do I do streaming server actions in Next.js 15?" > [docs excerpt with streaming example, citation] # Compose answer using the fetched docs, citing version ``` -------------------------------- ### AdapterInstallProvider Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Interface for handling provider installation, uninstallation, and checking installation status. ```APIDOC ## AdapterInstallProvider ### Description Install provider interface for CLEO provider adapters. Handles registration with the provider and instruction file references. ### Methods #### install - **Signature**: `(options: InstallOptions) => Promise` - **Description**: Installs the provider. #### uninstall - **Signature**: `() => Promise` - **Description**: Uninstalls the provider. #### isInstalled - **Signature**: `() => Promise` - **Description**: Checks if the provider is installed. #### ensureInstructionReferences - **Signature**: `(projectDir: string) => Promise` - **Description**: Ensure the provider's instruction file references CLEO (e.g. AGENTS.md in CLAUDE.md). - **Parameters**: - `projectDir` (string): Absolute path to the project directory ``` -------------------------------- ### Install Skill to Providers Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/SKILL-monorepo/references/API-REFERENCE.md Installs a skill to one or more providers, with optional source and global flag. ```typescript (name: string, projectRoot: string, source?: string, isGlobal?: boolean) => Promise; targets: string[]; }>> ``` -------------------------------- ### Install Skill to Canonical Location Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/llms-full.txt Copies skill files to the canonical installation directory. Requires the source path of the skill and a desired name for the skill. ```typescript const canonicalPath = await installToCanonical("/tmp/my-skill", "my-skill"); console.log(`Installed to: ${canonicalPath}`); ``` -------------------------------- ### startSession Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/api-reference.md Starts a new session. ```APIDOC ## startSession() ### Description Starts a new session. ### Method N/A (Function Call) ### Parameters None explicitly documented. ### Request Example N/A ### Response None explicitly documented. ``` -------------------------------- ### Server Configuration with Environment Variable Reference Source: https://github.com/kryptobaseddev/cleo/blob/main/packages/caamp/docs/AGENTS-DIRECTORY-STANDARD.md Demonstrates how to reference environment variables within server arguments for dynamic configuration. ```json { "servers": { "database": { "type": "stdio", "command": "mcp-server-postgres", "args": ["${DATABASE_URL}"] } } } ``` -------------------------------- ### Install CLEO with curl (macOS / Linux) Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/guides/install.md Use this one-liner to automatically detect your OS, verify Node.js, install CLEO globally, and verify the installation. It will also launch the TUI setup wizard on first run. ```sh curl -fsSL https://raw.githubusercontent.com/kryptobaseddev/cleocode/main/scripts/install.sh | sh ``` -------------------------------- ### Install and Link Skill Source: https://github.com/kryptobaseddev/cleo/blob/main/docs/generated/SKILL-monorepo/references/API-REFERENCE.md Installs a skill from a local path to the canonical location and links it to specified agents. Handles both global and project-level linking. ```typescript (sourcePath: string, skillName: string, providers: Provider[], isGlobal: boolean, projectDir?: string) => Promise ``` ```typescript const result = await installSkill("/tmp/my-skill", "my-skill", providers, true, "/my/project"); if (result.success) { console.log(`Linked to: ${result.linkedAgents.join(", ")}`); } ```