Skip to content

Integration with about myfox

Vitaliy Elin edited this page Oct 30, 2026 · 9 revisions

The about:myfox page of MyFox tweaks controls MyFox by running its commands.

myfox.json

<install folder>/myfox.json:

{
    "launcher": "/home/user/.local/share/myfox/bin/myfox",
    "version": "1.1.20",
    "features": ["command", "command-backup", "profiles", "update", "profiles-import", "update-check", "profiles-remove", "profiles-new", "profiles-rename"]
}
Field Value
launcher the path to the myfox command
version the installed MyFox version
features the supported capabilities; check these, not the version number
Capability Meaning
command myfox command [on|off] --json
command-backup the backup field and the --keep-backup flag
profiles myfox profile list --json and myfox profile apply <ID> --json
update myfox refresh --json
profiles-import myfox profile import … --relaunch and myfox profile use <ID> --relaunch
update-check myfox refresh --check --json and <install>/myfox-updates.json
profiles-remove myfox profile remove <ID> -y with MyFox's Firefox open
profiles-new myfox profile new [--name NAME] [--open] -y and myfox profile import … without --use with MyFox's Firefox open; new --use --relaunch. Since MyFox 1.4.0
profiles-rename myfox profile rename <ID> <NAME> --json. Since MyFox 1.4.0

The file is updated on install, reinstall and every myfox refresh. If the tweaks were installed without MyFox, there is no such file.

myfox command --json

myfox command --json
myfox command on --json
myfox command off --json
myfox command off --keep-backup --json

Asks nothing. Prints one line of JSON, exit code 0:

Field Value
on whether the command is on
link the link's path (~/.local/bin/firefox)
target where it points (<install folder>/firefox-myfox)
replaces a foreign firefox that will be kept on turning it on, or null
backup the path to firefox.myfox-backup, or null
path ok, not_in_path or shadowed
found_first with shadowed, the firefox found first
notes warnings in the user's language

On an error, including when MyFox is not installed: {"error": "…"}, exit code 1.

myfox profile list --json

myfox profile list --json        # profiles related to MyFox
myfox profile list --all --json  # also other Firefoxes' ones

Asks nothing. Prints one line of JSON, an array of profiles, exit code 0:

Field Value
id the ID the myfox profile commands take
name the name in Firefox's profile list
path the profile's folder
store myfox (the profile folder MyFox's Firefox uses), snap or flatpak
owner myfox (has the tweaks), ours (made with firefox -p in MyFox's Firefox), unused (never opened) or foreign (another Firefox's, can only be imported)
tweaks whether it has the tweaks
used whether MyFox's Firefox opens it by default
open whether a Firefox has it open now
created whether MyFox created it
last_used when a Firefox last opened it (UTC, 2026-10-26T18:23:52Z), or null
last_version the Firefox version that last opened it, or null
imported_from the original's folder for an imported profile, or null
moved whether the profile was moved (--move): imported_from is gone then
placeholder true for an empty placeholder (only with --all): not a profile, nothing to do with it. Since MyFox 1.3.4
restore_sync the folder myfox profile remove gives the Firefox account back to (the import moved it into this copy), or null; then --no-restore-sync keeps it in the copy. Since MyFox 1.3.2
account whether it is signed in to a Firefox account

On an error: {"error": "…"}, exit code 1.

myfox profile apply --json

Applies the tweaks to a profile related to MyFox. Asks nothing; the profile must not be open. Prints {"ok": true, "id": "…"}, exit code 0, or {"error": "…"}, exit code 1.

Switching the profile MyFox's Firefox opens changes Firefox's profile list, which a running Firefox rewrites: it only runs with that Firefox closed (--relaunch, below). With profiles-new, making, importing (without --use), renaming and deleting other profiles run with it open (see Profiles).

Making a profile from the page

profiles-new in features. No window, no questions:

myfox profile new [--name NAME] [--open] -y          # beside the open Firefox; --open: in a window of its own
myfox profile new [--name NAME] --use --relaunch --gui   # the one MyFox opens from now on
myfox profile import <ID> … -y                        # without --use: no --relaunch needed

Exit code 0: done; 1: not done, the reason on stderr.

Renaming a profile from the page

profiles-rename in features. Only profiles MyFox created (created in the list), with Firefox open:

myfox profile rename <ID> <NAME> --json

Prints {"ok": true, "id": "…", "name": "…"}, exit code 0, or {"error": "…"}, exit code 1.

Deleting a profile from the page

profiles-remove in features. The page asks for the confirmation itself and runs

myfox profile remove <ID> -y [--no-restore-sync]

No window, no questions; MyFox's Firefox may stay open, only the profile being deleted must be closed. Exit code 0: deleted. Exit code 1: not deleted, the reason is on stderr (the profile is open, it is the default one, it wasn't created by MyFox, or the original a moved account goes back to is open; that last one goes away with --no-restore-sync).

Importing and switching profiles from the page

profiles-import in features. Everything is chosen on the page; the page starts the command, detached, and does nothing more:

myfox profile import <ID> [--move | --sync none|copy|move] [--name NAME] [--use | --open] [--allow-downgrade] --relaunch --gui
myfox profile use <ID> --relaunch --gui

--relaunch: no questions; MyFox's window only shows the progress. MyFox closes every open MyFox profile (firefox-myfox --profile <folder> --myfox-quit, the session is kept), waits up to 60 s, does the work and starts them again, also after an error or a cancel (then all is as it was). On success the window closes itself; on an error it stays with the message. Nothing comes back to the page: the next myfox profile list --json shows the result.

A profile opened beside the default one is started as firefox-myfox --profile <folder>, without --no-remote: such an instance takes no commands and couldn't be closed for an import.

myfox refresh --json

Installs the available updates: the tweaks (into the install and every MyFox profile), the themes, the bookmarklet styling and MyFox itself; --force downloads everything again. Firefox updates itself and is not touched. Asks nothing and runs with Firefox open. Prints one line, exit code 0:

{"ok": true, "updated": [{"track": "tweaks", "from": "159.10", "to": "160.0"}], "restart": true}
Field Value
updated what was updated: track is tweaks, themes, bookmarklets or core; from (null if there was none) and to as MyFox shows them (160.0, 1.2.2; the themes and bookmarklets as a date, 2026-10-12 08:16); empty if nothing was new
restart true if something other than MyFox itself was updated: Firefox reads it when it starts. MyFox doesn't restart Firefox

On an error: {"error": "…"}, exit code 1.

What's new is at https://github.com/CustomFF/myfox/releases/latest/download/changelog.json (MyFox) and https://github.com/CustomFF/myfox-tweaks/releases/latest/download/changelog.json (the tweaks).

myfox refresh --check --json

Says what an update would bring, installing nothing; needs update-check in features. Prints one line, exit code 0:

{"checked": "2026-10-28T13:46:36Z", "updates": [{"track": "core", "from": "1.2.3", "to": "1.2.4", "changes": ["…"]}]}
Field Value
checked when, in UTC
updates what's new: track, from and to as in refresh --json; changes, the changelog lines between them (may be empty)

The same answer is kept in <install>/myfox-updates.json (next to myfox.json), so the page can show it again without the network. myfox refresh takes out of it what it installed. An entry the install already has (updated some other way) can still be there: compare to with the installed version. On an error: {"error": "…"}, exit code 1, and the saved check stays.

Clone this wiki locally