# liferes/everyagent architecture

> Architecture diagram of the GitHub repository liferes/everyagent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/liferes/everyagent
- Repository: https://github.com/liferes/everyagent

## Overview

everyagent is a CLI for converting agent skills, rules, and companion assets among nine coding-agent formats. Its main workflow fetches or reads a source, detects and parses its format into a shared model, lets the user choose targets, rewrites paths and emits files while protecting existing edits. Separate commands manage installed content through manifests, including sync, list, remove, and lint. The graph reflects README capabilities and shown imports/calls; several implementation details are unsampled, so uncertain links are omitted.

Main entry points: [`src/index.ts`](https://github.com/liferes/everyagent/blob/main/src/index.ts) (CLI entry), [`src/core/pipeline.ts`](https://github.com/liferes/everyagent/blob/main/src/core/pipeline.ts) (Conversion orchestration), [`src/adapters/registry.ts`](https://github.com/liferes/everyagent/blob/main/src/adapters/registry.ts) (Adapter registry), [`src/cli/prompts.ts`](https://github.com/liferes/everyagent/blob/main/src/cli/prompts.ts) (Interactive prompts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and interaction"]
  node_entry["CLI entry<br/>[index.ts]"]
  node_arguments["Argument parsing<br/>[args.ts]"]
  node_prompts["Interactive prompts<br/>[prompts.ts]"]
  node_diff["Conflict diffs<br/>[diff.ts]"]
  node_logger["CLI output<br/>[logger.ts]"]
end

subgraph group_conversion["Conversion pipeline"]
  node_source["Source fetching<br/>[fetcher.ts]"]
  node_detection["Format detection<br/>[detector.ts]"]
  node_pipeline["Conversion orchestration<br/>[pipeline.ts]"]
  node_shared["Shared format model<br/>[ir.ts]"]
  node_rewriter["Path rewriting<br/>[rewriter.ts]"]
  node_writer["Safe file writing<br/>[writer.ts]"]
  node_fuzzy["Name matching<br/>[fuzzy.ts]"]
end

subgraph group_formats["Format support"]
  node_registry["Adapter registry<br/>[registry.ts]"]
  node_cursor["Cursor adapter<br/>[cursor.ts]"]
  node_adapters["Other format adapters"]
end

subgraph group_management["Install management"]
  node_manifest["Install manifest<br/>[manifest.ts]"]
  node_sync["Sync and removal<br/>[sync.ts]"]
  node_lint["Installed content lint<br/>[lint.ts]"]
end

node_user(("User"))

node_user -->|"runs commands"| node_entry
node_entry -->|"parses options"| node_arguments
node_entry -->|"requests choices"| node_prompts
node_prompts -->|"shows differences"| node_diff
node_entry -->|"reports results"| node_logger
node_entry -->|"converts source"| node_pipeline
node_prompts -->|"previews conversion"| node_pipeline
node_pipeline -->|"fetches files"| node_source
node_pipeline -->|"selects adapter"| node_registry
node_pipeline -->|"matches skills"| node_fuzzy
node_pipeline -->|"rewrites paths"| node_rewriter
node_pipeline -->|"writes output"| node_writer
node_pipeline -->|"uses model"| node_shared
node_registry -->|"registers adapter"| node_cursor
node_registry -->|"registers adapters"| node_adapters
node_entry -->|"detects formats"| node_detection
node_detection -->|"queries adapters"| node_registry
node_entry -->|"tracks installs"| node_manifest
node_entry -->|"manages installs"| node_sync
node_entry -->|"checks content"| node_lint
node_sync -->|"checks recorded files"| node_manifest
node_entry -->|"writes managed files"| node_writer

click node_entry "https://github.com/liferes/everyagent/blob/main/src/index.ts"
click node_arguments "https://github.com/liferes/everyagent/blob/main/src/cli/args.ts"
click node_prompts "https://github.com/liferes/everyagent/blob/main/src/cli/prompts.ts"
click node_diff "https://github.com/liferes/everyagent/blob/main/src/cli/diff.ts"
click node_logger "https://github.com/liferes/everyagent/blob/main/src/cli/logger.ts"
click node_source "https://github.com/liferes/everyagent/blob/main/src/core/fetcher.ts"
click node_detection "https://github.com/liferes/everyagent/blob/main/src/core/detector.ts"
click node_pipeline "https://github.com/liferes/everyagent/blob/main/src/core/pipeline.ts"
click node_shared "https://github.com/liferes/everyagent/blob/main/src/core/ir.ts"
click node_rewriter "https://github.com/liferes/everyagent/blob/main/src/core/rewriter.ts"
click node_writer "https://github.com/liferes/everyagent/blob/main/src/core/writer.ts"
click node_registry "https://github.com/liferes/everyagent/blob/main/src/adapters/registry.ts"
click node_cursor "https://github.com/liferes/everyagent/blob/main/src/adapters/cursor.ts"
click node_adapters "https://github.com/liferes/everyagent/tree/main/src/adapters"
click node_manifest "https://github.com/liferes/everyagent/blob/main/src/core/manifest.ts"
click node_sync "https://github.com/liferes/everyagent/blob/main/src/core/sync.ts"
click node_lint "https://github.com/liferes/everyagent/blob/main/src/core/lint.ts"
click node_fuzzy "https://github.com/liferes/everyagent/blob/main/src/core/fuzzy.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_arguments,node_prompts,node_diff,node_logger,node_user toneBlue
class node_source,node_detection,node_pipeline,node_shared,node_rewriter,node_writer,node_fuzzy toneAmber
class node_registry,node_cursor,node_adapters toneMint
class node_manifest,node_sync,node_lint toneRose
```

## Components

### CLI and interaction

- [CLI entry](https://github.com/liferes/everyagent/blob/main/src/index.ts): `src/index.ts`
- [Argument parsing](https://github.com/liferes/everyagent/blob/main/src/cli/args.ts): `src/cli/args.ts`
- [Interactive prompts](https://github.com/liferes/everyagent/blob/main/src/cli/prompts.ts): `src/cli/prompts.ts`
- [Conflict diffs](https://github.com/liferes/everyagent/blob/main/src/cli/diff.ts): `src/cli/diff.ts`
- [CLI output](https://github.com/liferes/everyagent/blob/main/src/cli/logger.ts): `src/cli/logger.ts`

### Conversion pipeline

- [Source fetching](https://github.com/liferes/everyagent/blob/main/src/core/fetcher.ts): `src/core/fetcher.ts`
- [Format detection](https://github.com/liferes/everyagent/blob/main/src/core/detector.ts): `src/core/detector.ts`
- [Conversion orchestration](https://github.com/liferes/everyagent/blob/main/src/core/pipeline.ts): `src/core/pipeline.ts`
- [Shared format model](https://github.com/liferes/everyagent/blob/main/src/core/ir.ts): `src/core/ir.ts`
- [Path rewriting](https://github.com/liferes/everyagent/blob/main/src/core/rewriter.ts): `src/core/rewriter.ts`
- [Safe file writing](https://github.com/liferes/everyagent/blob/main/src/core/writer.ts): `src/core/writer.ts`
- [Name matching](https://github.com/liferes/everyagent/blob/main/src/core/fuzzy.ts): `src/core/fuzzy.ts`

### Format support

- [Adapter registry](https://github.com/liferes/everyagent/blob/main/src/adapters/registry.ts): `src/adapters/registry.ts`
- [Cursor adapter](https://github.com/liferes/everyagent/blob/main/src/adapters/cursor.ts): `src/adapters/cursor.ts`
- [Other format adapters](https://github.com/liferes/everyagent/tree/main/src/adapters): `src/adapters`

### Install management

- [Install manifest](https://github.com/liferes/everyagent/blob/main/src/core/manifest.ts): `src/core/manifest.ts`
- [Sync and removal](https://github.com/liferes/everyagent/blob/main/src/core/sync.ts): `src/core/sync.ts`
- [Installed content lint](https://github.com/liferes/everyagent/blob/main/src/core/lint.ts): `src/core/lint.ts`

### Other components

- **User**

## Connections

- User → CLI entry: runs commands (evidence: `README.md`)
- CLI entry → Argument parsing: parses options (evidence: `src/index.ts`)
- CLI entry → Interactive prompts: requests choices (evidence: `src/index.ts`)
- Interactive prompts → Conflict diffs: shows differences (evidence: `src/cli/prompts.ts`)
- CLI entry → CLI output: reports results (evidence: `src/index.ts`)
- CLI entry → Conversion orchestration: converts source (evidence: `src/index.ts`)
- Interactive prompts → Conversion orchestration: previews conversion (evidence: `src/cli/prompts.ts`)
- Conversion orchestration → Source fetching: fetches files (evidence: `src/core/pipeline.ts`)
- Conversion orchestration → Adapter registry: selects adapter (evidence: `src/core/pipeline.ts`)
- Conversion orchestration → Name matching: matches skills (evidence: `src/core/pipeline.ts`)
- Conversion orchestration → Path rewriting: rewrites paths (evidence: `src/core/pipeline.ts`)
- Conversion orchestration → Safe file writing: writes output (evidence: `src/core/pipeline.ts`)
- Conversion orchestration → Shared format model: uses model (evidence: `src/core/pipeline.ts`)
- Adapter registry → Cursor adapter: registers adapter (evidence: `src/adapters/registry.ts`)
- Adapter registry → Other format adapters: registers adapters (evidence: `src/adapters/registry.ts`)
- CLI entry → Format detection: detects formats (evidence: `src/index.ts`)
- Format detection → Adapter registry: queries adapters (evidence: `src/core/detector.ts`)
- CLI entry → Install manifest: tracks installs (evidence: `src/index.ts`)
- CLI entry → Sync and removal: manages installs (evidence: `src/index.ts`)
- CLI entry → Installed content lint: checks content (evidence: `src/index.ts`)
- Sync and removal → Install manifest: checks recorded files (evidence: `src/core/sync.ts`)
- CLI entry → Safe file writing: writes managed files (evidence: `src/index.ts`)
