Armadra

使用

设置、更新与数据

设置里有什么、怎样切换语言与主题、更新应用,以及数据保存在哪里、怎么备份和恢复。


这一篇讲设置的组织方式、更新应用的方法,以及你的数据放在哪里、怎样备份。

打开设置

按 ⌘,(Windows / Linux 为 Ctrl+,),或通过命令面板(⌘K)搜索「设置」。设置是一个大窗口:左边是分区导航,右边是当前分区的一整页;顶部有搜索框,可以按设置项名称直接跳到对应页。手机上铺满整屏,分区收进顶部的下拉框。

每一页的页头会标出作用范围:「本设备」只改这台设备上的这个界面;「主机」改的是运行 Armadra 核心服务的那台机器;「账号」跟着你的登录账号。通过远程连接别人的主机时,主机类的页面改的是对方的机器,成员只看得到与自己有关的页面。

设置的主要分组

分组 分区 内容
常用 默认 默认 Agent 与权限模式、会话视图默认形态、主题、背景、语言
外观与交互 通用 「侧栏默认展开」「启动动画」「打开时恢复上次工作空间」「显示系统文件」
通知 「需要你时通知」、停滞提醒与久未处理提醒、提示音与音量
画布 背景、网格与吸附、输入设备、默认颜色与粗细等
终端 配色、字体、字号、行高、光标、「选中即复制」等
浏览器 浏览器节点的内存与起始页(仅桌面版),见文件、编辑器与浏览器
快捷键 查看、改键、加替代键,或整体关闭,见键盘快捷键
Agent Agent CLI 各 CLI 的安装状态、画布注入、账号
自定义 Agent 添加自己的 CLI 启动形状
会话 已索引的会话
工作空间 工作空间 当前工作空间的设置(含语言服务、执行主机)
归档 已归档的工作空间,可「恢复」或「删除」
主机 本机服务 连接状态、终端会话策略、电源与资源、数据、崩溃上报
SSH 远程主机,见文件、编辑器与浏览器
代码托管 GitHub 等平台的凭据,见Git 与 GitHub
远程访问 对外服务、配对、中转账号,见自托管部署与远程访问
账号 账号与设备 登录方式、已登录设备与会话
成员与共享 服务器壳上的成员与工作空间共享
关于 关于 版本、更新、开源许可

部分页面(「本机服务」「SSH」「Agent CLI」等)只有主机所有者能看到;「浏览器」只在桌面版里出现;「成员与共享」只在服务器壳里出现。

语言与主题

在「设置 → 默认」里:

  1. 「主题」选「深色」「浅色」或「跟随系统」。
  2. 「背景」选一种背景样式;在支持的系统上还有「半透明窗口」。
  3. 「语言」选「中文」或「English」。

更新应用

更新在「设置 → 关于」的「更新」区域。

  1. 页面顶部显示「App 版本」与「主机版本」。「更新通道」可选「稳定版」或「测试版」。
  2. 点「检查更新」。结果为「已是最新版本」或「有新版本可用」。
  3. 有新版本时点「下载」;也可以点「查看发布说明」先看改了什么,或「跳过此版本」。
  4. 下载完成后显示「已下载,重启后生效」,点「重启并更新」。重启时终端会话会保留。
  5. 想省事可以打开「自动检查更新」和「自动下载更新」,下载完成时会通知你。
  6. 页面下方的「版本历史」列出已发布的版本,可到 GitHub 查看。

更新包会用随应用内置的公钥校验,校验不通过或下载被中断时会丢弃并提示,当前版本不会被替换。以下情况不能在应用内更新:

  • 在浏览器里打开的页面(无法替换应用本体);
  • 后台服务在另一台机器上(更新它不等于更新这里的应用);
  • 这种安装方式需要下载新安装包(页面会给出「下载新安装包」);
  • 更新已下载、但当前安装没有签名时,不会安装,请从发布页手动安装。

macOS 上通过 Homebrew 安装的,也可以执行 brew upgrade --cask armadra;首次打开与确认方法见故障排查。服务器壳的升级与回滚见服务器部署指南。

数据保存在哪里

桌面版没有单独的服务端,数据都在本机:

