Install on Linux or macOS
On Linux (x86-64 or ARM64) or a Mac with Apple silicon, in a terminal:
curl -fsSL https://flythrough.work/gateway/install.sh | sh
Read the script first if you like. It is short, and it does nothing as root.
- Puts the program in
~/.local/share/flythrough-gatewayand links it from~/.local/bin. - Starts it for your user only, on
127.0.0.1:7878, so only this computer can reach it: a systemd user service on Linux, a launchd agent on macOS. - Answers only the sites you allow. flythrough.work is allowed from the start; any other site is asked about first, and you answer yes or no.
- 4 MB to download on Linux, 28 MB installed; 10 MB on macOS, 78 MB installed
- Needs nothing else on your system
- Intel Macs have no build yet
Install on Windows
On Windows 10 or 11, in PowerShell:
irm https://flythrough.work/gateway/install.ps1 | iex
Read the script first if you like. It needs no administrator rights.
- Puts the program in
%LOCALAPPDATA%\Programs\flythrough-gatewayand adds that folder to your userPATH. - Starts it when you sign in, with a Task Scheduler entry for your user only, on
127.0.0.1:7878. - Windows may warn that the program is from an unknown publisher, as it is not code-signed yet.
This is the x86-64 build. Windows on ARM has no build of its own yet, and the installer stops there.
Install on NixOS
The release is a flake that fetches the Linux build (x86-64 or ARM64) by its hash. Add it to your system's flake:
{
inputs.flythrough-gateway.url = "https://flythrough.work/gateway/flythrough-gateway-nix.tar.gz";
inputs.flythrough-gateway.inputs.nixpkgs.follows = "nixpkgs";
outputs = { nixpkgs, flythrough-gateway, ... }: {
nixosConfigurations.my-machine = nixpkgs.lib.nixosSystem {
modules = [
flythrough-gateway.nixosModules.default
{ services.flythrough-gateway.enable = true; }
];
};
};
}
- It runs as a service of each user who signs in, on
127.0.0.1:7878. The gateway startsclaudewith that user's login, so it is not a system service. - Give it Claude Code with
services.flythrough-gateway.extraPackages = [ pkgs.claude-code ];, which is unfree, so it needsnixpkgs.config.allowUnfree. - Your
flake.lockpins the release you got.nix flake update flythrough-gatewaytakes the latest, andhttps://flythrough.work/gateway/VERSION/flythrough-gateway-nix.tar.gznames one.
To try it first, without installing:
nix run https://flythrough.work/gateway/flythrough-gateway-nix.tar.gz -- serve
Check it
On any system:
flythrough-gateway status
Then open the review. It finds the gateway on its own.
Download by hand
flythrough-gateway-x86_64-linux.tar.xz flythrough-gateway-aarch64-linux.tar.xz flythrough-gateway-aarch64-macos.tar.xz flythrough-gateway-x86_64-windows.zip
Check them against SHA256SUMS: sha256sum -c SHA256SUMS on Linux, shasum -a 256 -c SHA256SUMS on macOS, Get-FileHash FILE on Windows. The program is not signed or notarized, so macOS blocks one downloaded in a browser: run xattr -d com.apple.quarantine on it first. The install script does not need that.
Remove it
On Linux:
systemctl --user disable --now flythrough-gateway
rm -r ~/.local/share/flythrough-gateway ~/.local/bin/flythrough-gateway
rm ~/.config/systemd/user/flythrough-gateway.service
On macOS:
launchctl bootout gui/$(id -u)/work.flythrough.gateway
rm -r ~/.local/share/flythrough-gateway ~/.local/bin/flythrough-gateway
rm ~/Library/LaunchAgents/work.flythrough.gateway.plist
On Windows, in PowerShell:
schtasks /Delete /TN work.flythrough.gateway /F
Remove-Item -Recurse $env:LOCALAPPDATA\Programs\flythrough-gateway
On NixOS, take the module and the input out of your flake.
Then take that folder out of your user PATH in Settings. Your history and settings are kept apart from the program (on Linux and macOS in ~/.local/state and ~/.config, on Windows in %LOCALAPPDATA%\flythrough-gateway and %APPDATA%\flythrough-gateway); delete them too if you want them gone.
Configuration and features
The gateway answers only the sites you allow, and each site only with the backends and powers you give it. Everything it does is written to a history you can read.
What it does
- Sites. A site is allowed by its origin (
https://flythrough.work) and given grants: a backend and a scope. An unknown site that asks is put to you, in the terminal or in the settings page, and you answer yes or no. A site can be blocked. - Backends. The
claude,codexandagycommands, and servers you run: Ollama ("protocol": "ollama") or an OpenAI-compatible one ("protocol": "openai"). A server's key is never written in the file: it is read from an environment variable, a file or a command ("credential": {"env": "NAME"},{"file": "/path"}or{"command": "pass show openai"}). - Scopes. A scope is a ceiling on what a backend may do: rights to
Read,Write,RunandWeb, with places for the first two ({"tool": "Read", "in": ["~/notes"]};workdiris the site's own folder). A backend that could do more than a scope's rights cannot be granted it. An empty scope gives no power. - Screening. A scope can name a policy, which screens each question before a model sees it. Screeners are patterns or a model; a rule turns what they find into
allow,warn,askorblock. A grant's policy can only add rules. A scope that gives power must name a policy;openscreens nothing. - History. Every request and decision is recorded in
events.jsonlin the state directory, with the conversations in full. Retention rules can strip the text, summarize or drop each kind of event after some days. - Discovery. It looks for the models on this machine and offers to add them. It asks nothing of a model while looking, and never sends a credential over plain http to another machine.
The file
It is read from ~/.config/flythrough-gateway/config.json (or --config FILE), and its keys are checked strictly: an unknown key is an error, not ignored. Every key but version is optional.
With no file, the gateway uses a built-in one: flythrough.work may use claude with every tool anywhere. Write a file to give it less.
version:1.port: the loopback port, 7878 if not said.backends,screeners,policies,scopes,sites: as above.unlistedSites:"ask"(the default) puts a site the file does not list to you, in a dialog, the browser or the terminal;"refuse"refuses it, so only your own commands add a site.limits:askSeconds(120),pendingSeconds(900),maxPending(5),maxBodyBytes(4 MiB),screenCharacters(32000),screenSeconds(15),discoverySeconds(5),logLines(50). The defaults are in brackets.retention,discovery: rules for the history, and changes to what discovery looks for.locked:truemeans nothing the gateway does changes the file, whoever asks; only you editing it does. A file that is a symbolic link, such as one kept by Nix, counts as locked.
A file that allows the local Ollama for flythrough.work and nothing else:
{
"version": 1,
"backends": [
{ "label": "ollama", "protocol": "ollama", "url": "http://127.0.0.1:11434" }
],
"policies": { "open": {} },
"scopes": { "strict": {} },
"sites": [
{
"origin": "https://flythrough.work",
"grants": [ { "backend": "ollama", "scope": "strict" } ]
}
],
"unlistedSites": "refuse",
"locked": true
}
The commands below that change the configuration save it to this file, unless you say --run, which changes only this run.
Commands
serve: run the gateway (the installers do this for you).status,permissions: how it is, and who may use what and what each has used.settings: a page in your browser to edit scopes and sites, served until you stop it.allow SITE --backend NAME [--scope NAME] [--with JSON],revoke SITE,block SITE: change who may use what.--runmakes a change for this run only.scope set NAME --right JSON --policy NAME,scope remove NAME: edit a scope.discover [--add [NAME]]: look for the models on this machine, and add them.check FILE,reload,dump: preview what a file would change, read the configuration file again, and print the configuration as it stands.log [--site SITE] [--limit N] [--without-text],explain REF,compact: read the history (--without-textleaves out what pages said, for sharing), say why a request came to what it did, and apply the retention rules now.screen-test [TEXT],answer REF yes|no: try the screening on some text, and answer a question a policy put.
Your history and settings are in ~/.local/state/flythrough-gateway and ~/.config/flythrough-gateway, apart from the program; on Windows in %LOCALAPPDATA%\flythrough-gateway and %APPDATA%\flythrough-gateway. The history holds your conversations in full, so do not share the file as it is.