# gohighlevel/marketplace-cli architecture

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

- Interactive diagram: https://gitdiagram.com/gohighlevel/marketplace-cli
- Repository: https://github.com/gohighlevel/marketplace-cli

## Overview

HighLevel Marketplace CLI is a terminal client for creating and managing marketplace apps. Its principal workflow is to authenticate, select an app, pull its configuration into a local workspace, validate and review changes, then push updates or publish. Separate capabilities cover workflow actions and triggers, billing, webhooks, OAuth settings, media, and sandbox accounts. The API client provides resource operations, while shared validation and workspace tooling support these flows. Some subsystem connections are documented in the README; unsampled implementation details and uncertain call paths are not inferred.

Main entry points: [`src/commands/app/actions/index.ts`](https://github.com/gohighlevel/marketplace-cli/blob/main/src/commands/app/actions/index.ts) (App commands), [`src/lib/app/pull.ts`](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/pull.ts) (Pull workspace), [`src/lib/app/profile-sections.ts`](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/profile-sections.ts) (App validation), [`src/lib/workflows/commands/base.ts`](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/workflows/commands/base.ts) (Workflow commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and identity"]
  node_app_commands["App commands<br/>[index.ts]"]
  node_auth_commands["Login and accounts<br/>[login.ts]"]
  node_auth["Auth sessions<br/>[session.ts]"]
end

subgraph group_app["App workspace"]
  node_app_context["App selection<br/>[context.ts]"]
  node_app_pull["Pull workspace<br/>[pull.ts]"]
  node_app_sync["App synchronization<br/>[sync.ts]"]
  node_app_validation["App validation"]
  node_app_schemas["JSON schemas<br/>[builders.ts]"]
  node_app_publish["Publish readiness"]
end

subgraph group_workflows["Workflow configuration"]
  node_work_action["Workflow actions<br/>[service.ts]"]
  node_work_trigger["Workflow triggers<br/>[service.ts]"]
  node_work_commands["Workflow commands<br/>[base.ts]"]
end

subgraph group_services["Marketplace services"]
  node_billing["Billing configuration<br/>[service.ts]"]
  node_webhooks["Webhook management"]
  node_media["Media handling<br/>[media.ts]"]
end

subgraph group_platform["API and shared layers"]
  node_api_client["API client<br/>[client.ts]"]
  node_api_core["HTTP API core<br/>[core.ts]"]
  node_api_resources["API resources<br/>[apps.ts]"]
  node_environment["Environment config<br/>[environment.ts]"]
  node_validation["Shared validation<br/>[validation.ts]"]
end

node_developer(("Developer"))
node_marketplace{{"Marketplace services"}}

node_developer -->|"authenticates"| node_auth_commands
node_auth_commands -->|"stores session"| node_auth
node_developer -->|"runs commands"| node_app_commands
node_app_commands -.->|"resolves app"| node_app_context
node_app_context -->|"binds workspace"| node_app_pull
node_app_commands -->|"pulls configuration"| node_app_pull
node_app_commands -->|"validates configuration"| node_app_validation
node_app_validation -.->|"checks schema"| node_app_schemas
node_app_commands -->|"syncs changes"| node_app_sync
node_app_commands -->|"checks readiness"| node_app_publish
node_app_commands -->|"manages workflows"| node_work_commands
node_work_commands -.->|"runs action tasks"| node_work_action
node_work_commands -.->|"runs trigger tasks"| node_work_trigger
node_app_pull -->|"pulls actions"| node_work_action
node_app_pull -->|"pulls triggers"| node_work_trigger
node_app_commands -->|"manages billing"| node_billing
node_app_commands -->|"manages webhooks"| node_webhooks
node_app_commands -->|"uploads media"| node_media
node_api_client -->|"extends core"| node_api_core
node_api_client -->|"adds app resource"| node_api_resources
node_api_resources -->|"requests data"| node_api_core
node_app_pull -.->|"loads remote data"| node_api_client
node_environment -.->|"configures endpoints"| node_api_core
node_app_validation -->|"uses validators"| node_validation
node_app_commands -->|"manages apps"| node_marketplace
node_auth -.->|"exchanges credentials"| node_marketplace

click node_app_commands "https://github.com/gohighlevel/marketplace-cli/blob/main/src/commands/app/actions/index.ts"
click node_auth_commands "https://github.com/gohighlevel/marketplace-cli/blob/main/src/commands/login.ts"
click node_auth "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/auth/session.ts"
click node_app_context "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/context.ts"
click node_app_pull "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/pull.ts"
click node_app_sync "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/sync.ts"
click node_app_validation "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/profile-sections.ts"
click node_app_schemas "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/json-schemas/builders.ts"
click node_app_publish "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/publish-readiness.ts"
click node_work_action "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/workflows/actions/service.ts"
click node_work_trigger "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/workflows/triggers/service.ts"
click node_work_commands "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/workflows/commands/base.ts"
click node_billing "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/billing/service.ts"
click node_webhooks "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/webhooks/workspace-mutation.ts"
click node_media "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/media.ts"
click node_api_client "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/api/client.ts"
click node_api_core "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/api/core.ts"
click node_api_resources "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/api/resources/apps.ts"
click node_environment "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/config/environment.ts"
click node_validation "https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/shared/validation.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_app_commands,node_auth_commands,node_auth toneBlue
class node_app_context,node_app_pull,node_app_sync,node_app_validation,node_app_schemas,node_app_publish toneAmber
class node_work_action,node_work_trigger,node_work_commands toneMint
class node_billing,node_webhooks,node_media toneRose
class node_api_client,node_api_core,node_api_resources,node_environment,node_validation,node_developer,node_marketplace toneIndigo
```

## Components

### CLI and identity

- [App commands](https://github.com/gohighlevel/marketplace-cli/blob/main/src/commands/app/actions/index.ts): `src/commands/app/actions/index.ts`
- [Login and accounts](https://github.com/gohighlevel/marketplace-cli/blob/main/src/commands/login.ts): `src/commands/login.ts`
- [Auth sessions](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/auth/session.ts): `src/lib/auth/session.ts`

### App workspace

- [App selection](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/context.ts): `src/lib/app/context.ts`
- [Pull workspace](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/pull.ts): `src/lib/app/pull.ts`
- [App synchronization](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/sync.ts): `src/lib/app/sync.ts`
- [App validation](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/profile-sections.ts): `src/lib/app/profile-sections.ts`
- [JSON schemas](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/json-schemas/builders.ts): `src/lib/app/json-schemas/builders.ts`
- [Publish readiness](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/publish-readiness.ts): `src/lib/app/publish-readiness.ts`

### Workflow configuration

- [Workflow actions](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/workflows/actions/service.ts): `src/lib/workflows/actions/service.ts`
- [Workflow triggers](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/workflows/triggers/service.ts): `src/lib/workflows/triggers/service.ts`
- [Workflow commands](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/workflows/commands/base.ts): `src/lib/workflows/commands/base.ts`

### Marketplace services

- [Billing configuration](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/billing/service.ts): `src/lib/billing/service.ts`
- [Webhook management](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/webhooks/workspace-mutation.ts): `src/lib/webhooks/workspace-mutation.ts`
- [Media handling](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/app/media.ts): `src/lib/app/media.ts`

### API and shared layers

- [API client](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/api/client.ts): `src/lib/api/client.ts`
- [HTTP API core](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/api/core.ts): `src/lib/api/core.ts`
- [API resources](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/api/resources/apps.ts): `src/lib/api/resources/apps.ts`
- [Environment config](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/config/environment.ts): `src/lib/config/environment.ts`
- [Shared validation](https://github.com/gohighlevel/marketplace-cli/blob/main/src/lib/shared/validation.ts): `src/lib/shared/validation.ts`

### Other components

- **Developer**
- **Marketplace services**

## Connections

- Developer → Login and accounts: authenticates (evidence: `README.md`)
- Login and accounts → Auth sessions: stores session (evidence: `src/commands/login.ts`)
- Developer → App commands: runs commands (evidence: `README.md`)
- App commands → App selection: resolves app
- App selection → Pull workspace: binds workspace (evidence: `src/lib/app/context.ts`)
- App commands → Pull workspace: pulls configuration (evidence: `README.md`)
- App commands → App validation: validates configuration (evidence: `README.md`)
- App validation → JSON schemas: checks schema
- App commands → App synchronization: syncs changes (evidence: `README.md`)
- App commands → Publish readiness: checks readiness (evidence: `README.md`)
- App commands → Workflow commands: manages workflows (evidence: `README.md`)
- Workflow commands → Workflow actions: runs action tasks
- Workflow commands → Workflow triggers: runs trigger tasks
- Pull workspace → Workflow actions: pulls actions (evidence: `src/lib/app/pull.ts`)
- Pull workspace → Workflow triggers: pulls triggers (evidence: `src/lib/app/pull.ts`)
- App commands → Billing configuration: manages billing (evidence: `README.md`)
- App commands → Webhook management: manages webhooks (evidence: `README.md`)
- App commands → Media handling: uploads media
- API client → HTTP API core: extends core (evidence: `src/lib/api/client.ts`)
- API client → API resources: adds app resource (evidence: `src/lib/api/client.ts`)
- API resources → HTTP API core: requests data (evidence: `src/lib/api/resources/apps.ts`)
- Pull workspace → API client: loads remote data
- Environment config → HTTP API core: configures endpoints (evidence: `src/lib/api/core.ts`)
- App validation → Shared validation: uses validators (evidence: `src/lib/app/profile-sections.ts`)
- App commands → Marketplace services: manages apps (evidence: `README.md`)
- Auth sessions → Marketplace services: exchanges credentials
