Expand description
Package system for oxicode CLI
Packages bundle extensions, skills, prompts, and themes for sharing. Supports local directories, npm packages, git repositories, GitHub shorthand, and URL-based archives.
§Package sources
- Local path: a directory with
oxicode-package.tomlor auto-discoverable resources - npm:
npm:<package>[@<version>]— resolved from the npm registry - git:
https://github.com/org/repo.git[@ref],git://…,git+ssh://… - GitHub shorthand:
github:org/repo[@ref] - URL: direct
.tar.gz/.ziparchive
§Package manifest
A package is a directory containing an oxicode-package.toml file:
name = "@foo/oxicode-tools"
version = "1.0.0"
extensions = ["ext/index.ts"]
skills = ["skills/code-review/SKILL.md"]
prompts = ["prompts/review.md"]
themes = ["themes/dark-pro.json"]§Resource discovery
When a package lacks explicit resource lists, resources are discovered automatically by scanning the package directory:
- Extensions:
.so,.dylib,.dllfiles, orindex.ts/index.jsentries - Skills: Directories containing
SKILL.md - Prompts:
.mdfiles inprompts/subdirectory - Themes:
.jsonfiles inthemes/subdirectory
§Lockfile
An oxicode-lock.json file records exact versions/refs for reproducibility.
§Module layout
The package subsystem is split across several submodules for
navigability. Public re-exports at the bottom preserve the original
crate::storage::packages::* API.
types— core data types (manifest, kind, scope, progress events)source— source-spec parsing (ParsedSource, npm/git/url helpers)npm— npm registry client (NpmPackageInfo)git_ops— git command wrappers (git_clone,git_update, …)lockfile— lockfile types + SHA-256 integrity helpersdiscovery— auto-discovery of resources in a package directoryfs— generic filesystem helpers (copy_dir_recursive, …)manager—PackageManagerfacade + tests
Structs§
- Configured
Package - A configured package
- Discovered
Resource - A discovered resource within a package
- Doctor
Check - A single structured check result.
- Doctor
Report - Aggregated doctor report. A report is
all_clearwhen every check isHealthy. - Enabled
Summary - Convenience summary showing the layered precedence outcome.
- Lock
Entry - Lockfile entry for an installed package
- Lockfile
- The lockfile structure
- NpmPackage
Info - Information fetched from the npm registry
- Package
Manager - Manages installation, removal, and listing of packages
- Package
Manifest - Package manifest describing bundled resources
- Package
Update Info - Information about an available package update
- Path
Metadata - Metadata about a resolved resource path
- Progress
Event - Progress events for package operations
- Project
Plugin Overrides - Per-project plugin override file.
- Resolved
Paths - Resolved paths for all resource types
- Resolved
Resource - A resolved resource with metadata
- Resource
Counts - Counts of each resource type in a package
- Runtime
Config - Per-package disabled-resource toggle.
Enums§
- Force
State - Tri-state project force for a single (package, kind) pair.
- Health
- Severity of a single check.
- Parsed
Source - Parsed package source
- Progress
Action - Action being performed
- Progress
Event Type - Progress event type
- Resource
Kind - Types of resources a package can contribute
- Resource
Origin - Origin of a resource
- Source
Scope - Scope for package sources
Constants§
- RUNTIME_
CONFIG_ FILE - Default filename under
~/.oxicode. - RUNTIME_
CONFIG_ VERSION - On-disk schema version for
RuntimeConfig.
Functions§
- get_
latest_ npm_ version - Get the latest version of an npm package
- resolve_
enabled - Resolve the enabled flag for
(package, kind)under the layered precedence: project-force > runtime-disable > default(true). - run_
doctor - Construct a Doctor directly from a
PackageManagerreference.
Type Aliases§
- Force
Map - Map from package name to per-kind
ForceState. Keys present in the map override anything below them in the precedence chain. - Progress
Callback - Callback for progress events