*This is a reimagination and reimplementation of my other project
[meeple-cli](https://github.com/boldandbrad/meeple-cli).*
---
# mpl
![Crates.io](https://img.shields.io/crates/v/mpl-cli)
> **mpl**; short for **meeple** [`/mipel/`] *noun* - a board game player
> token. (E.g., )
**mpl** is a local board game collection management CLI tool built in rust and
powered by [BoardGameGeek](https://boardgamegeek.com) (BGG) public APIs.
**Jump to:** [Features](#features) | [Installation](#install) | [Usage](#usage)
| [Configuration](#config) | [Resources](#resources) | [Legal](#legal) |
[Documentation](https://boldandbrad.github.io/mpl/) ๐
> [!WARNING]
> **mpl** is currently in **ALPHA**. This means it is generally unstable and may
> be missing key features. Please track the progress of features throughout this
> README with the following symbols:
> | Symbol | Status |
> | - | - |
> | โ | Implemented - stable |
> | โณ๏ธ | Implemented - unstable |
> | ๐ง | Work in Progress |
> | โ | Not Started |
## ๐ฅ Demo
> Coming soon.
## โจ Features
- Get started quickly with BGG user collection import
- Discover new titles via BGG Hotness, new releases, active crowdfunding
campaigns, and BGG search
- Grow your collection by searching and opening Geek Market listings
- Flexible local stash maintainance and customization
- Powerful cross-stash search to find the best title for game night
- Create and manage personal ratings
- Log and view game playthroughs
- Multiple user support with profiles
- Written in Rust ๐ฆ
## ๐ฆ Installation
Install **mpl** with your favorite of the methods below, or read the
[docs](https://boldandbrad.github.io/mpl/) for more info. Then run
`mpl --version` to verify installation.
**Jump to:** [Homebrew](#install-homebrew) | [Scoop](#install-scoop) |
[Cargo](#install-cargo) | [Remote](#install-remote) |
[GitHub Release](#install-release) | [Source](#install-source)
### Install via [Homebrew](https://brew.sh) ๐บ (macOS/Linux) โ
1. Add tap:
```sh
brew tap boldandbrad/tap
```
1. Install formula:
```sh
brew install mpl-cli
```
### Install via [Scoop](https://scoop.sh) ๐ฆ (Windows) โ
1. Add bucket:
```sh
scoop bucket add boldandbrad_scoop-bucket https://github.com/boldandbrad/scoop-bucket
```
1. Install manifest:
```sh
scoop install boldandbrad_scoop-bucket/mpl-cli
```
### Install via [Cargo](https://crates.io) ๐ฆ ๐ง
- Install crate:
```sh
cargo install mpl-cli
```
### Install via remote install script ๐ โ
> [!NOTE]
> The [remote install script](scripts/install.sh) explains what it will do and
> prompts before doing so.
- Run script:
```sh
curl -LSfs https://raw.githubusercontent.com/boldandbrad/mpl-cli/main/ci/install.sh | sh -s -- --git boldandbrad/mpl-cli
```
### Manual install from GitHub Release โฌ๏ธ ๐ง
1. Download the [latest GitHub Release](https://github.com/boldandbrad/mpl-cli/releases)
for your platform
2. Extract contents and install to a location in your `$PATH`
### Manual install from source ๐ฉโ๐ป ๐ง
1. Install [Rust](https://www.rust-lang.org/tools/install)
2. Run `git clone https://github.com/boldandbrad/mpl-cli` and `cd mpl-cli`
3. Run `cargo install --path .`
4. Ensure `~/.cargo/bin` is in your `$PATH`
## ๐ Usage
```sh
mpl
```
To get you started, on first run `mpl` creates a default profile with the same
name as your user home directory (you can rename it later if you prefer with
`mpl profile rename`), containing a stash called `collection`.
### Import BGG user collections ๐ข
```sh
mpl bgg import --user=boldandbrad
```
`mpl` will guide you through the import process. When done, see your imported
collections:
```sh
mpl stash list --verbose
```
### Start fresh ๐งผ
**mpl** relies on BoardGameGeek item IDs to manage the titles you add to your
stashes. The easiest way to get these is by searching BoardGameGeek:
```sh
mpl bgg search "wingspan"
```
Copy an item ID from the output and use it in another command:
```sh
mpl add -s=collection 266192
```
You've added Wingspan ๐ฆ to the `collection` stash!
Now let's see what's in your collection:
```sh
mpl titles -s=collection
```
Run `mpl --help` or read the [docs](https://boldandbrad.github.io/mpl/) to
discover what to do next!
### Command Reference ๐
> [!TIP]
> You can discover **mpl** commands and options with `mpl --help`.
#### Root ๐ง
- `mpl add` ๐ง - add titles to a stash
- `mpl drop` ๐ง - drop titles from a stash
- `mpl titles` ๐ง - list titles in stashes
- `mpl move` โ - move titles to another stash
- `mpl update` โ - update local stash data
#### Stashes ๐ง
Manage local stashes in the active profile.
##### Flags/Options
- `-p/--profile` - the profile to perform actions in (default: active profile)
##### Commands
- `mpl stash create` ๐ง - create new stashes
- `mpl stash delete` ๐ง - delete existing stashes
- `mpl stash list` ๐ง - list existing stashes
- `-v`/`--verbose` โ - list stats for stashes
- `mpl stash rename` โ - rename an existing stash
- `mpl stash info` โ - view details of a stash
- `mpl stash move` โ - move stashes to another profile
#### BoardGameGeek ๐ง
BoardGameGeek specific actions.
- `mpl bgg search` ๐ง - search boardgamegeek for titles
- Flag `--market` โ - search geek market listings
- `mpl bgg info` ๐ง - view title details
- `mpl bgg open` โ - open boardgamegeek.com
- Option `--title` - open a title's boardgamegeek page(s)
- Option `--campaign` - open a title's crowdfunding campaign page
- Option `--listing` - open a geek market listing
- `mpl bgg import` โ - import bgg collections
- `mpl bgg hotness` โ - view bgg hotness list
- `mpl bgg campaigns` โ - list active crowdfunding campaigns
- `mpl bgg releases` โ - list recent releases
#### Profiles ๐ง
Manage user profiles.
- `mpl profile active` ๐ง - display current profile
- `mpl profile create` โ - create new profile
- `mpl profile delete` โ - delete existing profile
- `mpl profile list` ๐ง - list existing profiles
- `mpl profile rename` โ - rename existing profile
- `mpl profile switch` โ - switch active profile
#### Config ๐ง
Manage configurations.
> Profile level configs override global ones by default.
##### Flags/Options
- `-g`/`--global` โ - action applies to global options. When not present, the
action applies to the active profile options.
- `-F`/`--force` โ - used in combination with `-g`, changes default config
value for all profiles with overwrite of profile values
##### Commands
- `mpl config active` โ - display current configuration
- `mpl config options` โ - show available config options
- `mpl config set` โ - set option value
- `mpl config unset` โ - revert option value to default
- `mpl config complete` ๐ง - setup shell tab completions
#### Ratings โ
> Needs more thought and design.
Manage personal title ratings.
- `mpl rating rate` โ - rate a title
- `mpl rating unrate` โ - unrate a title
- `mpl rating tiers` โ - list rated titles in tiers
#### Plays โ
> Needs more thought and design.
Log and manage title plays.
- `mpl play log`/`create` โ - log a new play
- `mpl play delete` โ - delete an existing play
- `mpl play list` โ - list all logged plays
- Arg BGG_ID โ - list title logged plays
- `mpl play stats` โ - view title play stats
## โ๏ธ Configuration
### Environment Variables
**mpl** respects the following env variables:
- `MPL_HOME`/`XDG_CONFIG_HOME` - change where `.mpl/` is stored. Default:
`~/.mpl/`
### Config options
These options can be managed with `mpl config`.
> Global configs are stored in `.mpl/config.toml`.
> Profile level configs are stored in `.mpl//config.toml`
- `update_on_change` - automatically pass `--update` to add/drop operations.
Default `false`
- `default_stash` - the default stash to perform add/drop operations on. Default
`collection`
### Completions
**mpl** supports tab completions for `bash`, `zsh`, and `fish`. For
setup, run `mpl config completions `.
## ๐ Resources
- [Changelog](docs/changelog.md) - See a history of implemented
features/changes.
- [Roadmap](https://github.com/boldandbrad/mpl-cli/milestones) - See a list of
planned features and milestones.
- [FAQ](docs/faq.md) - Find answers to common questions.
- [Contributor Guide](docs/contributing.md) โ - Find out how to get involved.
## โ๏ธ Legal
> [!NOTE]
> Neither **mpl** nor its maintainers are affiliated with
> [BoardGameGeek](https://boardgamegeek.com).
Copyright (c) 2023 Bradley Wojcik. Released under the MIT License. See
[LICENSE](LICENSE) for details.