This release is a pre-release and may not be stable for production use.
phiward
phiward keeps protected data (for example patient data) and your credentials out of what an AI coding agent sends to its model provider. The agent's tools send their output to the provider, and that output can hold file contents, sample identifiers or file names. With phiward, the agent works on protected data only through a gateway that masks names and identifiers.
Why it exists, and how it differs from sandboxes, containers and PII tools: docs/why.md.
Start here: docs/quickstart.md. Three steps: install phiward, set it up (with Claude Code's help or by hand), and check it. In short:
uv tool install --python-preference only-managed phiward==0.2.0b1
then in Claude Code, /plugin marketplace add msk-access/phiward#v0.2.0b1,
/plugin install phiward@phiward and /phiward:setup.
Status: v0.2.0b1, a beta. Tested with the real Claude Code on macOS, in the desktop app and in the terminal, and against a real HPC cluster. On Linux, only the test suite has run (no real Claude Code session yet). Read docs/threat-model.md before you rely on it for real data.
It is a Python package with no dependencies. It makes no network connection of its own and has no telemetry. It needs Python 3.9 or newer, macOS or Linux, and Claude Code 2.1.295 or newer.
How it works
The AI agent's tools What reaches the model provider
(Read, Grep, Bash, MCP, ...)
|
| not protected (the project, your prompts)
+----------------------------------------> as before, unchanged
|
| a protected folder or a credential?
v
phiward's hook + the sandbox ---- refused -------> only the refusal and its reason
|
| work on protected data
v
The gateway (phiward run / copy)
a broker outside the agent runs the command
in a kernel sandbox, then masks the output ----> the command's output, names and
identifiers masked (so print
counts, not records)
- Two modes. Mode A, the default: a normal Claude Code session (the desktop app, an IDE, a
terminal), wired by
phiward install claude. Claude Code's own sandbox confines Bash; the file tools are refused protected data and credentials by phiward's hook and by permission rules. Mode B, the stronger one:phiward launchruns the whole agent tool in phiward's kernel profile (macOS Seatbelt, Linux bubblewrap). Terminal only for now. See docs/modes.md. - The gateway. The agent works on protected data only through
phiward run -- CMDandphiward copy. The broker runs them outside the agent, as you, and masks the output: protected paths, file names and identifiers become placeholders. HPC goes throughphiward run --remoteandphiward copy, over your own shared SSH connection (docs/hpc.md). - Git hooks refuse commits that hold protected names or identifiers.
What it does not do
- Masking hides names and identifiers, not other content: through the gateway, print counts and summaries, not records.
- Out of the box, masking inside file contents covers only sequence and alignment file names,
read names and loci (the
genomicspack). Subject and sample identifiers inside files are masked only with a pack that has them (themskexample), your own[sanitize] patternsornames_from. The gateway masks entry names under the protected roots (4 characters or longer). Planned for 0.2.0b2: setup asks, doctor warns, and the output says what was masked (#3, #5). - In Mode A, the file tools are refused inside Claude Code, not by the kernel; hooks and MCP servers that are not wrapped run with your rights; credentials that are not files (the macOS Keychain, some Kerberos caches, tokens in your environment) are not hidden by a file list.
- The network is open by default: an agent can send what it can read. In Mode A,
[network] limit(suggested byphiward setup) limits shell commands to listed hosts, sogit pushandpip installfail until you list their hosts; WebFetch, MCP servers and Mode B stay open. - Protection follows the path: protected data moved out of a protected folder is not protected.
docs/threat-model.md lists every limit.
Documentation
Use phiward
- Quick start: install, set up, check (start here).
- Daily use: working with the agent on protected data; what to do when a command is refused.
- HPC, plugins,
agents with nobody watching, Mode B:
phiward launch. - Setup in detail, configuration, glossary.
Decide whether phiward is enough for your data
- Why phiward: what exists already, and the gap it fills.
- The two modes: what each one confines.
- The threat model: what is protected, what is not, every known limit (a summary for reviewers comes first).
Change phiward
- CONTRIBUTING.md and the developer guide: set up, run the tests, how a decision is made.
- AGENTS.md: the rules for AI agents that work on phiward's code.
In a project that uses phiward, phiward init adds the rules for agents to that project's
AGENTS.md (the text is in src/phiward/data/agents-section.md),
and skills/phiward/SKILL.md is the skill.
Licence
Metadata
Release files for phiward 0.2.0b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phiward-0.2.0b1.tar.gz | 670.7 kB | With provenance | Details for phiward-0.2.0b1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phiward-0.2.0b1-py3-none-any.whl | Python 3 | none | any | Details for phiward-0.2.0b1-py3-none-any.whl |
Total release size: 1.0 MB
Release files / phiward-0.2.0b1.tar.gz
| Download URL | phiward-0.2.0b1.tar.gz |
|---|---|
| Size | 670.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
043cf96e5b09f15fb28c09b1943f3d988c853ed950159cf3c87b0ca02432ec45
|
|
BLAKE2b-256 checksum How to use checksums |
351fa9749eb84c0b496c94c01be240101d438b8c360349e623246b0a2a9a2c6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / phiward-0.2.0b1-py3-none-any.whl
| Download URL | phiward-0.2.0b1-py3-none-any.whl |
|---|---|
| Size | 338.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18accb2a7ea80b8472791f6f13aa78d3a8aaeb306d93bbd7cbcc9e0de2b99310
|
|
BLAKE2b-256 checksum How to use checksums |
a9484a267a74f0c0cfd07d66f1352c17bc0f348a68966e7c7736cd83501a68f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for phiward 0.2.0b1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for phiward-0.2.0b1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.