# Publish @juvio15/pi-subagents@0.1.0

Status: `@juvio15/pi-subagents@0.1.0` is published. `npm view @juvio15/pi-subagents`
confirms it on the public registry (2026-08-02). Use this checklist for
the next release. Bump `version` in `package.json` first.

Use this checklist to publish the package. Keep the token out of the repository and out of printed output.

This document does not run a publish. Complete each step in order on a trusted machine.

## Sources

- npm: [Creating and publishing unscoped public packages](https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages)
- npm: [npm publish](https://docs.npmjs.com/cli/publish)
- npm: [Requiring 2FA for package publishing and settings modification](https://docs.npmjs.com/requiring-2fa-for-package-publishing-and-settings-modification)
- npm: [About access tokens](https://docs.npmjs.com/about-access-tokens)
- npm: [Creating and viewing access tokens](https://docs.npmjs.com/creating-and-viewing-access-tokens)
- npm: [Trusted publishers](https://docs.npmjs.com/trusted-publishers)
- Pi packages guide (local project reference)

## Token setup

1. Use an existing npm granular access token with read and write access that can create the new package. For a first publish of a package that does not exist yet, npm documents **All Packages** package access. Bypass 2FA is required for noninteractive publishing.
2. Export it in the shell only:

```bash
export NPM_TOKEN='…'
```

Replace `…` with the token value. Keep the value out of commits and logs.

3. Create a temporary npm userconfig that points at the token for this shell only. The file must contain the literal `${NPM_TOKEN}` placeholder. Keep the expanded token value, the file contents, and the file itself out of commits and printed output.

```bash
NPM_USERCONFIG="$(mktemp)"
chmod 600 "${NPM_USERCONFIG}"
printf '%s\n' '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > "${NPM_USERCONFIG}"
export NPM_CONFIG_USERCONFIG="${NPM_USERCONFIG}"
```

Prefer a short-lived token. Remove the temporary config and the shell token when the release ends:

```bash
rm -f "${NPM_CONFIG_USERCONFIG}"
unset NPM_CONFIG_USERCONFIG
unset NPM_TOKEN
```

Trusted publishers are an alternative to long-lived tokens. See the npm trusted publishers source above.

## Release checklist

### 1. Name and version check

Confirm `package.json` uses the name and the version you intend to publish:

- `"name": "@juvio15/pi-subagents"`
- `"version": "0.1.0"` (or the next version)

Confirm the name is owned by your npm account:

```bash
npm view @juvio15/pi-subagents name version
```

The package exists on the registry. The command must print the current version and your dist-tags.

### 2. Auth check

```bash
npm whoami
```

The command must print the expected npm user. If it fails, fix token setup before you continue.

### 3. Full checks

From the repository root:

```bash
npm run check
```

Fix every failure before you publish.

### 4. Dry run

```bash
npm publish --dry-run
```

Review the file list and version. Stop if the payload is wrong.

### 5. Publish

```bash
npm publish --access public
```

This step publishes the confirmed version to the public npm registry.

### 6. Post-publish verification

```bash
npm view @juvio15/pi-subagents name version
npm view @juvio15/pi-subagents dist-tags
```

Confirm the published version is present.

Install and load checks for published users:

```bash
pi install npm:@juvio15/pi-subagents
pi -e npm:@juvio15/pi-subagents
```

Then clear the temporary npm userconfig and shell token as shown in Token setup.
