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.mdStructs§
- Extension
Entry - Metadata about a single extension (connector, tool, or agent).
- Loaded
Registry 🔒 - Registry
Info - Summary information about a loaded registry (for CLI display).
- Registry
Manager - Manages multiple extension registries with precedence-based resolution.
- Registry
Manifest - Parsed
registry.tomlmanifest describing all extensions in a registry. - Registry
Meta - Top-level metadata about a registry.
- Resolved
Extension - A resolved extension with its absolute script path and source registry.
Constants§
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.tomlis 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
startupward 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
trueif the git working tree has uncommitted changes. - is_
git_ repo - Returns
trueif the directory contains a.gitsubdirectory. - load_
manifest - Load and parse a
registry.tomlmanifest from a registry directory. - pull_
registry - Pull the latest changes for a git-backed registry.