Fridica
Fridica answers Slack threads as you and delegates work to Claude Code or Codex on your machines. One daemon represents one Slack account. Its local parent agent decides when to reply and what to delegate. Each thread keeps its own conversation, decisions and workers, so a follow-up can continue a job on the same machine.
Set up tokens on macOS or Linux
Install Fridica in a Python 3.11+ virtual environment with python -m pip install fridica. As the OS user who will run the daemon, store the Slack tokens and any worker tokens you already have. The same commands use Keychain on macOS and Secret Service on Linux. On Linux, run them in a user D-Bus session with an unlocked keyring. Each command prompts for the token with input hidden.
| Credential |
Store in the OS keyring |
Environment variable |
| Slack app |
fridica secret set slack/app-token |
SLACK_APP_TOKEN |
| Slack user |
fridica secret set slack/user-token |
SLACK_USER_TOKEN |
| GitHub daemon reader (optional) |
fridica secret set github/read-prs |
Uses existing gh credentials when no reader keyring entry is configured |
| GitHub worker MCP |
fridica secret set github/mcp-token |
GH_TOKEN or GITHUB_TOKEN |
| alphaXiv MCP |
fridica secret set alphaxiv/token |
ALPHAXIV_TOKEN |
| NASA ADS (SciX) MCP |
fridica secret set ads/token |
ADS_TOKEN |
| Overleaf Git mode |
fridica secret set overleaf/git-token |
OVERLEAF_GIT_TOKEN |
Native Overleaf comments and pending Track Changes use one account login:
fridica overleaf-auth login --expected-email alice@example.com
Enter passwords/MFA yourself in the isolated Chrome/Chromium window. Later,
fridica overleaf-auth login reuses the saved account and valid session from the
same OS credential store. A browser is needed only for first sign-in or confirmed
expiry during this owner command; --browser optionally selects its executable.
Login needs no project, channel, worker UUID or model client and does not reload
or start a listener.
Native tools are bundled Rust through fridica-agent and Interleaf. Install a
matching Fridica build on registered workers; no Node, npm, Python adapter,
worker browser or Git token is needed for native comments and Track Changes.
Fridica attaches native tools only to admitted eligible jobs, retaining workspace,
channel, task-project and tool-approval guards. Supply the editor URL in the
requesting Slack thread to bind a project for writes. Unbound tasks can discover
and read projects within their grant. Existing logins retain seven operations.
Owners can enable the full native tool set with fridica overleaf-auth grant --all.
native_compile uses Overleaf's cloud compiler. Only native_compile_local
requires TeX Live and latexmk on the worker. Separate
Git mode keeps its existing token-based workflow.
Existing account/project/channel/recipient restrictions remain effective. See
installation and
native operations. These instructions describe
this source version; they do not imply a published release or runtime switch.
Slack automatically checks the standard environment variables first and then their keyring entries. You can delete the four standard Slack token assignments from an existing [slack] table. Keep any overrides that point to custom names.
To use an environment variable in Bash or Zsh, export it before running fridica init and supply it to the daemon at startup. For example, this prompts for an ADS token without putting its value in shell history:
export ADS_TOKEN="$(python3 -c 'import getpass; print(getpass.getpass("ADS token: "))')"
Initialize Fridica
fridica init
On first setup, init enables each MCP with a nonblank environment token or a matching keyring entry. An existing local gh login also enables GitHub MCP. Discovery runs on the daemon machine and leaves workspace permissions intact. For credentials available only on an SSH worker, enable the corresponding MCP in config.toml. After configuring your workspaces, run fridica doctor to validate credentials on eligible workers. For Overleaf Git access, OVERLEAF_PROJECT_ID lets doctor check the Git token against one project. It is not a default target for native tools; native comments use the separate account login. With a native account scope, doctor checks installed tools without a Git token or session forwarding; live account validation waits for an admitted task.
For an isolated command-line installation, use pipx install fridica in place of the pip command. The wheel includes the native CLI and its credential helper. To install the version in this checkout, run python -m pip install . from the repository root with Rust 1.91 or newer.
fridica init creates four files under ~/.config/fridica/:
| File |
What to do with it |
config.toml |
Set the Slack identity, channels, backends and workspaces. |
manifest.yaml |
Import it when creating your Slack app. |
contract.md |
Customize how Fridica participates, replies and delegates. |
secrets.yml |
Use this optional mapping if your deployment uses Summon. |
For an existing installation with legacy state, stop the daemon, back up its configuration and database, and preview the migration with fridica migrate --dry-run before running fridica migrate.
Prepare the machines
- Daemon: Install and sign in to the parent backend on this machine. The default is Claude Code. To use Codex, set
backend = "codex" under [parent].
- Workers: Install and sign in to every backend listed for that machine. Fridica's helpers use
/usr/bin/python3. On SSH machines, the account must be reachable without a prompt, and the backend commands must be on its noninteractive PATH. Install Fridica there too when using the bundled GitHub, alphaXiv, ADS or Overleaf tools.
Backend installation guides: Claude Code and Codex CLI.
Linux worker sandbox
Install bubblewrap on every Linux worker host, including Codex-only hosts. Install socat as well if the host runs Claude. Use sudo apt install bubblewrap socat on Debian or Ubuntu, or sudo dnf install bubblewrap socat on Fedora.
Run Fridica’s sandbox check on the worker host as the worker user. Success produces no output and exits with status 0.
bwrap --unshare-user --unshare-net --ro-bind / / --dev /dev --proc /proc --die-with-parent -- /bin/true
If the check fails with a UID map or loopback permission error, run these on the affected host:
command -v bwrap
sysctl kernel.apparmor_restrict_unprivileged_userns
If the path is /usr/bin/bwrap and the setting is 1, check the AppArmor profile for that executable. If the profile is missing, create /etc/apparmor.d/bwrap with the following contents. Preserve any existing site-specific rules.
abi <abi/4.0>,
include <tunables/global>
profile bwrap /usr/bin/bwrap flags=(unconfined) {
userns,
include if exists <local/bwrap>
}
Run sudo systemctl reload apparmor and repeat the sandbox check as the worker user. AppArmor setup for bubblewrap
Configure Slack
-
In Slack app management, choose Create New App → From an app manifest, select your workspace and import the generated manifest.yaml. Use one app per owner. The manifest enables Socket Mode and subscribes to messages in public channels.
-
Under Basic Information → App-Level Tokens, generate an xapp- token with connections:write. For private channels, also add the groups:read and groups:history user token scopes and the message.groups user event before installing the app.
-
Under OAuth & Permissions, install the app to your workspace as the person Fridica will represent. Copy the xoxp- User OAuth Token. That account must belong to each channel you configure.
-
As the OS user who will run the daemon, run fridica doctor to see which tokens are available and whether Slack accepts them. You can run it before fridica init. The starter configuration automatically uses existing environment or keyring tokens. Store only missing tokens, then select your channels:
fridica secret set slack/app-token
fridica secret set slack/user-token
fridica configure --detect
Detection reads your Slack identity and joined channels. For unattended setup, repeat --channel-name NAME with --detect. By default, any member of a configured channel can request work on your machines. Set [slack].delegate_channels to the channel IDs where you want to allow delegation. Fridica supports public and private channels. Shipped Slack manifest
If your installed CLI lacks the secret command, set SLACK_APP_TOKEN and SLACK_USER_TOKEN in your environment before running fridica configure --detect.
The generated configuration uses macOS Keychain or Linux Secret Service. On Linux, the daemon needs a user D-Bus session with an unlocked keyring. When using environment variables, supply them to the daemon process as well. They take precedence over stored entries. To rotate a stored token, repeat its secret set command and restart the daemon.
fridica secret set slack/app-token stores the token as a generic password in macOS Keychain or as a secret in the default Linux Secret Service collection (such as GNOME Keyring). Both use the current OS username as the account, fridica:fridica/slack/app-token as the service, and the token as the password. The entry has no website. Running secret set on an older Fridica entry moves it to this format.
fridica secret get slack/app-token writes the token to stdout. Both this command and the fridica-secret provider check the corresponding environment variable first for Slack credentials (SLACK_APP_TOKEN or SLACK_USER_TOKEN). For a custom token, use fridica secret get example/api-token --env EXAMPLE_API_TOKEN. If the variable is unset, Fridica reads the stored password.
Copy stored credentials to another machine
macOS and Linux can each send or receive credentials. Install a version of Fridica with secret copy on both machines. The destination must accept SSH connections. The sender checks the remote PATH, then common user, Python environment and system install locations, including ~/pyenv/bin/fridica. For a custom location, pass an absolute path from the source machine, for example fridica secret copy --remote-bin /opt/fridica/bin/fridica user@linux-host. Each Linux account involved needs a user D-Bus session with an unlocked Secret Service keyring. When sending to a Mac, enable Remote Login and make sure the SSH account can write to its unlocked Keychain.
Set up the Linux keyring
If the Linux machine needs a Secret Service provider, run the command for its distribution on that machine.
| Distribution |
Install command |
| Red Hat Enterprise Linux 9 or 10 |
sudo dnf install gnome-keyring |
| Ubuntu |
sudo apt update && sudo apt install gnome-keyring dbus-user-session |
If Fridica is on the remote PATH, you can run this optional check from the source machine using the same SSH account you will use for the transfer.
ssh user@linux-host 'fridica secret copy --help && fridica secret list'
The first command verifies that SSH can find a compatible Fridica build. The second lists stored names and can succeed with an empty list on a new machine. If it reports a D-Bus error, check that the SSH account has an active user D-Bus session. If it reports a locked keyring, unlock that account's default keyring. An SSH key login can leave it locked on a headless server.
Transfer credentials
To copy from Linux to a Mac, run this command on Linux.
fridica secret copy user@mac-host
To send to Linux, run the same command from either macOS or Linux with the Linux destination.
fridica secret copy user@linux-host
With just a destination, Fridica copies all credentials it discovers from standard token environment variables and the source keyring. For each name, a nonempty exported token takes precedence over its keyring value. For GitHub MCP, the order is GH_TOKEN, then GITHUB_TOKEN, then the keyring. Custom keyring entries are included. If the source keyring is unavailable and exported tokens are present, Fridica reports the keyring issue and continues with the available tokens.
To select a subset, pass exact names or quoted patterns, for example fridica secret copy user@linux-host 'slack/*' ads/token. A star matches any sequence of characters in the name, including slashes. Every pattern must match at least one available name. Use --from-env to restrict the copy to exported tokens.
The command sends the selected values over SSH standard input. It replaces matching entries in the destination account's keyring and lists each copied credential name after the transfer succeeds. If a keyring write fails partway through, earlier writes may have succeeded. You can rerun the same command. When moving the daemon, run fridica doctor on the destination to check its credentials. If the destination only runs SSH workers, select just the worker credentials you need.
Configure machines
Edit the existing tables in config.toml. Choose only the backends installed on each machine and point each workspace at an existing directory. The starter lists both Claude and Codex and uses ~/project as a placeholder. For example, a local Codex installation with one checkout can use:
[parent]
backend = "codex"
[machines.local]
transport = "local"
backends = ["codex"]
[machines.local.workspaces]
project = { path = "~/repos/my-project", subfolders = false }
To add an SSH machine, give it a host alias and at least one workspace. Tags let the parent place a request such as “run this on a CUDA machine.”
[machines.gpu]
transport = "ssh"
host = "gpu-box"
backends = ["codex"]
tags = ["cuda"]
resources = { gpus = [0] }
max_jobs = 1
[machines.gpu.workspaces]
experiments = "/data/experiments"
The generated template documents machine limits, load-aware placement, GPU confinement and policy overrides. Use local or SSH transport for jobs. Slurm entries can be configured, but job execution is unimplemented. Configuration template
Workspaces and permissions