Overview
The FOKS agent is a persistent background process that:- Stores device private keys in memory
- Maintains an authenticated session with the server
- Performs background key rotation when devices or users are revoked
- Serves the local CLI and
git-remote-foksover a Unix socket (or Windows named pipe)
ssh-agent.
Starting the agent
foks ctl start registers the agent with your system’s process manager (launchd on macOS, systemd on Linux, the Windows Registry on Windows) so it starts automatically at login.
ctl commands
Running the agent directly
For debugging or testing, you can run the agent in the foreground:| Flag | Description |
|---|---|
--socket <path> | Override the Unix socket path |
--home <path> | Override the FOKS home directory |
How the CLI talks to the agent
Allfoks subcommands that need network access (git, kv, team, etc.) connect to the running agent over the local socket, send an RPC, and print the result. The agent handles the authenticated connection to the server.
The socket path can be found with:
Agent startup options
The agent automatically starts the correct services based on what the CLI needs. For example,foks kv put requires a logged-in user with unlocked credentials; the agent will prompt for a passphrase or YubiKey touch if needed.