内容 位置
数据目录(macOS) ~/Library/Application Support/Armadra
数据目录(Windows) %LOCALAPPDATA%\Armadra
数据目录(Linux) $XDG_DATA_HOME/armadra
画布、工作空间、身份与设置索引 数据目录里的 canvas.db(SQLite)
账号与本机偏好 数据目录里的 settings.json 与 worker-settings.json
工作区产物(图片等资源、导出) 项目目录里的 .armadra/
令牌与密钥 系统的密钥后端(如 macOS 钥匙串),不在数据库里

在「设置 → 本机服务」的「数据」里可以看到「数据目录」(点「在访达中打开」直达)、「数据库大小」与「日志保留天数」(7 天 / 30 天 / 90 天 / 永久)。

备份与恢复

  1. 在「设置 → 本机服务」点页头的「立即备份」。备份用一致性方式复制数据库,不需要退出应用;完成后提示「已备份到 …」,文件写在数据目录里,提示里带有完整路径。
  2. 把备份文件另存到别处,例如另一块磁盘或另一台机器。备份只含数据库;settings.json、.armadra/ 目录与你的项目代码需要自行复制。

恢复步骤(先完全退出 Armadra):

  1. 把备份文件复制成数据目录里的 canvas.db;
  2. 同时删除同目录下的 canvas.db-wal 与 canvas.db-shm;
  3. 重新启动。

Armadra 遇到损坏的数据库,或版本比程序更新的数据库时会拒绝启动,不会自动清空或重建;这时按上面的方法恢复备份,或换回能读取它的版本。升级到新版本可能带数据库迁移,迁移只进不退,所以升级前先备份。

迁移到另一台设备

目前没有一键导出或导入。文档里给出的可靠做法是:

  1. 在旧设备上「立即备份」,并复制备份文件、settings.json 以及需要的项目目录(含 .armadra/);
  2. 在新设备上安装相同或更新的版本,启动一次让它生成数据目录,再完全退出;
  3. 按上面的恢复步骤把备份放回新设备的数据目录;
  4. 令牌与密钥存放在系统的密钥后端,不随数据库文件走:在新设备上重新登录各 CLI,并重新配置代码托管凭据;
  5. 工作空间记录指向项目目录,确认这些目录在新设备上存在、路径与记录一致。

只是想在另一台设备上使用同一份数据时,不必迁移:把 Armadra 部署成服务器壳,从多台设备访问同一个工作空间。

Guides

Settings, updates and data

What is in Settings, how to switch language and theme, update the app, and where data lives and how to back it up and restore it.


This page covers how Settings is organised, how to update the app, and where your data is and how to back it up.

Open Settings

Press ⌘, (Ctrl+, on Windows / Linux), or search for “Settings” in the command palette (⌘K). Settings is a large window: section navigation on the left, one full page for the current section on the right; a search box at the top jumps straight to a setting by name. On a phone it fills the screen and the sections collapse into a drop-down at the top.

Each page header shows its scope: “This device” changes only this interface on this device; “Host” changes the machine running Armadra’s core service; “Account” follows your sign-in. When you are connected to someone else’s host, host pages change that machine, and members see only the pages that concern them.

Main groups

Group Section Contents
Frequent Defaults Default agent and permission mode, default session view, theme, backdrop, language
Look & feel General “Expand sidebar on open”, “Startup animation”, “Restore last workspace on open”, “Show system files”
Notifications “Notify when input is needed”, stalled and long-unanswered alerts, sound and volume
Canvas Background, grid and snapping, input device, default colour and thickness, and so on
Terminal Colour scheme, font, size, line height, cursor, “Copy on select”, and so on
Browser Memory and start page of browser nodes (desktop only); see Files, editor and browser
Shortcuts View, rebind, add alternates, or turn all off; see Keyboard shortcuts
Agent Agent CLI Install state, canvas injection and accounts for each CLI
Custom agents Add your own CLI launch shape
Sessions Indexed sessions
Workspace Workspace Settings of the current workspace (including language services and execution host)
Archive Archived workspaces, with “Restore” and “Delete”
Host Local service Connection status, terminal session policy, power and resources, data, crash reports
SSH Remote hosts; see Files, editor and browser
Code hosting Credentials for GitHub and other platforms; see Git and GitHub
Remote access Sharing, pairing, relay accounts; see Self-hosting and remote access
Account Account & devices Sign-in methods, signed-in devices and sessions
Members & sharing Members and workspace sharing on a server shell
About About Version, updates, open source licences

