UNPKG

@agentled/cli

Version:

CLI for Agentled — manage workflows, apps, and knowledge from the command line. Zero context-window cost for AI agents.

45 lines (44 loc) 1.94 kB
/** * Bootstrap `~/.agentled/` on `agentled setup` runs. * * Writes: * ~/.agentled/README.md (top-level pointer) * ~/.agentled/.content-version (refresh marker) * ~/.agentled/docs/WORKFLOW-SHAPE.md (canonical shape) * ~/.agentled/docs/GETTING-STARTED.md (5-min first workflow) * ~/.agentled/docs/GOTCHAS.md (silent failure modes) * ~/.agentled/docs/PATTERNS.md (scaffold index) * ~/.agentled/examples/scaffolds/* (copied from packages/cli/scaffolds/) * * **`docs/` and `examples/scaffolds/` are CLI-managed.** When the * bundled `HOME_CONTENT_VERSION` advances past the on-disk marker, the * bootstrap unconditionally rewrites every bundled file — user edits * to those files WILL be overwritten. Treat them as read-only and put * your own notes in `~/.agentled/docs/local/` (never touched) or in * the per-workspace `agentled_<slug>/` folder. * * `config.json` is never touched. * * `HOME_CONTENT_VERSION` is decoupled from the CLI semver — it bumps * only when bundled docs change, so a CLI patch release with no doc * change does NOT trigger a rewrite. * * Idempotent: a re-run with the same marker version is a no-op. */ export interface BootstrapResult { homeDir: string; /** True when this run wrote or refreshed any docs. */ refreshed: boolean; /** Number of scaffold files copied into examples/scaffolds/. */ scaffoldsCopied: number; /** Marker version after this run — matches HOME_CONTENT_VERSION on success. */ version: string; } /** * Idempotent. Creates `~/.agentled/` if missing and rewrites the * bundled docs + scaffolds when the on-disk content version is older * than `HOME_CONTENT_VERSION`. Bundled files are unconditionally * overwritten on refresh; never touches `config.json` or any file * under `docs/local/`. */ export declare function bootstrapAgentledHome(): BootstrapResult;