micro editor¶
- ID
micro- Home page
- Version requirement
>= 2
- Platforms
🅱️ BSD · 🐧 Linux · 🍎 macOS · ⨂ Unix · 🪟 Windows
- Operations
installed·search·install·upgrade·upgrade_all·remove- purl types
pkg:micro- CLI name
micro- Issues and PRs
- Source
micro is a terminal text editor (https://micro-editor.github.io), and what is wrapped here is its plugin manager.
An editor’s plugin manager usually fails the test that decides whether a tool
can be driven with nobody at the keyboard, and micro passes it outright: the
-plugin flag is handled before the screen is ever initialized, writing to
standard output and exiting, so no terminal is required and no interface is
drawn. It also owns a real registry rather than fetching whatever Git URL a
user names: a curated channel of plugin manifests, each carrying semantic
versions and dependency constraints that micro resolves against its own
version.
No logo is declared: Simple Icons carries no mark for the editor, so the manager page keeps its default package glyph rather than borrowing an unrelated one.
Warning
micro always exits zero from a plugin command, whatever happened. Installing a plugin that does not exist, a failed download and an unresolvable dependency all report success, because the flag handler exits zero unconditionally and writes its diagnosis to standard output rather than to standard error. mpm reports what the tool reports, so a failed install here shows as a success. Reading the output is the only way to tell, and this definition deliberately does not try to guess at error strings that upstream never promised to keep.
Note
The inventory reports the plugins micro has loaded, not every plugin on disk: one installed but disabled in the editor’s settings is skipped. That is micro’s own notion of what is installed, and it is the set its own commands act on.
No outdated: nothing non-mutating reports a remote version. The catalog
listing prints names alone, the search command prints no versions at all, and
the only comparison against the registry happens inside the update, which
installs as it goes. upgrade --all is unaffected.
No sync: there is no command that refreshes the plugin channel without also
acting on it. No cleanup either.
No escalation: plugins live under the editor’s own configuration directory,
which follows $MICRO_CONFIG_HOME or the XDG configuration home before
falling back to ~/.config/micro.
What mpm adds to micro¶
Through mpm, micro gains --exact and --extended search, to narrow to exact names or match descriptions.
Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover micro alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.
Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.
Your micro commands, in mpm¶
You already know micro: each operation maps one-to-one onto mpm, in an interface shared by every manager.
To… |
With |
With |
|---|---|---|
List what’s installed |
|
|
Search for a package |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Operations¶
Operation |
Supported |
Notes |
|---|---|---|
|
✓ |
|
|
||
|
||
|
✓ |
exact and extended search backfilled by |
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
||
|
||
|
Selecting and configuring micro¶
Deselect micro for a single run with --no-micro, or persist the choice in your configuration:
[mpm]
micro = false
Keep it enabled but tune how mpm drives it with a per-manager override:
[mpm.managers.micro]
timeout = 900
mpm config-template micro prints every overridable attribute as a ready-to-paste block.
Recipes¶
A few jobs you would otherwise script around micro, one mpm command each:
Snapshot and clone a machine:
mpm --micro dump micro.toml, thenmpm restore micro.tomlon the next one.Export a compliance SBOM:
mpm --micro sbom(CycloneDX by default,--spdxfor SPDX).
Privilege escalation¶
mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.
None of its operations needs root.
See privilege escalation for the full policy.
Cooldown¶
State of micro editor’s release-age gating, from the cooldown support table:
Status: ❌ None
A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:
Registry: Git-manifest indexes
Retraction: Index revert: reverting the manifest, Portfile or derivation commit withdraws the version
Publish date: ❌ only the commit date, which is client-set and trivially backdated
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.
Version probe¶
The version is probed by running:
$ micro -version
Version: 2.0.12
Commit hash: c2cebaa3
Compiled on May 16, 2024
and extracted with:
r"^Version:[ \t]+(?P<version>\S+)"
Reference traces¶
Raw native outputs captured in the bundled definition: the reference mpm’s parsers were written against. If you know micro editor well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ micro -plugin list
The following plugins are currently installed:
editorconfig (1.0.0)
fzf (1.1.1)
lsp (0.6.2)
autoclose (built-in)
comment (built-in)
diff (built-in)
Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --micro installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.
Changelog¶
7.7.0.dev0(unreleased)Add the micro editor’s plugin manager with
installed,search,install,upgradeandremovesupport, shipped as a bundled definition. Its plugin flag is handled before the editor’s screen is initialized, so it runs headlessly, and its plugins come from a channel micro curates rather than from arbitrary Git URLs. Note that micro exits zero from every plugin command whatever the outcome, so a failed install is reported as a success.