open-index/open-npm huggingface dataset:
npm package: @fluid-app/fluid-cli
Description: Core CLI for Fluid Commerce — auth, config, and plugin system
Latest version: 0.1.8

# @fluid-app/fluid-cli

The Fluid Commerce CLI. Provides authentication, profile management, and a plugin system for extending with domain-specific commands.

## Installation

```bash
npm install -g @fluid-app/fluid-cli
```

## Authentication

```bash
# Email MFA flow
fluid login

# API token (avoids shell history exposure)
FLUID_TOKEN=your-token-here fluid login

# Manage profiles
fluid whoami            # Show active profile
fluid switch            # Switch between profiles
fluid logout            # Remove stored authentication
```

Profiles are stored at `~/.fluid/config.json`.

## Plugins

Install plugins alongside the core CLI to add commands:

| Package                          | Commands           | Description                          |
| -------------------------------- | ------------------ | ------------------------------------ |
| `@fluid-app/fluid-cli-theme-dev` | `fluid theme *`    | Theme dev server, push, pull, init   |
| `@fluid-app/fluid-cli-portal`    | `fluid portal *`   | Portal app build, deploy, push, pull |
| `@fluid-app/fluid-cli-themes`    | `fluid themes *`   | Theme management API commands        |
| `@fluid-app/fluid-cli-assets`    | `fluid assets *`   | Digital asset management commands    |
| `@fluid-app/fluid-cli-droplets`  | `fluid droplets *` | Droplet management commands          |

Example:

```bash
npm install -g @fluid-app/fluid-cli @fluid-app/fluid-cli-theme-dev
fluid theme dev
```

Plugins are auto-discovered from:

1. `node_modules/@fluid-app/` in the current working directory
2. `node_modules/@fluid-app/` where the CLI itself is installed (global installs)
3. Sibling packages in a pnpm workspace (monorepo development)

## Environment Variables

| Variable           | Description                                      |
| ------------------ | ------------------------------------------------ |
| `FLUID_TOKEN`      | API token (alternative to `fluid login`)         |
| `FLUID_API_BASE`   | API base URL (default: `https://api.fluid.app`)  |
| `FLUID_CONFIG_DIR` | Override config directory (default: `~/.fluid/`) |

## Development

For contributors working in `fluid-mono`:

```bash
pnpm --filter @fluid-app/fluid-cli build
node packages/cli/core/dist/bin/fluid.mjs --help
```
npm package: @fluid-app/fluid-cli-theme-dev
Description: Fluid CLI plugin for theme developer workflows — dev server, push, pull, init
Latest version: 0.1.14

# @fluid-app/fluid-cli-theme-dev

Fluid CLI plugin for theme development. Adds `fluid theme` commands for local dev server, push, pull, and scaffolding.

## Installation

```bash
npm install -g @fluid-app/fluid-cli @fluid-app/fluid-cli-theme-dev
```

Requires `@fluid-app/fluid-cli` as the core CLI.

## Authentication

Log in before using any theme commands:

```bash
fluid login
```

## Commands

### `fluid theme dev`

Start a local dev server that proxies your storefront with hot reload:

```bash
fluid theme dev
```

The dev server will:

1. Create (or reuse) a development theme
2. Upload all local files to the dev theme
3. Watch for file changes and sync them automatically
4. Proxy requests to `{company}.fluid.app` with local file overrides

| Flag                       | Default     | Description                               |
| -------------------------- | ----------- | ----------------------------------------- |
| `--host <host>`            | `127.0.0.1` | Local server host                         |
| `--port <port>`            | `9292`      | Local server port                         |
| `-t, --theme <name-or-id>` | auto        | Use a specific theme instead of dev theme |
| `--live-reload <mode>`     | `full-page` | Reload mode: `full-page` or `off`         |
| `--navigate`               | off         | Open browser navigator after start        |
| `--root <path>`            | `.`         | Theme root directory                      |

### `fluid theme push`

Upload local theme files to a remote theme:

```bash
fluid theme push                        # Interactive theme selection
fluid theme push --theme "My Theme"     # By name
fluid theme push --theme 42             # By ID
fluid theme push --publish              # Push and publish
fluid theme push --nodelete             # Keep remote files not present locally
```

### `fluid theme pull`

Download a remote theme to your local directory:

```bash
fluid theme pull                        # Interactive theme selection
fluid theme pull --theme "My Theme"     # By name or ID
fluid theme pull --nodelete             # Keep local files not present on remote
```

### `fluid theme init`

Scaffold a new theme from the base template:

```bash
fluid theme init my-theme
cd my-theme
fluid theme dev
```

### `fluid theme navigate`

Interactively select a route and open it in the browser (requires a running dev server):

```bash
fluid theme navigate
```

## Theme Directory Structure

A valid theme directory must contain at least one of: `templates/`, `assets/`, or `config/`.

Use a `.fluidignore` file (same syntax as `.gitignore`) to exclude files from syncing.

## Development

For contributors working in `fluid-mono`:

```bash
pnpm --filter @fluid-app/fluid-cli-theme-dev build
node packages/cli/core/dist/bin/fluid.mjs theme --help
```