open-index/open-npm huggingface dataset:
npm package: @montage-sh/cli
Description: Command-line interface for Montage prompt management
Latest version: 0.1.0

# @montage-sh/cli

Command-line tool for managing Montage prompts. Pull, edit, push, and publish prompts from your terminal.

## Installation

```bash
npm install -g @montage-sh/cli
```

## Quick Start

```bash
# Sign in
montage login

# Link to a project
montage init

# Pull prompts to local files
montage pull

# Edit locally, then push
montage push

# Publish a version
montage publish customer-support --message "Updated tone"
```

## Commands

| Command | Description |
|---------|-------------|
| `montage login` | Authenticate via device-code flow |
| `montage logout` | Clear local credentials |
| `montage whoami` | Show active user, org, and project |
| `montage init` | Link directory to a Montage project |
| `montage list` | List prompts with status and version |
| `montage pull` | Download prompts to local files |
| `montage push` | Upload local changes as draft |
| `montage publish` | Publish a draft as a live version |
| `montage status` | Show sync state for all prompts |

### Global Flags

| Flag | Description |
|------|-------------|
| `--json` | Machine-readable JSON output |
| `--yes` | Skip confirmation prompts (CI mode) |
| `--project <id>` | Override project from config |
| `--verbose` | Show debug logs |

## CI / CD

Use a CLI token for non-interactive pipelines:

```bash
montage login --token $MONTAGE_CLI_TOKEN
montage push
montage publish --all --yes --json
```

## Exit Codes

| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | Command failure |
| 2 | Validation / usage error |
| 3 | Auth error |
| 4 | Conflict detected |

## Requirements

- Node.js 20 or later (for npm install)
- A Montage account and project

## License

MIT