Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ only want to check one part without installing anything.

| Config | Use for |
| -------------------------------------------------------------- | ------------------------------------------------------------- |
| [`[bootstrap.packages]`](/bootstrap/packages/) | OS packages from apk, apt, dnf, pacman, brew, or mas |
| [`[bootstrap.packages]`](/bootstrap/packages/) | OS packages from apk, apt, dnf, pacman, brew, flatpak, or mas |
| [`[bootstrap.repos]`](/bootstrap/repos.html) | Git repos cloned before dotfiles are applied |
| [`[dotfiles]`](/dotfiles.html) | Whole-file dotfiles and small managed edits to existing files |
| [`[bootstrap.mise_shell_activate]`](/bootstrap/shell.html) | mise activation snippets in shell startup files |
Expand Down
42 changes: 42 additions & 0 deletions docs/bootstrap/packages/flatpak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Flatpak

Flatpak applications and runtimes installed system-wide via the
[`flatpak`](https://docs.flatpak.org/en/latest/flatpak-command-reference.html) CLI.

```toml
[bootstrap.packages]
"flatpak:org.mozilla.firefox" = "latest"
"flatpak:org.gnome.Builder" = "latest"
```

Flatpak packages are part of `[bootstrap.packages]`, just like apt packages,
Homebrew formulae, and Mac App Store apps. The package name is an application
or runtime ID accepted by `flatpak install` and `flatpak update`.

mise does not install Flatpak or configure remotes implicitly. Install the
`flatpak` CLI and add the required remote (commonly Flathub) before applying
the config:

```sh
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
mise bootstrap packages use flatpak:org.mozilla.firefox
```

## Commands

```sh
mise bootstrap packages status --manager flatpak
mise bootstrap packages apply --manager flatpak
mise bootstrap packages upgrade --manager flatpak
```

mise manages the system-wide Flatpak installation. `apply` runs
`flatpak install --system --noninteractive <id>` for missing packages, while
`upgrade` runs `flatpak update --system --noninteractive <id>` for installed
packages. Flatpak resolves the configured ID from the system remotes.

Flatpak does not expose installation of arbitrary historical versions through
these commands, so version pins are not supported. Use `"latest"` in config.

The manager is Linux-only and requires `flatpak` on `PATH`. On other platforms,
or when the command is missing, shared configs list Flatpak entries as skipped.
32 changes: 18 additions & 14 deletions docs/bootstrap/packages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mise can ensure machine-global system packages are installed via the
"brew:postgresql@17" = "latest"
"brew:ffmpeg" = "latest"
"brew-cask:firefox" = "latest"
"flatpak:org.mozilla.firefox" = "latest"
"mas:497799835" = "latest"
```

Expand Down Expand Up @@ -42,15 +43,16 @@ declarative sections work the same way:

## Supported package managers

| Manager | Platform | Page |
| ----------- | -------------------------------------------------------------- | ----------------------------------------- |
| `apk` | Alpine Linux | [apk](/bootstrap/packages/apk.html) |
| `apt` | Debian, Ubuntu | [apt](/bootstrap/packages/apt.html) |
| `dnf` | Fedora, RHEL, CentOS, Rocky, Alma | [dnf](/bootstrap/packages/dnf.html) |
| `pacman` | Arch, Manjaro | [pacman](/bootstrap/packages/pacman.html) |
| `brew` | macOS (arm64), Linux (x86_64/arm64) — **no Homebrew required** | [brew](/bootstrap/packages/brew.html) |
| `brew-cask` | macOS — **no Homebrew required** | [brew](/bootstrap/packages/brew.html) |
| `mas` | macOS with the `mas` CLI on `PATH` | [mas](/bootstrap/packages/mas.html) |
| Manager | Platform | Page |
| ----------- | -------------------------------------------------------------- | ------------------------------------------- |
| `apk` | Alpine Linux | [apk](/bootstrap/packages/apk.html) |
| `apt` | Debian, Ubuntu | [apt](/bootstrap/packages/apt.html) |
| `dnf` | Fedora, RHEL, CentOS, Rocky, Alma | [dnf](/bootstrap/packages/dnf.html) |
| `pacman` | Arch, Manjaro | [pacman](/bootstrap/packages/pacman.html) |
| `brew` | macOS (arm64), Linux (x86_64/arm64) — **no Homebrew required** | [brew](/bootstrap/packages/brew.html) |
| `brew-cask` | macOS — **no Homebrew required** | [brew](/bootstrap/packages/brew.html) |
| `flatpak` | Linux with the `flatpak` CLI on `PATH` | [Flatpak](/bootstrap/packages/flatpak.html) |
| `mas` | macOS with the `mas` CLI on `PATH` | [mas](/bootstrap/packages/mas.html) |

## Semantics

Expand All @@ -64,7 +66,8 @@ declarative sections work the same way:
- **OS-filtered** — entries for a manager that isn't available on the current
machine are not acted on, so the same config works across platforms: `apt`
entries are ignored on macOS, `dnf` entries on Ubuntu, and so on. `brew`
works on both macOS and Linux; `brew-cask` works on macOS; `mas` works on
works on both macOS and Linux; `brew-cask` works on macOS; `flatpak` works
on Linux when the `flatpak` CLI is on `PATH`; `mas` works on
macOS when the `mas` CLI is on `PATH`. Status commands still list
unavailable managers so nothing is silently invisible.
- **Manual installation only** — mise never installs system packages
Expand Down Expand Up @@ -96,7 +99,7 @@ mise bootstrap packages apply --yes # skip the confirmation prompt
mise bootstrap packages apply --manager apt
mise bootstrap packages apply --update # refresh package manager metadata first

mise bootstrap packages use apk:zlib-dev apt:curl brew:jq brew-cask:firefox mas:497799835
mise bootstrap packages use apk:zlib-dev apt:curl brew:jq brew-cask:firefox flatpak:org.mozilla.firefox mas:497799835
mise bootstrap packages use -g brew:ffmpeg # write globally
mise bootstrap packages use apt:curl@8.5.0-2 # pin a version
# (brew pins via the formula name instead: brew:postgresql@17)
Expand All @@ -112,6 +115,7 @@ mise bootstrap packages prune --manager brew --yes
mise bootstrap packages upgrade # upgrade installed packages to current versions
mise bootstrap packages upgrade --manager brew
mise bootstrap packages upgrade --manager brew-cask
mise bootstrap packages upgrade --manager flatpak
mise bootstrap packages upgrade --manager mas
```

Expand Down Expand Up @@ -139,12 +143,12 @@ declarative cleanup command, similar in spirit to
`mise bootstrap packages upgrade` refreshes package manager metadata and upgrades the
configured packages that are already installed to the newest available
version — apk, apt, and dnf also honor a version pinned in config (pacman, brew,
brew-cask, and mas [can't install pins](/bootstrap/packages/pacman.html), so
brew-cask, flatpak, and mas [can't install pins](/bootstrap/packages/pacman.html), so
pinned entries are skipped with a warning). Packages that aren't installed
yet are skipped — that's `mise bootstrap packages apply`'s job. For brew
this pours the formula's current bottle and replaces the old keg; for
brew-cask this installs the current cask artifact; for mas this runs
`mas upgrade`.
brew-cask this installs the current cask artifact; for flatpak this updates the
configured applications and runtimes; for mas this runs `mas upgrade`.

`mise doctor` also reports configured system packages and warns when any are
missing.
Expand Down
5 changes: 3 additions & 2 deletions docs/cli/bootstrap/packages/apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Packages in `manager:package` form; defaults to everything configured in [bootst

### `-m --manager <MANAGER>`

Only install packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, or `mas`
Only install packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, `flatpak`, or `mas`

**Choices:**

Expand All @@ -35,6 +35,7 @@ Only install packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`,
- `brew`
- `brew-cask`
- `dnf`
- `flatpak`
- `mas`
- `pacman`

Expand All @@ -54,7 +55,7 @@ Examples:

```
mise bootstrap packages apply
mise bootstrap packages apply apk:zlib-dev apt:curl brew:jq brew-cask:firefox mas:497799835
mise bootstrap packages apply apk:zlib-dev apt:curl brew:jq brew-cask:firefox flatpak:org.mozilla.firefox mas:497799835
mise bootstrap packages apply --dry-run
mise bootstrap packages apply --manager apt --yes
```
5 changes: 3 additions & 2 deletions docs/cli/bootstrap/packages/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Refreshes package manager metadata and upgrades the configured packages
that are already installed: apk/apt/dnf/pacman upgrade to the newest available
version (apk, apt, and dnf honor a version pinned in config), brew pours the
formula's current bottle and replaces the old keg, brew-cask installs
the current cask artifact, and mas upgrades App Store apps. Packages that
the current cask artifact, flatpak updates applications and runtimes, and mas upgrades App Store apps. Packages that
are not installed yet are skipped — use `mise bootstrap packages apply`
for those.

Expand All @@ -27,7 +27,7 @@ Packages in `manager:package` form; defaults to everything configured in [bootst

### `-m --manager <MANAGER>`

Only upgrade packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, or `mas`
Only upgrade packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, `flatpak`, or `mas`

**Choices:**

Expand All @@ -36,6 +36,7 @@ Only upgrade packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`,
- `brew`
- `brew-cask`
- `dnf`
- `flatpak`
- `mas`
- `pacman`

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/bootstrap/packages/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Skip the confirmation prompt
Examples:

```
mise bootstrap packages use apk:zlib-dev apt:curl brew:jq brew-cask:firefox mas:497799835
mise bootstrap packages use apk:zlib-dev apt:curl brew:jq brew-cask:firefox flatpak:org.mozilla.firefox mas:497799835
mise bootstrap packages use -g brew:postgresql@17
mise bootstrap packages use apt:curl@8.5.0-2
```
2 changes: 1 addition & 1 deletion docs/tool-plugin-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Optional fields:

- **`version`** — a constraint (`>=3.0`, `>3`, `<=1.2`, `=3.0`, or a bare `3.0` meaning `>=3.0`) for `bin` and `pkgconfig`. mise runs `<bin> --version` / `pkg-config --modversion` and compares. If a version can't be extracted, the dependency is treated as satisfied (presence is enough) rather than blocking the install.
- **`optional`** — a short reason string. Missing optional dependencies never prompt or fail; they surface as a single informational line, letting users build without features they don't need (e.g. Erlang's `wxWidgets` GUI).
- **`packages`** — a map of package-manager name (`brew`, `brew-cask`, `apt`, `dnf`, `pacman`, `apk`, `mas`) to the package that provides the capability.
- **`packages`** — a map of package-manager name (`brew`, `brew-cask`, `apt`, `dnf`, `pacman`, `apk`, `flatpak`, `mas`) to the package that provides the capability.

**Detection is the source of truth.** A check that passes is satisfied no matter how the capability was installed — Homebrew, apt, nix, MacPorts, or from source all pass without ceremony, and mise never asks _how_ it got there. The `packages` map is only consulted to _offer_ installing the missing subset; it is a remediation hint, not a declaration that the tool must come from that package manager.

Expand Down
6 changes: 3 additions & 3 deletions man/man1/mise.1
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ only. `install` is accepted as an alias for this command.
.PP
.TP
\fB\-m, \-\-manager\fR \fI<MANAGER>\fR
Only install packages for this manager, e.g. `apk`, `apt`, `brew`, `brew\-cask`, or `mas`
Only install packages for this manager, e.g. `apk`, `apt`, `brew`, `brew\-cask`, `flatpak`, or `mas`
.TP
\fB\-n, \-\-dry\-run\fR
Print the commands that would run without running them
Expand Down Expand Up @@ -1191,7 +1191,7 @@ Refreshes package manager metadata and upgrades the configured packages
that are already installed: apk/apt/dnf/pacman upgrade to the newest available
version (apk, apt, and dnf honor a version pinned in config), brew pours the
formula's current bottle and replaces the old keg, brew\-cask installs
the current cask artifact, and mas upgrades App Store apps. Packages that
the current cask artifact, flatpak updates applications and runtimes, and mas upgrades App Store apps. Packages that
are not installed yet are skipped — use `mise bootstrap packages apply`
for those.

Expand All @@ -1203,7 +1203,7 @@ Packages can also be given explicitly in `manager:package` form.
.PP
.TP
\fB\-m, \-\-manager\fR \fI<MANAGER>\fR
Only upgrade packages for this manager, e.g. `apk`, `apt`, `brew`, `brew\-cask`, or `mas`
Only upgrade packages for this manager, e.g. `apk`, `apt`, `brew`, `brew\-cask`, `flatpak`, or `mas`
.TP
\fB\-n, \-\-dry\-run\fR
Print the commands that would run without running them
Expand Down
14 changes: 7 additions & 7 deletions mise.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,14 @@ only. `install` is accepted as an alias for this command.
Examples:

$ mise bootstrap packages apply
$ mise bootstrap packages apply apk:zlib-dev apt:curl brew:jq brew-cask:firefox mas:497799835
$ mise bootstrap packages apply apk:zlib-dev apt:curl brew:jq brew-cask:firefox flatpak:org.mozilla.firefox mas:497799835
$ mise bootstrap packages apply --dry-run
$ mise bootstrap packages apply --manager apt --yes

"""#
flag "-m --manager" help="Only install packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, or `mas`" {
flag "-m --manager" help="Only install packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, `flatpak`, or `mas`" {
arg <MANAGER> {
choices apk apt brew brew-cask dnf mas pacman
choices apk apt brew brew-cask dnf flatpak mas pacman
}
}
flag "-n --dry-run" help="Print the commands that would run without running them"
Expand Down Expand Up @@ -625,7 +625,7 @@ Refreshes package manager metadata and upgrades the configured packages
that are already installed: apk/apt/dnf/pacman upgrade to the newest available
version (apk, apt, and dnf honor a version pinned in config), brew pours the
formula's current bottle and replaces the old keg, brew-cask installs
the current cask artifact, and mas upgrades App Store apps. Packages that
the current cask artifact, flatpak updates applications and runtimes, and mas upgrades App Store apps. Packages that
are not installed yet are skipped — use `mise bootstrap packages apply`
for those.

Expand All @@ -642,9 +642,9 @@ Examples:
$ mise bootstrap packages upgrade --dry-run

"""#
flag "-m --manager" help="Only upgrade packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, or `mas`" {
flag "-m --manager" help="Only upgrade packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, `flatpak`, or `mas`" {
arg <MANAGER> {
choices apk apt brew brew-cask dnf mas pacman
choices apk apt brew brew-cask dnf flatpak mas pacman
}
}
flag "-n --dry-run" help="Print the commands that would run without running them"
Expand All @@ -669,7 +669,7 @@ a mise version selector. mas uses numeric ADAM IDs and does not support pins.
after_long_help #"""
Examples:

$ mise bootstrap packages use apk:zlib-dev apt:curl brew:jq brew-cask:firefox mas:497799835
$ mise bootstrap packages use apk:zlib-dev apt:curl brew:jq brew-cask:firefox flatpak:org.mozilla.firefox mas:497799835
$ mise bootstrap packages use -g brew:postgresql@17
$ mise bootstrap packages use apt:curl@8.5.0-2

Expand Down
6 changes: 3 additions & 3 deletions src/cli/system/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ pub struct SystemInstall {
#[clap(value_name = "PACKAGE")]
packages: Vec<String>,

/// Only install packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, or `mas`
#[clap(long, short, value_parser = ["apk", "apt", "brew", "brew-cask", "dnf", "mas", "pacman"])]
/// Only install packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, `flatpak`, or `mas`
#[clap(long, short, value_parser = ["apk", "apt", "brew", "brew-cask", "dnf", "flatpak", "mas", "pacman"])]
manager: Option<String>,

/// Print the commands that would run without running them
Expand Down Expand Up @@ -384,7 +384,7 @@ static AFTER_LONG_HELP: &str = color_print::cstr!(
r#"<bold><underline>Examples:</underline></bold>

$ <bold>mise bootstrap packages apply</bold>
$ <bold>mise bootstrap packages apply apk:zlib-dev apt:curl brew:jq brew-cask:firefox mas:497799835</bold>
$ <bold>mise bootstrap packages apply apk:zlib-dev apt:curl brew:jq brew-cask:firefox flatpak:org.mozilla.firefox mas:497799835</bold>
$ <bold>mise bootstrap packages apply --dry-run</bold>
$ <bold>mise bootstrap packages apply --manager apt --yes</bold>
"#
Expand Down
6 changes: 3 additions & 3 deletions src/cli/system/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::system;
/// that are already installed: apk/apt/dnf/pacman upgrade to the newest available
/// version (apk, apt, and dnf honor a version pinned in config), brew pours the
/// formula's current bottle and replaces the old keg, brew-cask installs
/// the current cask artifact, and mas upgrades App Store apps. Packages that
/// the current cask artifact, flatpak updates applications and runtimes, and mas upgrades App Store apps. Packages that
/// are not installed yet are skipped — use `mise bootstrap packages apply`
/// for those.
///
Expand All @@ -23,8 +23,8 @@ pub struct SystemUpgrade {
#[clap(value_name = "PACKAGE")]
packages: Vec<String>,

/// Only upgrade packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, or `mas`
#[clap(long, short, value_parser = ["apk", "apt", "brew", "brew-cask", "dnf", "mas", "pacman"])]
/// Only upgrade packages for this manager, e.g. `apk`, `apt`, `brew`, `brew-cask`, `flatpak`, or `mas`
#[clap(long, short, value_parser = ["apk", "apt", "brew", "brew-cask", "dnf", "flatpak", "mas", "pacman"])]
manager: Option<String>,

/// Print the commands that would run without running them
Expand Down
2 changes: 1 addition & 1 deletion src/cli/system/use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl SystemUse {
static AFTER_LONG_HELP: &str = color_print::cstr!(
r#"<bold><underline>Examples:</underline></bold>

$ <bold>mise bootstrap packages use apk:zlib-dev apt:curl brew:jq brew-cask:firefox mas:497799835</bold>
$ <bold>mise bootstrap packages use apk:zlib-dev apt:curl brew:jq brew-cask:firefox flatpak:org.mozilla.firefox mas:497799835</bold>
$ <bold>mise bootstrap packages use -g brew:postgresql@17</bold>
$ <bold>mise bootstrap packages use apt:curl@8.5.0-2</bold>
"#
Expand Down
Loading
Loading