npm package: 829cli
Description: 829 Studios CLI tools — plugin management, SSH, and more
Latest version: 1.0.0

# 829

Command-line tools for managing WP Engine installs — plugin management, SSH connections, portal access, and more.

---

## Requirements

- **Node.js** >= 18 ([nodejs.org](https://nodejs.org))
- **WP Engine API credentials** — username and token from the [WP Engine User Portal](https://my.wpengine.com/api_access)
- **SSH keys configured** for WP Engine ([docs](https://wpengine.com/support/ssh-gateway/))
- **fzf** (optional, required for Tab autocomplete) — `brew install fzf`

---

## Installation

```bash
npm install -g 829
```

---

## First-time Setup

### 1. Configure your API credentials

```bash
829 config
```

You will be prompted for:
- WP Engine API username
- WP Engine API token
- Default batch size (recommended: 20)
- Default parallel jobs (recommended: 20)

Settings are saved to `~/.829.json`.

### 2. Sync your install list

```bash
829 installs sync
```

This fetches all WP Engine installs from the API and caches them to `~/.829/installs.json`. Re-run any time your install list changes.

### 3. Enable Tab autocomplete (zsh)

Add the following to your `~/.zshrc`:

```zsh
eval "$(829 completion zsh)"
```

Then reload your shell:

```zsh
source ~/.zshrc
```

> Requires `fzf`. Install with `brew install fzf`.
>
> For bash, use `eval "$(829 completion bash)"` in your `~/.bashrc`.

---

## Commands

```
829 config                  Configure API credentials and defaults
829 installs sync           Fetch installs from the WP Engine API
829 installs list           Browse cached installs

829 ssh [install-id]        SSH into a WP Engine install
829 portal [install-id]     Open install in the WP Engine portal

829 plugin scan             Scan plugin status across installs
829 plugin activate         Activate a plugin across installs
829 plugin deactivate       Deactivate a plugin across installs
829 plugin update           Update a plugin across installs
829 plugin delete           Delete a plugin across installs

829 provision               Install/update wordpress-tools and provision API keys

829 help                    Show all commands
829 help <command>          Show detailed help for a command
829 completion zsh          Print zsh completion script
829 completion bash         Print bash completion script
```

Run `829 help` at any time for the full reference.

---

## SSH & Portal Autocomplete

After enabling Tab completion, typing `829 ssh ` or `829 portal ` and pressing `Tab` opens an fzf picker:

```
INSTALL ID                DOMAIN                                                ENVIRONMENT
absoluteenerg1            absoluteenergy.com                                    🌐 production
absoluteenerstg           absoluteenergy.829stage.com                           📝 staging
absoluteenerdev           absoluteenergy.829dev.com                             ⚙️ development
```

Arrow up/down to navigate, type to filter, Enter to connect or open.

---

## Output Files

Reports and logs are written to the current working directory:

```
reports/    CSV reports from plugin scans, actions, and provisioning
logs/       Detailed logs of SSH session output
```

---

## Updating

```bash
npm update -g 829
829 installs sync
```