aam publish (deprecated)¶
Package Authoring
Deprecated
aam publish is deprecated and will be removed in v0.3.0. Use aam pkg publish instead. The command still works but prints a deprecation warning.
Synopsis¶
Description¶
Publish a packed .aam archive to a configured registry. Must be run from the package directory containing aam.yaml. The archive must exist (run aam pkg pack first).
For local registries, copies the archive and updates metadata. For HTTP registries, uploads the archive and updates the package index.
Arguments¶
This command takes no arguments.
Options¶
| Option | Short | Default | Description |
|---|---|---|---|
--registry | default | Target registry name | |
--tag | latest | Distribution tag for this version | |
--dry-run | false | Preview without publishing |
Examples¶
Example 1: Publish to Default Registry¶
Output:
Publishing my-package@1.0.0 to local...
✓ Archive verified: sha256:a1b2c3d4e5f6...
✓ Copied to registry
✓ Updated metadata.yaml
✓ Rebuilt index.yaml
✓ Tagged as 'latest'
✓ Published my-package@1.0.0
Example 2: Publish to Specific Registry¶
Output:
Publishing my-package@1.0.0 to company-registry...
✓ Archive verified: sha256:a1b2c3d4e5f6...
✓ Copied to registry
✓ Updated metadata.yaml
✓ Rebuilt index.yaml
✓ Tagged as 'latest'
✓ Published my-package@1.0.0
Example 3: Publish with Custom Tag¶
Publishes and tags the version as beta. Users can install with:
Example 4: Dry Run¶
Output:
Publishing my-package@1.0.0 to local...
✓ Archive verified: sha256:a1b2c3d4e5f6...
[Dry run — package not published]
Example 5: Missing Archive¶
Output:
Solution:
Example 6: No Registries Configured¶
Output:
Example 7: Registry Not Found¶
Output:
Exit Codes¶
| Code | Meaning |
|---|---|
| 0 | Success - package published |
| 1 | Error - archive not found, registry error, or validation failed |
Publishing Flow¶
When you run aam pkg publish:
- Load manifest to get package name and version
- Find
.aamarchive in directory - Get target registry from config
- Verify archive checksum
- Copy/upload archive to registry
- Update registry metadata
- Rebuild registry index
- Apply distribution tag
Distribution Tags¶
Tags are named aliases for versions:
latest- Automatically set to newest version (default)beta- Pre-release versionstable- Production-ready version- Custom tags for organizational workflows
Install using tags:
Related Commands¶
aam pkg pack- Create distributable archiveaam pkg validate- Validate before publishingaam registry list- List configured registries
Notes¶
Registry Types¶
Local registries:
- Packages are copied to the registry directory
- Metadata updated immediately
- No network required
- Suitable for offline use or file-sharing
HTTP registries:
- Packages are uploaded via API
- May require authentication
- Support additional features (analytics, signing)
- Central discovery for teams
Workflow¶
Typical publishing workflow:
# 1. Create or update package
aam pkg validate
# 2. Pack archive
aam pkg pack
# 3. Publish to registry
aam pkg publish
# Or chain commands:
aam pkg validate && aam pkg pack && aam pkg publish
Version Conflicts¶
If the version already exists in the registry:
Local registry:
HTTP registry:
Solution: Increment the version in aam.yaml:
Then re-pack and publish.
Checksum Verification¶
The archive checksum is verified before publishing to ensure the file is not corrupted.
Multiple Registries¶
If you have multiple registries:
# Publish to default
aam pkg publish
# Publish to company internal registry
aam pkg publish --registry company-internal
# Publish to public registry
aam pkg publish --registry aam-central
Archive Naming¶
The command looks for archives matching this pattern:
For scoped packages:
If multiple archives exist, the first match is used.
Tagging Workflow¶
Advanced tagging workflow:
# Publish as beta first
aam pkg publish --tag beta
# After testing, promote to latest
aam dist-tag add my-package@1.0.0 latest
# Mark as stable
aam dist-tag add my-package@1.0.0 stable
CI/CD Publishing¶
Example for automated publishing: