@punktfunk/plugin-bottles

Adds the programs you added to your Bottles wine prefixes to a Punktfunk host's library, and launches them through bottles-cli — with the session ending when you quit the program.

Install it from the host's plugin store (Library → Game sources → Add a source), or:

punktfunk-host plugins add bottles

Nothing to configure: it reads every bottle's bottle.yml under the usual roots — $XDG_DATA_HOME, ~/.local/share/bottles/bottles, and the Flatpak build's ~/.var/app/com.usebottles.bottles/data/bottles/bottles. If your bottles live somewhere else, set the directory in Library → Game sources → Bottles → Settings.

What is read

One entry per program in a bottle's External_Programs — the list Bottles shows under a bottle's Programs, minus the ones you removed. A program Bottles only found in the prefix's Start Menu but you never added is not stored in bottle.yml, so add it in Bottles first.

Each entry keeps the program's name and, when the exe's folder exists on the host, its install dir — which is what lets the host notice the program exiting, since bottles-cli hands off to wine. No art: Bottles keeps none per program.

Launching runs bottles-cli run -b '<bottle>' -p '<program>'. A bottle under the Flatpak data dir is launched through flatpak run --command=bottles-cli com.usebottles.bottles instead, as is any bottle when no native bottles-cli is on the host's PATH.

Settings

Field Meaning
Bottles directory The directory holding your bottle folders. Empty finds it automatically.

Platform

Linux only. On any other host the plugin reports Bottles as absent and syncs nothing.

The kit's parity verb has no baseline here: the host never had a built-in Bottles scanner.

Commands

punktfunk-plugin-bottles detect            # is Bottles installed on this host?
punktfunk-plugin-bottles scan --preview    # what WOULD be synced, as JSON (works with no host)
punktfunk-plugin-bottles uninstall         # drop the programs and release the store claim

Development

bun install
bun run typecheck && bun test && bun run build

The lockfile is regenerated once @punktfunk/plugin-kit 0.4.5 is published to the registry.

The framework — store claim, sync engine, __config, /__launch, CLI verbs, and the capped readers — lives in @punktfunk/plugin-kit/library. This package is the Bottles-specific part: find the bottle roots, parse bottle.yml, map programs to entries, compose the bottles-cli line. yaml is the one dependency beyond the kit, because bottle.yml is PyYAML output and deserves a real parser.

Use of AI

This project uses AI for writing code.

License

MIT OR Apache-2.0.

S
Description
A Punktfunk plugin that adds the programs in your Bottles as a library source
Readme
127 KiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 100%