Package Repository Service

Every Code Craft AI package, one repository host.

This service publishes and serves the company's distributable packages across four repository formats. Machine clients authenticate with a deployment token; Code Craft AI staff sign in to browse and manage what has been published.

Hosted repository formats

Each format has its own on-disk layout and its own client conventions. All four are served from the same repository root and gated by the same deployment tokens.

Python

PEP 503 index serving wheels and source distributions.

Base URL /python/simple/

simple/<package>/<name>-<version>-<tags>.whl

pip install --index-url https://deployment:$TOKEN@<host>/python/simple/

npm

Node package tarballs, including @scope/ namespaces.

Base URL /npm/

npm/[@scope/]<package>/-/<name>-<version>.tgz

npm config set @scope:registry https://<host>/npm/

Rust

Rust crate archives produced by cargo package.

Base URL /cargo/index/

cargo/<crate>/<name>-<version>.crate

[registries.x] index = "sparse+https://<host>/cargo/index/"

Generic Archive

Version-foldered zip and tarball payloads for anything else.

Base URL /generic/

generic/<package>/<version>/<file>.zip

curl -u deployment:$TOKEN https://<host>/generic/<pkg>/<version>/<file>

Configuring a client

Reads are authenticated with a deployment token, in whichever form your client sends one — HTTP Basic for pip, Poetry and curl, a bearer token for npm, a bare token for Cargo. All three resolve the same token. Tokens are issued from the Code Craft AI portal and scoped to the packages a licence covers.

Python — pip

Install from the PEP 503 index with a deployment token.

pip install \
  --index-url https://deployment:$CCAI_DEPLOYMENT_TOKEN@artifacts.code-craft.ai/python/simple/ \
  codecraftai-webworks

Python — Poetry

Register the index as a supplemental source.

poetry source add --priority=supplemental codecraftai \
  https://artifacts.code-craft.ai/python/simple/
poetry config http-basic.codecraftai deployment $CCAI_DEPLOYMENT_TOKEN

npm

Scope the registry and set the auth token.

# .npmrc
@ccai:registry=https://artifacts.code-craft.ai/npm/
//artifacts.code-craft.ai/npm/:_authToken=$CCAI_DEPLOYMENT_TOKEN

Rust — Cargo

A sparse registry. The credential-provider line is required, not optional.

# .cargo/config.toml
[registries.codecraftai]
index = "sparse+https://artifacts.code-craft.ai/cargo/index/"
credential-provider = "cargo:token"

# .cargo/credentials.toml
[registries.codecraftai]
token = "$CCAI_DEPLOYMENT_TOKEN"

Generic archives

No package manager — fetch by URL, or list a directory as JSON.

curl --user deployment:$CCAI_DEPLOYMENT_TOKEN \
  -O https://artifacts.code-craft.ai/generic/<package>/<version>/<file>.zip

Any format — browse the raw tree

Every format's tree is also reachable through the shared repository path.

curl --user deployment:$CCAI_DEPLOYMENT_TOKEN \
  https://artifacts.code-craft.ai/repository/<format>/...

Service endpoints

GET /python/simple/…
PEP 503 index for pip and Poetry — project list, file list, and downloads.
GET /npm/…
Packuments and tarballs for npm, including @scope/ namespaces.
GET /cargo/index/…
Cargo sparse registry — configuration, index entries, and crate downloads.
GET /generic/…
Directory listings and archive downloads. Send Accept: application/json for a scriptable listing.
GET /repository/…
The raw published tree across every format. Requires a deployment token.
GET /licensed-repository/simple/…
The PEP 503 Python index, filtered to the packages the token's licence covers.
POST /repository/legacy
The Twine and Poetry upload endpoint. Requires a publish token.
GET /health
Liveness probe. Unauthenticated.
Code Craft AI staff
Sign in to browse packages by category, inspect versions and checksums, and publish artifacts to any hosted format. Access is limited to internal accounts.