# dn-configure

Sets up dn CLI credentials, including WordPress.com login or partner API keys, and switches between the two modes.

Skill by Automattic. Category: Security.

## Install

Project (for this project only):

```sh
npx skills add automattic/dn-cli --skill dn-configure
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add automattic/dn-cli --skill dn-configure -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass

Installs: 5. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/automattic/dn-cli/dn-configure)

## Source

[Open the source](https://github.com/automattic/dn-cli/tree/HEAD/skills/dn-configure). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: dn-configure
description: Set up credentials for the dn CLI tool. Use when the user needs to authenticate, switch between partner and user mode, set up API keys, or connect their WordPress.com account via OAuth. Also use when the user mentions "dn configure" or needs to reconfigure their dn CLI setup.
---

# dn configure

Set up authentication credentials for the dn CLI.

## Modes

- **User mode** (default): WordPress.com OAuth. Opens browser for authentication.
- **Partner mode**: Direct API access via API key + API user credentials.

## Usage

```bash
# Interactive setup (shows splash screen, mode selection)
dn configure

# Specify mode directly
dn configure --mode=user
dn configure --mode=partner

# Pipe credentials (CI/automation)
echo -e "token" | dn configure --mode=user --stdin
echo -e "api-key\napi-user" | dn configure --mode=partner --stdin

# Custom API URL (partner mode only)
dn configure --mode=partner --api-url=https://custom.api.example.com
```

## Options

| Option | Description |
|--------|-------------|
| `--mode` | `partner` or `user` (interactive if omitted) |
| `--stdin` | Read credentials from stdin instead of prompts |
| `--api-url` | Custom API base URL (partner mode only) |

## Notes

- Credentials stored in `~/.config/dn/config.json` with `0600` permissions
- User mode triggers browser-based OAuth flow (client ID 134319, port 19851)
- Partner mode prompts for API key and user with hidden input
- Can override with env vars: `DN_API_KEY`, `DN_API_USER`, `DN_MODE`, `DN_OAUTH_TOKEN`
````

- Previous: [dn-check](https://syn4pse.dev/terminal/automattic-dn-check.md)
- Next: [dn-delete](https://syn4pse.dev/terminal/automattic-dn-delete.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
