# Build Locally

---

## Overview

Build, install, and publish packages on your machine with zero configuration. Once Fly App is installed, your package managers already point to Fly Registry.

With Fly App running, your local environment is fully connected:

- **Private packages** you publish go to your team's Fly Registry at `<your-team>.jfrog.io`
- **Public dependencies** (npm, PyPI, Maven Central, Docker Hub, etc.) are proxied through Fly and cached for your team
- **Authentication and routing** are handled automatically. No tokens, no `.npmrc` files, no manual setup
- **Every standard command works as-is**: `npm install`, `pip install`, `docker pull`, `mvn install`, `go get`

---

## Upload and Download Artifacts

### Use Your Coding Agent

The fastest way to publish or install packages is through your coding agent. Fly App and MCP handle authentication, routing, and registry configuration behind the scenes.

*"Publish this npm package to Fly"*

*"Install the latest version of my-private-package"*

*"Build and push my Docker image to Fly"*

---

### Use Your Terminal

With Fly App installed, your package managers are already configured to point to Fly Registry. Use your standard commands as-is:

**Standard package managers:**

| **Package Manager** | **Upload** | **Download** |
|---------------------|------------|--------------|
| **npm** | `npm publish` | `npm install` |
| **pip (PyPI)** | `twine upload dist/*` | `pip install` |
| **Maven (Java)** | `mvn deploy` | `mvn install` |
| **Gradle (Java)** | `./gradlew publish` | `./gradlew build` |
| **Go** | N/A (via Git) | `go get` |
| **NuGet** | `dotnet nuget push` | `dotnet restore` |

**Docker** and **Helm** require your Fly subdomain in the image/chart path:

```bash
docker push <your-fly-subdomain>.jfrog.io/docker/my-image:latest
docker pull <your-fly-subdomain>.jfrog.io/docker/my-image:latest

helm push my-chart-1.0.0.tgz oci://<your-fly-subdomain>.jfrog.io/helmoci
helm pull oci://<your-fly-subdomain>.jfrog.io/helmoci/my-chart --version 1.0.0
```

**Generic files** use the Fly CLI:

```bash
fly upload --name my-app --version 1.0.0 dist/*.zip
fly download --name my-app --version 1.0.0 app.dmg
```

### Examples

#### Node.js (npm)

```bash
# Publish your package to Fly Registry
npm publish

# Install a private package from Fly
npm install my-private-package

# Install a public dependency (proxied through Fly)
npm install express
```

#### Python (pip)

```bash
# Build and upload
python -m build
twine upload dist/*

# Install from Fly
pip install my-private-package
pip install requests
```

#### Docker

```bash
# Tag and push
docker tag my-image:latest <your-fly-subdomain>.jfrog.io/docker/my-image:latest
docker push <your-fly-subdomain>.jfrog.io/docker/my-image:latest

# Pull
docker pull <your-fly-subdomain>.jfrog.io/docker/my-image:latest
```

#### Java (Maven)

```bash
mvn clean deploy    # Upload to Fly Registry
mvn clean install   # Download dependencies from Fly
```

---

### Manual Configuration

For Kubernetes, external systems, or environments without the Fly App,
generate an access token in Fly Web and configure your package manager manually using your registry path.

| **Package Manager** | **Registry Path** | **Configuration** |
|---------------------|-------------------|-------------------|
| **Docker** | `<your-fly-subdomain>.jfrog.io/docker` | `docker login` |
| **Helm** | `<your-fly-subdomain>.jfrog.io/helmoci` | `helm registry login` |
| **npm** | `<your-fly-subdomain>.jfrog.io/artifactory/api/npm/npm/` | `.npmrc` |
| **pip (PyPI)** | `<your-fly-subdomain>.jfrog.io/artifactory/api/pypi/pypi/simple` | `pip.conf` |
| **Maven** | `<your-fly-subdomain>.jfrog.io/artifactory/maven` | `settings.xml` |
| **Go** | `<your-fly-subdomain>.jfrog.io/artifactory/api/go/go` | `GOPROXY` |
| **NuGet** | `<your-fly-subdomain>.jfrog.io/artifactory/api/nuget/nuget` | `dotnet nuget add source` |

[See detailed configuration steps in Package Managers →](../../package-managers/)

---

## Next Steps

- [Automate Releases →](../ci-cd/) - Configure CI/CD
- [Artifacts →](../../fly-platform/artifacts/) - Full platform reference for artifacts
- [Package Managers →](../../package-managers/) - Detailed configuration for each package manager
