Revue
DocumentationFiles and sync

Files, sync and settings for one computer

Where Revue keeps your settings, accounts and drafts, how to sync them between computers, and how to back up, move or reset them.

Revue keeps everything that's yours (settings, accounts, drafts, favourites) in one config folder. Copy or sync that folder and another computer gets the same Revue. What only makes sense on one computer (sign-in tokens, downloads, caches) lives in other folders that never sync.

The three folders#

FolderWhat's in itSyncs?
Config folderSettings, accounts (without their tokens), drafts and viewed files, imported themes, Slack attachments, open tabsYes, if you sync it
Data folderSettings kept for this computer only, downloaded language servers, sign-in tokensNever
Cache folderSource checkouts, saved API responses, images, other downloadsNever; safe to delete

To find them from the app: Settings → Storage → Settings files shows the paths of settings.json (in the config folder) and settings.local.json (in the data folder), each with Open. Settings → Storage → Cache shows the cache folder with Open folder.

Where each folder is, per OS
LinuxmacOSWindows
Config folder~/.config/revue~/.config/revue%USERPROFILE%\.config\revue
Data folder~/.local/share/revue~/Library/Application Support/revue%APPDATA%\revue
Sign-in tokens filein the data folderin the data folder%LOCALAPPDATA%\revue
Cache folder~/.cache/revue~/Library/Caches/revue%LOCALAPPDATA%\revue
  • The config folder is ~/.config/revue on every OS, so it's the same path to sync everywhere. If XDG_CONFIG_HOME is set to an absolute path, it's $XDG_CONFIG_HOME/revue instead, on every OS.
  • On Linux, XDG_DATA_HOME and XDG_CACHE_HOME move the data and cache folders as usual.
  • Development builds (built from source in debug mode, such as task dev) use revue-dev in place of revue in every one of these folders, so they never touch the installed app's settings or sign-ins.

What's in each file#

Config folder#

File or folderWhat it holds
settings.jsonYour shared settings. Every key is in the Settings reference.
state.jsonWhat Revue remembers rather than what you set: open, pinned and recent tabs, the pull request list's tab and filters, the branch list's order, panel widths.
tokens/One file per service (github.json, bitbucket.json, forgejo.json, jira.json, slack.json, and slack-app.json for your own Slack app). They name the accounts, sites and workspaces, never their tokens.
prs/One file per pull request you opened: draft comments, the review's text, unsent replies, files marked viewed, the commit you last saw, and that PR's own layout and thread filters.
slack-choices.jsonThe review dialog's Notify in Slack choice and thread, per pull request.
slack-attachments/Files attached to Slack message formats.
color-themes/, code-themes/Themes you imported.

Favourites (starred pull requests, repositories and Jira projects) and ignored repositories are in settings.json.

Data folder#

