Tuist provides a Swift package registry that lets you host private Swift packages, control access, and integrate seamlessly with Swift Package Manager.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tuist/tuist/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Tuist Registry provides:Private Packages
Host proprietary Swift packages securely
Team Access Control
Manage who can access your packages
Version Management
Publish and manage package versions
Tuist Registry follows the official Swift Package Registry specification, ensuring compatibility with Swift Package Manager.
Why Use a Private Registry?
Benefits
Keep code private
Keep code private
- Proprietary business logic
- Internal tools and utilities
- Company-specific frameworks
- Avoid exposing code publicly
Better than Git dependencies
Better than Git dependencies
Registry packages:
- Immutable versions
- Faster resolution
- Better caching
- No Git history bloat
- Require full repository clone
- Slower resolution
- Cache invalidation issues
- Expose full Git history
Enterprise control
Enterprise control
- Audit package downloads
- Control who accesses what
- Require authentication
- Track usage analytics
Getting Started
Setup Authentication
Publish a Package
Using Registry Packages
In Package.swift
Add registry packages as dependencies:Package.swift
In Tuist Projects
Use registry packages in your Tuist project:Project.swift
Resolution
Swift Package Manager will:- Check Tuist Registry first
- Download the package archive
- Cache it locally
- Link it to your project
Package Scopes
Organize packages with scopes (namespaces):Naming Convention
Use reverse-domain notation:- Scope: Company or organization (
com.acme) - Name: Package name (
networking) - Full ID:
com.acme.networking
Version Management
Semantic Versioning
Follow SemVer for version numbers:- Major (1.0.0): Breaking changes
- Minor (1.1.0): New features, backward compatible
- Patch (1.0.1): Bug fixes, backward compatible
Version Constraints
Consumers specify version requirements:- Exact Version
- Range
- Up to Next Major
- Branch
List Versions
View all published versions:Access Control
Authentication
Registry packages require authentication:Team Access
Control who can access packages:- Organization members: Automatic access to all packages
- External collaborators: Grant specific package access
- Public packages: Anyone can download (optional)
CI/CD Authentication
Use tokens for CI authentication:Publishing from CI
Automate package releases:Registry Analytics
Track package usage in Tuist Cloud:- Download counts per version
- Most popular packages in your organization
- Active users downloading packages
- Version adoption rates
Example Insights
Migration from Git Dependencies
Switch existing packages to the registry:Best Practices
Use semantic versioning
Use semantic versioning
- Follow SemVer strictly
- Document breaking changes
- Use major versions for breaking changes
- Avoid breaking changes in minor/patch releases
Automate publishing
Automate publishing
- Publish from CI on tag push
- Run tests before publishing
- Validate package structure
- Generate changelogs automatically
Document packages
Document packages
- Maintain a comprehensive README
- Include usage examples
- Document breaking changes
- Keep a CHANGELOG.md
Organize with scopes
Organize with scopes
- Use consistent naming
- Group related packages
- Separate by domain (networking, UI, analytics)
- Use company/org prefix
Troubleshooting
Package not found
Package not found
Possible causes:
- Package not published yet
- Registry not configured
- Authentication expired
- Verify package is published:
tuist registry list - Run
tuist registry setupagain - Re-authenticate:
tuist auth
Publishing fails
Publishing fails
Possible causes:
- Invalid Package.swift
- Missing git tag
- Version already exists
- Validate package:
swift build - Check git tags:
git tag -l - Use a new version number
Authentication issues in CI
Authentication issues in CI
Possible causes:
- Token not set
- Token expired
- Wrong environment variable
- Set
TUIST_TOKENenvironment variable - Regenerate token in Tuist Cloud
- Verify token has correct permissions
Registry Specification
Tuist Registry implements the Swift Package Registry Service Specification.Supported Features
- ✅ Package publication
- ✅ Version listing
- ✅ Package download
- ✅ Package metadata
- ✅ Authentication
- ✅ Scope-based organization
Future Enhancements
- Package signing and verification
- Mirror repositories
- Dependency scanning
- Vulnerability detection
Pricing
Registry usage is included in Tuist Cloud plans:- Free: Up to 5 packages
- Team: Unlimited packages
- Enterprise: Unlimited packages + advanced analytics
Contact sales for custom registry requirements or on-premises deployment.
Next Steps
Binary Caching
Speed up builds with smart caching
Build Insights
Monitor build performance