FAQ

What is Hain?

Hain is a peer-to-peer file sync tool that runs from your terminal. Create a space, share a key with a collaborator, and files sync directly between your machines. No accounts, no cloud storage, no middleman.

Does it work offline?

Yes. Your files are always stored locally and available offline. Sync happens when peers are online and connected. When you go offline, you keep working. When you reconnect, changes sync automatically.

Who can see my files?

Only peers who have the share key. Hain connects your machines directly using encrypted peer-to-peer networking. There are no central servers involved.

Does Hain collect any data?

No. Hain has no analytics, no telemetry, no tracking, and no cloud storage. Your files stay on your machines and travel directly between peers. There is no server that sees your data, your usage, or your identity.

What is a share key?

A share key is a 64-character hex string that identifies a space on the P2P network. Anyone with the key can join the space and sync files. Treat it like a password — share it through a secure channel.

Can I use it with the desktop app later?

Yes. The CLI, TUI, and upcoming desktop app all share the same vault format and core. A vault created with the CLI works with the desktop app and vice versa.

What about NAT and firewalls?

Hain uses a distributed network to find and connect peers. It supports NAT hole-punching for direct connections, so most home and office networks work without any configuration.

If you’re behind a strict corporate firewall that blocks UDP traffic, direct connections may fail. In those cases, Hain can relay data through other peers on the network, though this adds latency.

What platforms are supported?

PlatformArchitectureStatus
Linuxx64Supported
Linuxarm64Supported
macOSarm64 (Apple Silicon)Supported
macOSx64 (Intel)Supported

Windows is not currently supported.

Is the source code available?

Hain is distributed as compiled V8 bytecode. The source code is not publicly available. The distributed tarballs include checksum verification for integrity.

How do I report a bug?

File an issue on the GitHub issue tracker.

How do I update?

Re-run the install script to download the latest version:

curl -fsSL https://raw.githubusercontent.com/hainlabs/hain-releases/main/install.sh | bash

Is curl | bash safe?

The install script downloads over HTTPS and verifies SHA256 checksums before extracting. You can inspect the script before running it:

curl -fsSL https://raw.githubusercontent.com/hainlabs/hain-releases/main/install.sh | less

What happens to my files if I delete a space?

Deleting a space (context delete) removes it from your vault’s context list, but the files remain on disk in the context’s storage directory. It does not delete files from other peers.

Can multiple people edit the same file?

Yes. Hain supports concurrent writes from multiple peers. Conflicting edits are resolved automatically through a deterministic ordering process. For most file-based workflows (documents, code, assets), this works transparently — the latest write wins at the file level.

How many peers can share a space?

There is no hard limit. Performance depends on the number of files, the frequency of changes, and network conditions. Hain is designed for small-to-medium teams (2–20 peers).