More Language Formats
Artifact Keeper supports additional package formats beyond the most common ones. This guide covers configuration and usage for Hex, Pub, Swift, CocoaPods, CRAN, SBT, and Conda.
Hex (Elixir / Erlang)
Hex is the package manager for the Erlang ecosystem, used by Elixir and Erlang projects.
Endpoint Information
- Repository Type Key:
hex - API Endpoint:
/hex/{repo} - Clients:
mix,rebar3
Client Configuration
Configure the HEX_MIRROR environment variable to point to your Artifact Keeper instance:
export HEX_MIRROR=https://artifact-keeper.example.com/hex/my-repoFor Mix projects, you can also configure the mirror in mix.exs:
defp deps do [ {:my_package, "~> 1.0", organization: "my-repo"} ]endPublishing Packages
Publish packages using mix hex.publish:
# Build and publishmix hex.buildmix hex.publish --organization my-repoInstalling Packages
Install packages using Mix:
mix deps.getOr with rebar3:
rebar3 get-depsPub (Dart / Flutter)
Pub is the package manager for Dart and Flutter applications.
Endpoint Information
- Repository Type Key:
pub - API Endpoint:
/pub/{repo} - Clients:
dart pub,flutter pub
Client Configuration
Configure the PUB_HOSTED_URL environment variable:
export PUB_HOSTED_URL=https://artifact-keeper.example.com/pub/my-repoOr configure it in pubspec.yaml:
dependencies: my_package: hosted: url: https://artifact-keeper.example.com/pub/my-repo version: ^1.0.0Publishing Packages
Publish packages using dart pub publish or flutter pub publish:
# Dry rundart pub publish --dry-run
# Publishdart pub publish --server https://artifact-keeper.example.com/pub/my-repoInstalling Packages
Install packages using pub:
# Dartdart pub get
# Flutterflutter pub getSwift
Swift Package Manager is the official package manager for Swift and Apple ecosystem projects.
Endpoint Information
- Repository Type Key:
swift - API Endpoint:
/swift/{repo} - Clients: Swift Package Manager
Client Configuration
Configure package dependencies in Package.swift:
import PackageDescription
let package = Package( name: "MyPackage", dependencies: [ .package( url: "https://artifact-keeper.example.com/swift/my-repo/MyDependency", from: "1.0.0" ) ], targets: [ .target( name: "MyPackage", dependencies: ["MyDependency"] ) ])Publishing Packages
Swift packages are typically published via Git tags. Configure your repository URL to point to Artifact Keeper:
# Tag and push to Artifact Keepergit tag 1.0.0git push https://artifact-keeper.example.com/swift/my-repo/MyPackage --tagsResolving Packages
Resolve and update packages:
swift package resolveswift package updateCocoaPods (iOS / macOS)
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.
Endpoint Information
- Repository Type Key:
cocoapods - API Endpoint:
/cocoapods/{repo} - Clients:
pod
Client Configuration
Configure your Podfile to use Artifact Keeper as a source:
source 'https://artifact-keeper.example.com/cocoapods/my-repo'source 'https://cdn.cocoapods.org/' # Fallback to public CocoaPods
platform :ios, '14.0'
target 'MyApp' do use_frameworks!
pod 'MyPrivatePod', '~> 1.0' pod 'Alamofire', '~> 5.0' # Public pod from CocoaPodsendPublishing Pods
Publish a pod to your private repository:
# Validate podspecpod spec lint MyPod.podspec
# Push to Artifact Keeperpod repo add my-repo https://artifact-keeper.example.com/cocoapods/my-repopod repo push my-repo MyPod.podspecInstalling Pods
Install dependencies:
pod installpod updateCRAN (R)
CRAN (Comprehensive R Archive Network) format for R packages.
Endpoint Information
- Repository Type Key:
cran - API Endpoint:
/cran/{repo} - Clients:
R,install.packages
Client Configuration
Configure R to use Artifact Keeper as a repository:
# In R console or .Rprofileoptions(repos = c( my_repo = "https://artifact-keeper.example.com/cran/my-repo", CRAN = "https://cran.r-project.org"))Or set it per-session:
# Single sessionrepos <- c( "https://artifact-keeper.example.com/cran/my-repo", "https://cran.r-project.org")Publishing Packages
Build and publish R packages:
# Build packageR CMD build my-package
# Submit to Artifact Keeper (via API or web interface)curl -X POST \ -H "Authorization: Bearer ${API_TOKEN}" \ -F "file=@my-package_1.0.0.tar.gz" \ https://artifact-keeper.example.com/cran/my-repo/uploadInstalling Packages
Install packages from your repository:
# Install from configured repositoryinstall.packages("my-package")
# Install from specific repositoryinstall.packages("my-package", repos = "https://artifact-keeper.example.com/cran/my-repo")SBT (Scala / JVM)
SBT (Scala Build Tool) uses Ivy repository format for Scala and JVM projects.
Endpoint Information
- Repository Type Key:
sbt - API Endpoint:
/ivy/{repo} - Clients:
sbt, Ivy
Client Configuration
Configure build.sbt to use Artifact Keeper as a resolver:
ThisBuild / organization := "com.example"ThisBuild / version := "1.0.0"ThisBuild / scalaVersion := "3.3.1"
resolvers ++= Seq( "Artifact Keeper" at "https://artifact-keeper.example.com/ivy/my-repo", Resolver.defaultLocal)
libraryDependencies ++= Seq( "com.example" %% "my-library" % "1.0.0")For publishing, configure credentials in ~/.sbt/1.0/credentials.sbt:
credentials += Credentials( "Artifact Keeper", "artifact-keeper.example.com", "username", "token")Publishing Artifacts
Publish your library:
// In build.sbt, add publishing configurationpublishTo := Some( "Artifact Keeper" at "https://artifact-keeper.example.com/ivy/my-repo")
publishMavenStyle := false // Use Ivy styleThen publish:
sbt publishResolving Dependencies
Resolve and update dependencies:
sbt updatesbt compileConda
Conda is a cross-platform package manager used primarily in data science and scientific computing.
Endpoint Information
- Repository Type Key:
conda_native - API Endpoint:
/conda/{repo} - Alias: Routes through PyPI for simple API compatibility
- Clients:
conda,mamba,micromamba
Client Configuration
Configure Conda channels in .condarc or via command line:
channels: - https://artifact-keeper.example.com/conda/my-repo - conda-forge - defaults
channel_alias: https://artifact-keeper.example.com/condaOr configure per-environment:
# Add channelconda config --add channels https://artifact-keeper.example.com/conda/my-repo
# Set channel priorityconda config --set channel_priority strictPublishing Packages
Build and publish Conda packages:
# Build packageconda build my-package
# Upload to Artifact Keeperanaconda upload \ --token ${API_TOKEN} \ --url https://artifact-keeper.example.com/conda/my-repo \ /path/to/my-package-1.0.0-py39_0.tar.bz2Or use the API directly:
curl -X POST \ -H "Authorization: Bearer ${API_TOKEN}" \ -F "file=@my-package-1.0.0-py39_0.tar.bz2" \ https://artifact-keeper.example.com/conda/my-repo/uploadInstalling Packages
Install packages from your channel:
# Install with condaconda install -c https://artifact-keeper.example.com/conda/my-repo my-package
# Install with mamba (faster)mamba install -c https://artifact-keeper.example.com/conda/my-repo my-package
# Install with micromambamicromamba install -c https://artifact-keeper.example.com/conda/my-repo my-packageCreate environment with specific channel:
conda create -n myenv \ -c https://artifact-keeper.example.com/conda/my-repo \ python=3.9 my-packageSee Also
- Security Scanning - Configure vulnerability scanning for packages
- Security Policies - Set up security policies and compliance rules