Registry
Publishing Packages
Publish your Dhara extension to the registry.
Publishing Packages
Publish your extension to the Dhara Registry so others can discover and install it.
Prerequisites
- Dhara CLI installed globally
- Registry account — Sign up at registry.dhara.zosma.ai
- Auth token — Generate from your account settings
Project Structure
my-extension/
├── manifest.json # Package manifest (required)
├── src/ # Source code
│ └── index.js # Entry point
├── README.md # Documentation
└── package-lock.json # Dependencies (if any)Step 1: Create Manifest
Create manifest.json with required fields:
{
"name": "my-extension",
"version": "1.0.0",
"description": "A useful tool for AI agents",
"main": "src/index.js",
"author": "your-username",
"license": "MIT",
"capabilities": [
"filesystem:read"
],
"tools": [
{
"name": "my_tool",
"description": "Does something useful",
"inputSchema": {
"type": "object",
"properties": {
"input": { "type": "string" }
},
"required": ["input"]
}
}
]
}Step 2: Validate Locally
# Validate manifest schema
dhara doctor --validate-manifest ./manifest.json
# Test extension locally
dhara extension install ./my-extension/
dhara --repl "Test my extension"Step 3: Authenticate
Configure your registry auth token:
dhara config set registryToken "your-token-here"Or via environment variable:
export DHARA_REGISTRY_TOKEN="your-token-here"Step 4: Publish
# Publish to registry
cd my-extension/
dhara publish
# Publish with dry run first
dhara publish --dry-runThe publish process:
- Validates manifest against schema
- Checks for required fields
- Verifies capabilities match tool definitions
- Uploads package tarball
- Creates registry listing
Step 5: Update Versions
Bump version in manifest.json:
{ "version": "1.1.0" }Then republish:
dhara publishVersion rules follow semantic versioning:
| Change | Version Bump |
|---|---|
| Bug fix | Patch: 1.0.0 → 1.0.1 |
| New feature | Minor: 1.0.0 → 1.1.0 |
| Breaking change | Major: 1.0.0 → 2.0.0 |
Unpublishing
Remove a specific version:
dhara unpublish my-extension@1.0.0Note: You cannot unpublish the latest version. Deprecate instead:
dhara deprecate my-extension@1.0.0 "Use v2.0.0 instead"Package Naming Rules
- Lowercase letters, numbers, and hyphens only
- Must start with a letter
- Scoped packages:
@scope/name - Maximum 214 characters
Best Practices
- Write clear descriptions — Users discover tools via search
- Declare minimal capabilities — Request only what you need
- Include a README — Document usage and examples
- Test locally first — Use
--dry-runbefore publishing - Version carefully — Follow semver strictly
- Respond to issues — Maintain your published packages
SDKs for Building Extensions
Use official SDKs for faster development:
TypeScript
npm init dhara-extension my-ext
cd my-ext
npm run build
dhara publishPython
pip install dhara-sdk
dhara-sdk init my-ext
cd my-ext
python -m build
dhara publishRust
cargo install dhara-sdk-cli
dhara-sdk init my-ext --lang rust
cd my-ext
cargo build --release
dhara publish