···11+# ATCR Release Pipeline for Tangled.org
22+# Triggers on version tags and builds cross-platform binaries using GoReleaser
33+44+when:
55+ - event: ["push"]
66+ # TODO: Trigger only on version tags (v1.0.0, v2.1.3, etc.)
77+ branch: ["main"]
88+99+engine: "nixery"
1010+1111+dependencies:
1212+ nixpkgs:
1313+ - git
1414+ - go
1515+ - goreleaser
1616+1717+steps:
1818+ - name: Fetch git tags
1919+ command: git fetch --tags --force
2020+2121+ - name: Checkout latest tag
2222+ command: git checkout $(git tag --sort=-version:refname | head -n1)
2323+2424+ - name: Tidy Go modules
2525+ command: go mod tidy
2626+2727+ - name: Install Goat
2828+ command: go install github.com/bluesky-social/goat@latest
2929+3030+ - name: Run GoReleaser
3131+ command: goreleaser release --clean
3232+ environment:
3333+ REPO_URL
+260
INSTALLATION.md
···11+# Installing ATCR Credential Helper
22+33+The ATCR credential helper enables Docker to authenticate with ATCR registries using ATProto device authorization.
44+55+## Quick Install (Recommended)
66+77+### Using install script
88+99+**Linux/macOS:**
1010+```bash
1111+curl -fsSL https://atcr.io/install.sh | bash
1212+```
1313+1414+Or download and run manually:
1515+1616+```bash
1717+curl -fsSLO https://atcr.io/install.sh
1818+chmod +x install.sh
1919+./install.sh
2020+```
2121+2222+Custom installation directory:
2323+2424+```bash
2525+INSTALL_DIR=$HOME/.local/bin curl -fsSL https://atcr.io/install.sh | bash
2626+```
2727+2828+**Windows (PowerShell as Administrator):**
2929+```powershell
3030+iwr -useb https://atcr.io/install.ps1 | iex
3131+```
3232+3333+Or download and run manually:
3434+3535+```powershell
3636+Invoke-WebRequest -Uri https://atcr.io/install.ps1 -OutFile install.ps1
3737+.\install.ps1
3838+```
3939+4040+### Using Homebrew (macOS)
4141+You can read the full manifest spec here, but the dependencies block is the real interesting bit. Dependencies for your workflow, like Go, Node.js, Python etc. can be pulled in from nixpkgs. Nixpkgs—for the uninitiated—is a vast collection of packages for the Nix package manager. Fortunately, you needn’t know nor care about Nix to use it! Just head to https://search.nixos.org to find your package of choice (I’ll bet 1€ that it’s there1), toss it in the list and run your build. The Nix-savvy of you lot will be happy to know that you can use custom registries too.
4242+```bash
4343+brew tap atcr-io/tap
4444+brew install docker-credential-atcr
4545+```
4646+4747+### Manual Installation
4848+4949+1. **Download the binary** for your platform from [GitHub Releases](https://github.com/atcr-io/atcr/releases)
5050+5151+ - Linux amd64: `docker-credential-atcr_VERSION_Linux_x86_64.tar.gz`
5252+ - Linux arm64: `docker-credential-atcr_VERSION_Linux_arm64.tar.gz`
5353+ - macOS amd64: `docker-credential-atcr_VERSION_Darwin_x86_64.tar.gz`
5454+ - macOS arm64: `docker-credential-atcr_VERSION_Darwin_arm64.tar.gz`
5555+ - Windows amd64: `docker-credential-atcr_VERSION_Windows_x86_64.zip`
5656+ - Windows arm64: `docker-credential-atcr_VERSION_Windows_arm64.zip`
5757+5858+2. **Extract and install**:
5959+6060+ **Linux/macOS:**
6161+ ```bash
6262+ tar -xzf docker-credential-atcr_VERSION_OS_ARCH.tar.gz
6363+ sudo install -m 755 docker-credential-atcr /usr/local/bin/
6464+ ```
6565+6666+ **Windows (PowerShell as Administrator):**
6767+ ```powershell
6868+ Expand-Archive docker-credential-atcr_VERSION_Windows_x86_64.zip
6969+ Move-Item docker-credential-atcr.exe C:\Windows\System32\
7070+ ```
7171+7272+3. **Verify installation**:
7373+7474+ ```bash
7575+ docker-credential-atcr version
7676+ ```
7777+7878+### From Source (requires Go 1.23+)
7979+8080+```bash
8181+go install atcr.io/cmd/credential-helper@latest
8282+sudo mv $(go env GOPATH)/bin/credential-helper /usr/local/bin/docker-credential-atcr
8383+```
8484+8585+## Configuration
8686+8787+### 1. Configure Docker
8888+8989+Add the credential helper to Docker's config:
9090+9191+```bash
9292+# Create or edit ~/.docker/config.json
9393+cat > ~/.docker/config.json << 'EOF'
9494+{
9595+ "credHelpers": {
9696+ "atcr.io": "atcr"
9797+ }
9898+}
9999+EOF
100100+```
101101+102102+Or add to existing config:
103103+104104+```json
105105+{
106106+ "credHelpers": {
107107+ "atcr.io": "atcr",
108108+ "docker.io": "desktop"
109109+ }
110110+}
111111+```
112112+113113+### 2. Authenticate
114114+115115+The credential helper will automatically trigger authentication when you first push/pull:
116116+117117+```bash
118118+docker push atcr.io/yourhandle/myapp:latest
119119+```
120120+121121+This will:
122122+1. Open your browser for device authorization
123123+2. Display a code to confirm
124124+3. Store credentials in `~/.atcr/device.json`
125125+4. Exchange for registry JWT and proceed with push
126126+127127+### 3. Manual Authentication (optional)
128128+129129+If you prefer to authenticate before pushing:
130130+131131+```bash
132132+# This triggers the device flow manually
133133+echo "atcr.io" | ATCR_AUTO_AUTH=1 docker-credential-atcr get > /dev/null
134134+```
135135+136136+## Usage
137137+138138+Once configured, Docker commands work normally:
139139+140140+```bash
141141+# Push image
142142+docker push atcr.io/alice.bsky.social/myapp:latest
143143+144144+# Pull image
145145+docker pull atcr.io/bob.bsky.social/coolapp:v1.2.3
146146+147147+# Build and push
148148+docker build -t atcr.io/alice.bsky.social/web:latest .
149149+docker push atcr.io/alice.bsky.social/web:latest
150150+```
151151+152152+## Multiple Registries
153153+154154+The credential helper supports multiple ATCR instances (e.g., production + self-hosted):
155155+156156+```json
157157+{
158158+ "credHelpers": {
159159+ "atcr.io": "atcr",
160160+ "registry.mycompany.com": "atcr"
161161+ }
162162+}
163163+```
164164+165165+Credentials are stored per AppView URL in `~/.atcr/device.json`.
166166+167167+## Troubleshooting
168168+169169+### "credential helper not found"
170170+171171+Ensure `docker-credential-atcr` is in your PATH:
172172+173173+```bash
174174+which docker-credential-atcr
175175+```
176176+177177+If not found, add the installation directory to PATH:
178178+179179+```bash
180180+export PATH="/usr/local/bin:$PATH"
181181+```
182182+183183+### "No valid credentials found"
184184+185185+Enable auto-auth and retry:
186186+187187+```bash
188188+docker push atcr.io/yourhandle/myapp:latest
189189+```
190190+191191+### "authorization failed"
192192+193193+Check that you can access the AppView:
194194+195195+```bash
196196+curl -v https://atcr.io/v2/
197197+```
198198+199199+For local development (HTTP):
200200+201201+```json
202202+{
203203+ "insecure-registries": ["localhost:5000"]
204204+}
205205+```
206206+207207+Add to `/etc/docker/daemon.json` and restart Docker:
208208+209209+```bash
210210+sudo systemctl restart docker
211211+```
212212+213213+### Logout
214214+215215+To remove stored credentials:
216216+217217+```bash
218218+echo "atcr.io" | docker-credential-atcr erase
219219+```
220220+221221+Or delete the credentials file:
222222+223223+```bash
224224+rm ~/.atcr/device.json
225225+```
226226+227227+## Uninstall
228228+229229+```bash
230230+# Remove binary
231231+sudo rm /usr/local/bin/docker-credential-atcr
232232+233233+# Remove credentials
234234+rm -rf ~/.atcr
235235+236236+# Remove from Docker config
237237+# Edit ~/.docker/config.json and remove "atcr" from credHelpers
238238+```
239239+240240+## Platform Support
241241+242242+| Platform | Arch | Status |
243243+|----------|------|--------|
244244+| Linux | amd64 | ✅ Supported |
245245+| Linux | arm64 | ✅ Supported |
246246+| macOS | amd64 (Intel) | ✅ Supported |
247247+| macOS | arm64 (Apple Silicon) | ✅ Supported |
248248+| Windows | amd64 | ✅ Supported |
249249+| Windows | arm64 | ✅ Supported |
250250+251251+## Security
252252+253253+- Credentials are stored in `~/.atcr/device.json` with `0600` permissions (owner read/write only)
254254+- Device secrets are issued per-device and can be revoked via the AppView web UI
255255+- Authentication uses ATProto OAuth with device authorization flow
256256+- No passwords are stored locally
257257+258258+## Development
259259+260260+See [CLAUDE.md](./CLAUDE.md#credential-helper-cmd-credential-helper) for development docs.
+23-7
README.md
···216216- **middleware.repository**: ATProto routing middleware
217217- **middleware.registry**: Name resolution middleware
218218219219-## Usage
219219+## Installing Credential Helper
220220221221-### Configure Credential Helper (Recommended)
221221+**Quick Install:**
222222223223```bash
224224-# Build and configure the credential helper
225225-go build -o docker-credential-atcr ./cmd/credential-helper
226226-./docker-credential-atcr configure
227227-# Follow the OAuth flow in your browser
224224+# Linux/macOS
225225+curl -fsSL https://atcr.io/install.sh | bash
226226+227227+# Windows (PowerShell as Administrator)
228228+iwr -useb https://atcr.io/install.ps1 | iex
229229+```
228230229229-# Add to Docker config (~/.docker/config.json)
231231+For detailed installation instructions (Homebrew, manual install, etc.), see **[INSTALLATION.md](./INSTALLATION.md)**.
232232+233233+**Configure Docker:**
234234+235235+```bash
236236+# Add to ~/.docker/config.json
230237{
231238 "credHelpers": {
232239 "atcr.io": "atcr"
233240 }
234241}
242242+```
243243+244244+## Usage
245245+246246+### Authenticate
247247+248248+```bash
249249+# Auto-authentication on first push/pull
250250+docker push atcr.io/yourhandle/myapp:latest
235251```
236252237253### Pushing an Image