Getting Started with Artifacts
Artifacts is a private package registry supporting npm, Maven, Swift, Raw, and KMP (Kotlin Multiplatform) packages. It speaks each protocol natively, so standard CLI tools (npm, Gradle, Swift PM, curl) work out of the box with no plugins or adapters.
Create an account
Sign up at https://artifacts.premex.se/register. You can use email/password or any supported auth provider.
Create an organization
Every repository in Artifacts belongs to an organization. After signing in, go to your Dashboard and create an organization. Organizations provide a namespace for your repositories and let you manage team access in one place.
Your organization slug (e.g., myorg) appears in all registry URLs:
https://artifacts.premex.se/api/npm/myorg/myrepo/
Create a repository
Navigate to Create Repository and fill in the details:
- Name -- lowercase, numbers, and hyphens only (2-64 characters). This becomes the repo slug in URLs.
- Package types -- select one or more: npm, Maven, Swift, Raw, or KMP. A single repo can serve multiple protocols simultaneously.
- Visibility --
private(default) orpublic. Public repos allow unauthenticated read access.
Generate an API token
Artifacts has three token types for different access patterns:
| Type | Prefix | Where to create | Use case |
|---|---|---|---|
| Account | art_ |
Settings > API Tokens | Personal CLI access |
| Organization | org_ |
Org Settings > Organization Tokens | CI/CD pipelines, automated management |
| Repository | rep_ |
Repo Settings > Repository Tokens | Customer distribution, read-only access |
To get started quickly, create an account token:
- Go to Settings > API Tokens and click Create Token
- Give it a name, select scopes (
readfor consuming,writefor publishing), and click Create - Copy the token immediately — it is shown only once
All token types share the same scopes:
read— download and list packageswrite— publish packages (includes read)admin— manage members, settings, repos, and tokens (includes write and read)
For CI/CD and automation, use org tokens. For distributing to external consumers, use repo tokens. See the full API Tokens & Authentication guide.
Quick start by protocol
Replace ORGSLUG and REPOSLUG with your actual organization and repository slugs in every example below.
npm
# .npmrc
@myscope:registry=https://artifacts.premex.se/api/npm/ORGSLUG/REPOSLUG/
//artifacts.premex.se/api/npm/ORGSLUG/REPOSLUG/:_authToken=art_your_token
npm install @myscope/my-package
Full guide: npm Packages
Maven / Gradle
<!-- pom.xml -->
<repositories>
<repository>
<id>artifacts</id>
<url>https://artifacts.premex.se/api/maven/ORGSLUG/REPOSLUG/</url>
</repository>
</repositories>
Full guide: Maven & Gradle Packages
Swift
swift package-registry set https://artifacts.premex.se/api/swift/ORGSLUG/REPOSLUG/
swift package-registry login https://artifacts.premex.se/api/swift/ORGSLUG/REPOSLUG/ --token art_your_token
Full guide: Swift Packages
Raw
# Upload
curl -X PUT \
-H "Authorization: Bearer art_your_token" \
--data-binary @myfile.zip \
https://artifacts.premex.se/api/raw/ORGSLUG/REPOSLUG/my-package/1.0.0/myfile.zip
Full guide: Raw Packages
Versions API
All package types expose a simple versions endpoint that scripts and CI pipelines can use to discover the latest release:
# JSON — full version metadata
curl -s https://artifacts.premex.se/api/v/ORGSLUG/REPOSLUG/PACKAGE/versions
# Plain text — latest version only (great for shell scripts)
curl -s https://artifacts.premex.se/api/v/ORGSLUG/REPOSLUG/PACKAGE/versions?format=txt\&limit=1
See the Raw Packages guide for full details and a "download latest" example.
Next steps
- npm Packages -- full registry configuration, publishing, and CI/CD setup
- Maven & Gradle Packages -- pom.xml, build.gradle.kts, and settings.xml configuration
- Swift Packages -- SE-0292 registry protocol, Package.swift dependencies
- Raw Packages -- simple HTTP-based file storage for generic artifacts
- Set Up a KMP Repository -- auto-build JS and Swift packages from Kotlin Multiplatform libraries