cli/docs/cmd/pkg/index.md
Virgil 2a9177a30b
All checks were successful
Security Scan / security (push) Successful in 18s
feat(pkg): add json output for pkg update
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 05:38:12 +00:00

3.2 KiB

core pkg

Package management for host-uk repositories.

Usage

core pkg <command> [flags]

Commands

Command Description
search Search GitHub for packages
install Clone a package from GitHub
list List installed packages
update Update installed packages
outdated Check for outdated packages

Search GitHub for host-uk packages.

core pkg search [flags]

Results are cached for 1 hour in .core/cache/.

Flags

Flag Description
--org GitHub organisation (default: host-uk)
--pattern Repo name pattern (* for wildcard)
--type Filter by type in name (mod, services, plug, website)
--limit Max results (default: 50)
--refresh Bypass cache and fetch fresh data

Examples

# List all repos in org
core pkg search

# Search for core-* repos
core pkg search --pattern 'core-*'

# Search different org
core pkg search --org mycompany

# Bypass cache
core pkg search --refresh

pkg install

Clone a package from GitHub. If you pass only a repo name, core assumes the host-uk org.

core pkg install [org/]repo [flags]

Flags

Flag Description
--dir Target directory (default: ./packages or current dir)
--add Add to repos.yaml registry

Examples

# Clone from the default host-uk org
core pkg install core-api

# Clone to packages/
core pkg install host-uk/core-php

# Clone to custom directory
core pkg install host-uk/core-tenant --dir ./packages

# Clone and add to registry
core pkg install host-uk/core-admin --add

pkg list

List installed packages from repos.yaml.

core pkg list

Shows installed status (✓) and description for each package.

Flags

Flag Description
--format Output format (table or json)

JSON Output

When --format json is set, core pkg list emits a structured report with package entries, installed state, and summary counts.


pkg update

Pull latest changes for installed packages.

core pkg update [<name>...] [flags]

Flags

Flag Description
--all Update all packages
--format Output format (table or json)

Examples

# Update specific package
core pkg update core-php

# Update all packages
core pkg update --all

# JSON output for automation
core pkg update --format json

JSON Output

When --format json is set, core pkg update emits a structured report with per-package update status and summary totals.


pkg outdated

Check which packages have unpulled commits.

core pkg outdated

Fetches from remote and shows packages that are behind.

Flags

Flag Description
--format Output format (table or json)

JSON Output

When --format json is set, core pkg outdated emits a structured report with package status, behind counts, and summary totals.


See Also

  • setup - Clone all repos from registry
  • dev work - Multi-repo workflow