Some pages (“Local service”, “SSH”, “Agent CLI” and others) are visible only to the host’s owner; “Browser” appears only in the desktop app; “Members & sharing” appears only on a server shell.

Language and theme

In “Settings → Defaults”:

  1. “Theme”: “Dark”, “Light” or “System”.
  2. “Background”: pick a background style; on supported systems there is also “Translucent window”.
  3. “Language”: “中文” or “English”.

Update the app

Updates live in the “Updates” area of “Settings → About”.

  1. The top of the page shows “App version” and “Host version”. “Release channel” can be “Stable” or “Beta”.
  2. Click “Check for updates”. The result is “This is the newest release” or “A newer release is available”.
  3. When there is one, click “Download”; you can first “Read the release notes”, or “Skip this version”.
  4. When the download finishes the page shows “Downloaded; restart to apply”; click “Restart and update”. Terminal sessions are kept across the restart.
  5. To save effort turn on “Check automatically” and “Download automatically”; you are notified when a download completes.
  6. “Release history” lower on the page lists published versions, which you can open on GitHub.

Update packages are verified against the public key built into the app; if verification fails or the download is interrupted, the package is discarded with a notice and the current version is not replaced. Updating inside the app is not possible when:

  • the page is open in a web browser (it cannot replace the app itself);
  • the background service runs on another machine (updating it is not updating this app);
  • this kind of installation updates by downloading a new installer (the page offers “Download the new installer”);
  • an update was downloaded but this installation is unsigned: it is not installed, so install it from the release page.

On macOS, a Homebrew install can also run brew upgrade --cask armadra; for first launch and how to confirm it, see Troubleshooting. For upgrading and rolling back a server shell, see the server deployment guide.

Where data lives

The desktop app has no separate server; everything is on your machine:

Content Location
Data folder (macOS) ~/Library/Application Support/Armadra
Data folder (Windows) %LOCALAPPDATA%\Armadra
Data folder (Linux) $XDG_DATA_HOME/armadra
Canvases, workspaces, identity and settings index canvas.db (SQLite) in the data folder
Account and local preferences settings.json and worker-settings.json in the data folder
Workspace artefacts (assets such as images, exports) .armadra/ inside the project folder
Tokens and keys The system’s secret store (for example the macOS Keychain), not the database

Under “Data” in “Settings → Local service” you can see “Data folder” (click “Reveal in Finder” to go straight there), “Database size” and “Log retention” (7 days / 30 days / 90 days / Forever).

Back up and restore

  1. In “Settings → Local service” click “Back up now” in the page header. The backup copies the database consistently, so you do not need to quit the app; when it finishes you see “Copied to …” with the full path, and the file is written in the data folder.
  2. Save the backup file somewhere else, for example another disk or machine. The backup contains the database only; copy settings.json, the .armadra/ folders and your project code yourself.

To restore (quit Armadra completely first):

  1. Copy the backup file to canvas.db in the data folder;
  2. also delete canvas.db-wal and canvas.db-shm in the same folder;
  3. start the app again.

Armadra refuses to start on a damaged database, or on one newer than the program, and never wipes or rebuilds it automatically; in that case restore a backup as above, or go back to a version that can read it. A new version may bring database migrations, and migrations only go forward, so back up before upgrading.

Move to another device

There is no one-click export or import. The dependable way described in the docs is:

  1. On the old device use “Back up now”, then copy the backup file, settings.json and the project folders you need (including .armadra/);
  2. install the same or a newer version on the new device, start it once so it creates its data folder, then quit completely;
  3. put the backup back into the new device’s data folder using the restore steps above;
  4. tokens and keys live in the system’s secret store and do not travel with the database file: sign in to each CLI again on the new device, and set up code hosting credentials again;
  5. workspace records point to project folders, so make sure those folders exist on the new device at the recorded paths.

If you only want to use the same data from another device, no migration is needed: deploy Armadra as a server shell and open the same workspace from several devices.

在 GitHub 上编辑本页 Edit this page on GitHub