Module registry

Module registry 

Source
Expand description

Extension registry system for community connectors, tools, and agents.

Registries are directories (optionally backed by Git repositories) that contain Lua scripts and TOML definitions described by a registry.toml manifest. Multiple registries can be configured with precedence ordering:

community (readonly) → company (readonly) → personal (writable) → .ctx/ (project-local)

Later registries override earlier ones for the same extension name, and explicit ctx.toml entries always take highest precedence.

§Registry Layout

registry.toml          # manifest
connectors/
  jira/
    connector.lua
    config.example.toml
    README.md
tools/
  summarize/
    tool.lua
    README.md
agents/
  runbook/
    agent.lua
    README.md

Structs§

ExtensionEntry
Metadata about a single extension (connector, tool, or agent).
LoadedRegistry 🔒
RegistryInfo
Summary information about a loaded registry (for CLI display).
RegistryManager
Manages multiple extension registries with precedence-based resolution.
RegistryManifest
Parsed registry.toml manifest describing all extensions in a registry.
RegistryMeta
Top-level metadata about a registry.
ResolvedExtension
A resolved extension with its absolute script path and source registry.

Constants§

COMMUNITY_REGISTRY_URL 🔒
DEFAULT_BRANCH 🔒

Functions§

clone_registry
Shallow-clone a Git repository into target_dir.
cmd_add
ctx registry add <type/name> — scaffold a config entry in ctx.toml.
cmd_info
ctx registry info <type/name> — show details for a specific extension.
cmd_init_community
ctx registry init — interactive first-run community registry setup.
cmd_install
ctx registry install — clone configured registries that aren’t yet present.
cmd_list
ctx registry list — show configured registries and their extensions.
cmd_override
ctx registry override <type/name> — copy extension to a writable registry.
cmd_search
ctx registry search <query> — fuzzy search extensions by name/description/tags.
cmd_update
ctx registry update — git pull all (or a specific) registry.
copy_dir_recursive 🔒
Recursively copy a directory and all its contents.
default_registries_dir 🔒
Default directory for storing registries.
discover_manifest 🔒
Attempt to build a manifest by scanning the directory structure when no registry.toml is present (e.g. for .ctx/ project-local dirs).
expand_tilde 🔒
Expand ~ at the start of a path to the user’s home directory.
find_ctx_dir_from 🔒
Walk from start upward looking for a .ctx/ directory.
find_local_ctx_dir
Walk from the current directory upward looking for a .ctx/ directory.
home_dir 🔒
Get the user’s home directory.
is_dirty 🔒
Returns true if the git working tree has uncommitted changes.
is_git_repo
Returns true if the directory contains a .git subdirectory.
load_manifest
Load and parse a registry.toml manifest from a registry directory.
pull_registry
Pull the latest changes for a git-backed registry.