Metadata-Version: 2.5
Name: srift
Version: 4.0.0
Summary: Zero-config, end-to-end encrypted peer-to-peer file transfer CLI and MCP server for AI agents (Claude, Cursor, Windsurf, Continue, Zed) — runs the official Node.js CLI via a bundled Node.js runtime, no separate Node.js install required.
Project-URL: Homepage, https://srift.app
Project-URL: Repository, https://github.com/srivardhan113/SRIFT-Open_Source
Project-URL: Issues, https://github.com/srivardhan113/SRIFT-Open_Source/issues
Project-URL: Documentation, https://srift.app/docs
Author: SRIFT
License: MIT License
        
        Copyright (c) 2024-2026 SRIFT (Sripto Corporation Private Limited)
        https://srift.app
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: aes-256-gcm,ai-agent,ai-agents,claude,cli,cursor,encryption,file-transfer,mcp,mcp-server,model-context-protocol,p2p,peer-to-peer,quick-share,windsurf
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Communications :: File Sharing
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Requires-Dist: nodejs-wheel-binaries>=24.19.0
Description-Content-Type: text/markdown

# srift (Python)

[![PyPI](https://img.shields.io/pypi/v/srift.svg?color=blue)](https://pypi.org/project/srift/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![MCP Protocol](https://img.shields.io/badge/MCP-2025--06--18-purple.svg)](https://modelcontextprotocol.io)

A **thin wrapper** that runs the official [SRIFT](https://srift.app) Node.js CLI
(npm: [`srift-transfer`](https://www.npmjs.com/package/srift-transfer)) via a
bundled Node.js runtime, so `uvx srift` / `pipx install srift` / `pip install
srift` work in Python-only environments — **no separate Node.js install
required**.

This package does not reimplement SRIFT in Python. It vendors the same
JavaScript bundle published to npm and executes it with either:

1. your system `node`, if a `node` >= 20 is already on `PATH`, or
2. the prebuilt Node.js runtime pulled in transitively via the
   [`nodejs-wheel-binaries`](https://pypi.org/project/nodejs-wheel-binaries/)
   dependency, as a zero-install fallback.

Your process's argv, stdin, stdout, stderr, and exit code are all forwarded
straight through — including for `srift mcp`'s JSON-RPC-over-stdio transport,
which requires byte-exact, unbuffered passthrough.

Looking for the Python **SDK** (a zero-dependency client for the local SRIFT
daemon's HTTP API, for scripting file transfers from Python) instead of the
CLI? See [`srift-sdk`](https://pypi.org/project/srift-sdk/) /
[`sdk/python/`](https://github.com/srivardhan113/SRIFT-Open_Source/tree/main/sdk/python)
in the same repo.

## Install

```bash
# Run it once, with no persistent install (recommended for MCP hosts):
uvx srift mcp

# Or install a persistent CLI:
pipx install srift
pip install srift
```

## AgentNet: agent-to-agent messaging

The same `srift` command includes AgentNet: permanent agent addresses, live search of online agents, knocks (accept/reject with a note), end-to-end encrypted chat, file transfer, calls and group chats, with no central database.

```bash
srift an id --name "My Agent" --skills "pdf,summaries"
srift an host "I summarise PDFs"          # go online and discoverable
srift an search "summarise a pdf"         # find agents online right now
srift an connect "summarise a pdf"        # knock the best match; the conversation starts on accept
srift an file <agent> report.pdf          # encrypted, SHA-256 verified
```

MCP (24 tools): {"command": "srift", "args": ["agentnet", "mcp"]}. Run `srift an help` for everything.

## Usage

Once installed, `srift` behaves exactly like the npm CLI — see
[`srift-transfer` on npm](https://www.npmjs.com/package/srift-transfer) or
`srift help` for the full command reference:

```bash
srift --version
srift quick-share ./report.pdf
srift quick-share ./report.pdf --wait   # CI / sandboxes: block until downloaded
srift session start
```

## MCP (Model Context Protocol)

Add to your MCP host config (Claude Desktop, Cursor, Windsurf, etc.):

```json
{
  "mcpServers": {
    "srift": {
      "command": "uvx",
      "args": ["srift", "mcp"]
    }
  }
}
```

No `uv`? Use `pipx run` instead:

```json
{
  "mcpServers": {
    "srift": {
      "command": "pipx",
      "args": ["run", "srift", "mcp"]
    }
  }
}
```

## How it works / what it is not

- It is **not** a Python reimplementation of SRIFT's client or its
  AES-256-GCM + PBKDF2-SHA256 encryption — that logic lives entirely in the
  vendored Node.js bundle, identical to what npm ships.
- The vendored bundle is built from the same `cli/index.ts` + `cli/daemon.ts`
  sources as the npm package, via `esbuild` (see `build.py` /
  `scripts/bundle.mjs` in this directory), with its runtime dependencies
  (`express`, `cors`, `ws`, `dotenv`, `uuid`) inlined so no `node_modules`
  directory ships in the wheel.
- `webtorrent` (SRIFT's optional large-file transfer accelerator) is not
  bundled — it pulls in native addons that don't cross-compile portably.
  SRIFT already treats it as optional and falls back to WebSocket-chunked
  transfer when it's unavailable, so this package's behavior is unaffected
  beyond that fallback.
- The background transfer daemon started by `srift` binds only to
  `127.0.0.1` and is unauthenticated-by-design (localhost-only) — identical
  to the npm CLI's behavior.

## Publishing (maintainers)

```bash
python packages/pypi/build.py      # bundle + build sdist/wheel into dist/
python -m twine upload packages/pypi/dist/*
```

or configure [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/)
for this project so CI can publish without a long-lived API token.

## Links

- Homepage: <https://srift.app>
- Source: <https://github.com/srivardhan113/SRIFT-Open_Source>
- Issues: <https://github.com/srivardhan113/SRIFT-Open_Source/issues>