File or folderWhat it holds
settings.local.jsonSettings kept on this computer only (see Settings for one computer).
sign-ins.jsonSign-in tokens, readable only by you (on Windows it's in %LOCALAPPDATA%\revue). Not used while the system's credential store is on.
sign-ins.sealedLinux, with the credential store on: the tokens, encrypted with a key kept in the Secret Service.
account-files/The Slack message attachments your Revue account syncs, as this computer last got them (one file each). They're images, not secrets, so they're kept beside the tokens rather than with them.
language-servers/Language servers Revue downloaded, and the Node.js they share.
instance-portThe running Revue's port, so links open in it instead of a second Revue.

Cache folder#

File or folderWhat it holds
sources/Source checkouts for the Code tab and editors, one folder per repository (owner-repo), each checkout in a short folder like pr-12-1a2b3c4d or commit-1a2b3c4d. The 3 most recently used of each kind are kept per repository.
http/Saved API responses, so Revue starts with the last known state before the network answers.
img/Downloaded images (avatars, images in comments), kept for 7 days.
opened/, open/Copies of files written out to open them in another app.
app-icons/, jira-icons/, slack/Icons, and each Slack workspace's people and emoji (kept for a day).
settings-cache.jsonWhat this computer found out by itself: language servers detected per repository, servers stopped by hand.

Where sign-in tokens are kept#

Tokens never go in the config folder, so syncing it never copies them. Each computer signs in on its own. That's on purpose: some services (Atlassian, Forgejo, Slack) give single-use refresh tokens, and two computers sharing one would keep signing each other out.

By default tokens are in sign-ins.json, readable only by you. Settings → Storage → Where tokens are kept moves them into the system's credential store instead:

OSSwitch labelWhere they go
macOSKeep tokens in the macOS KeychainYour login keychain
WindowsKeep tokens encrypted for your Windows userA file encrypted for your Windows user (DPAPI)
LinuxKeep tokens in the Secret Service (GNOME Keyring, KWallet…)A file encrypted with a key kept in the Secret Service, through secret-tool

The switch is always for this computer only. Turned off, the tokens go back to the file and the store's entry is deleted. If the store can't be used, Revue says The system's credential store can't be used here: sign-ins stay where they were.

Advanced: the credential store's entry
  • All tokens are one entry, so macOS asks at most once (choose Always Allow; it may ask again after an update).
  • macOS: a generic password with service revue and account sign-ins.
  • Windows: %LOCALAPPDATA%\revue\sign-ins.bin.
  • Linux: the Secret Service keeps at most 8 KB in an item, so it keeps only the key: an item labelled Revue sign-ins (revue) with the attributes application revue kind sign-ins-key. The tokens are encrypted with it in ~/.local/share/revue/sign-ins.sealed, which is nothing without the key. It needs secret-tool (libsecret) and a desktop session. If the store is on but locked or missing at start, tokens are kept in the file meanwhile and moved into the store on a later start.
  • Development builds use revue-dev in place of revue.

Sync between computers#

Sync the config folder with any file sync tool (Syncthing, a cloud drive's folder sync, rsync), or keep it in a dotfiles repository. Revue notices when a synced file changes and reads it again, without a restart.

What follows you: settings, accounts (you sign in again once on each computer), drafts and viewed files, favourites, ignored repositories, open and pinned tabs, imported themes, Slack message formats and attachments.

What never syncs, and why:

  • Tokens: each computer signs in on its own (see above).
  • Settings switched to This computer: they're in the data folder, by design.
  • Clone folders and the token store switch: always per computer.
  • Downloads and caches: big, and found or downloaded again on their own.
Advanced: tips for sync tools and dotfiles
  • Revue saves a file by writing name.tmp and renaming it. Telling your sync tool to ignore *.tmp avoids syncing half-written files.
  • With a dotfiles repository, settings.json and tokens/ are fine to commit (no secrets in them, but they name your accounts and sites). state.json and prs/ change all the time; you may prefer to leave them out.
  • On a computer where the synced settings name a theme you haven't imported there, Revue falls back to its own theme.

Guide: Sync Revue between two computers#

  1. On the first computer, open Settings → Storage → Settings files and note the Shared file's folder: that's the config folder.
  2. Quit Revue on the second computer if it's running.
  3. Set up your sync tool to sync that folder to the same place on the second computer (~/.config/revue, or %USERPROFILE%\.config\revue on Windows).
  4. Wait for the first sync to finish, then start Revue on the second computer.
  5. Your accounts are listed, but they have no tokens on this computer yet. Sign in to each again: use Sign in again on the notice that says a sign-in has expired or was revoked, or the account's card in Settings → Accounts.
  6. In Settings → Storage → Where repositories are cloned, choose where this computer clones repositories.
  7. Under REPOSITORIES in the Settings sidebar, click Detect clones for all to find this computer's clones.
  8. For anything that should differ between the computers (fonts, text size, apps, theme), click the card's Shared switch so it reads This computer.

Settings for one computer#

Some settings belong to one computer: a laptop wants a bigger text size, a desktop another editor. Cards with a Shared / This computer switch in their title can be kept on this computer only (the list is in the Settings reference).

  • This computer: the card's settings are saved in settings.local.json. Other computers keep their own value.
  • Shared again: this computer's value goes to settings.json and so to the other computers.

Settings → Storage → Settings files lists which settings this computer holds for itself (Holds …), or says Nothing yet.

You can also add any setting to settings.local.json by hand, even one without a switch.

How settings.local.json is merged#

The merge rules
  • Revue reads settings.json, then lays settings.local.json over it, key by key.
  • A top-level key in the local file wins over the shared one.
  • Objects merge key by key, so a local local_repos can add or change one repository's clone and still get the others from the shared file.
  • null removes a key, so its default applies on this computer.
  • Anything else (values, lists) replaces the shared value whole.
  • When Revue saves, keys the local file has stay there (only what differs from the shared value is written), and everything else goes to settings.json.
  • credential_store, clone_folder and clone_folders are always local: Revue never reads them from settings.json.
  • If the local file can't be used (a value of the wrong type), Revue uses the shared settings alone.
  • The local file is only rewritten when what it holds changes, so your own layout of it is kept.

Example settings.local.json:

{
  "text_size": 125,
  "editor_command": "helix",
  "local_repos": { "acme/api": "/home/me/src/api" }
}

Export and import settings#

Settings → Storage → Settings files has Export settings… and Import settings…. Use them to keep a copy of your settings or to set up a computer without syncing.

  • Export settings… saves a file (named revue-settings.json, in your Documents folder by default). It holds every setting you set, and the files attached to Slack message formats.
  • Import settings… asks Replace your settings with the file's? first. Replace applies the file at once; settings it doesn't have go back to their defaults.

Never in the file, and kept as they are by an import: sign-ins, open tabs and recent items, this computer's caches, the token store switch, clone folders, local clones, the custom editor, the Slack app's path, and language servers set to a custom program.

Advanced: the export file's format

A JSON file:

{
  "revue": "settings",
  "version": "0.23.1",
  "settings": { "split": true, "text_size": 110, "...": "..." },
  "files": { "slack-attachments/approved/party.gif": "<base64>" }
}
  • revue must be "settings", or the import is refused (not a file of Revue's exported settings).
  • settings uses the same keys as settings.json. Left out: the state.json and settings-cache.json keys, credential_store, clone_folder, clone_folders, local_repos, slack_app, editor_command, and the mode, path and args of language servers set to a program of your own.
  • files holds the Slack attachments, base64-encoded, by their path in the config folder. An import writes only paths under slack-attachments/. An attachment the file doesn't hold is dropped, unless this computer already has it.
  • Settings you switched to This computer stay on this computer after an import, with the file's values.
  • If the file can't be used, nothing changes and Revue says why (Couldn't import the settings: …).

Back up Revue#

  1. Quit Revue, so no file is half-written.
  2. Copy the config folder somewhere safe.
  3. Optionally copy settings.local.json from the data folder too, for this computer's own settings.

To restore, put the folder back and start Revue. Tokens aren't in the backup: on another computer, or after deleting the data folder, sign in again.

Moved from older versions#

Revue moves its files from older layouts by itself, once:

  • Before 0.8.1, settings, sign-ins and pull request files were in the data folder. They move to the config folder, unless it already has them (from another computer, say).
  • Open tabs, recent items and the list's filters were in settings.json until 0.17. They move to state.json, and detected language servers to settings-cache.json.
  • Tokens that older versions kept inside the tokens/ files move out of them to this computer's token file or credential store. A single GitHub token from before Revue had several accounts (a token file) becomes an account in tokens/github.json.
  • Source checkouts in the old src/ cache folder are deleted; they download again into sources/.

Reset Revue#

Start with the smallest reset that fixes your problem:

To resetDo this
Downloads and cachesSettings → Storage → Cache → Clear everything
The ignored files listSettings → Ignored files → Reset to default
One computer's own settingsQuit Revue and delete settings.local.json from the data folder
All settingsQuit Revue and delete settings.json (and settings.local.json); accounts and drafts stay
Open tabs and filtersQuit Revue and delete state.json
One accountSettings → Accounts → Sign out

Guide: Reset Revue completely#

  1. Quit Revue.
  2. Delete (or rename, to keep a backup) the config folder. This removes settings, accounts, drafts and themes, and, if you sync it, on your other computers too.
  3. Delete the data folder and the cache folder.
  4. On Windows, delete %LOCALAPPDATA%\revue too.
  5. If tokens were in the system's credential store, turn Where tokens are kept off first (before step 1), or delete the store's entry by hand (see Where sign-in tokens are kept).
  6. Start Revue: it opens as on first install.