MCPcopy Index your code
hub / github.com/Contextualist/acp

github.com/Contextualist/acp @v0.3.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.1 ↗ · + Follow
193 symbols 447 edges 27 files 35 documented · 18% updated 20mo agov0.3.1 · 2024-11-01★ 2392 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

acp

demo.gif

Highlights (aka "Why making another file-transfer tool?"):

  • Designed for personal use; no need to copy-paste a token / code for each transfer
  • Rendezvous service runs distributively on serverless edge function, a robust solution with low latency worldwide. (How does this work?)

Other features:

  • End-to-end encryption (ChaCha20-Poly1305)
  • P2P connection: LAN or WAN, with NAT transversal
  • Compression (gzip)
  • Cross platform: Linux, macOS, Windows
  • Support transfering multiple files and directories
  • Optional Tailscale integration

See also comparison table with similar tools.

Get started

Linux, macOS

On any of your machine, run

curl -fsS https://acp.deno.dev/get | sh

It sets up the current machine by downloading an executable and generating an identity. By default the install path is /usr/local/bin; you can change it by curl -fsS 'https://acp.deno.dev/get?dir=/path/to/bin' | sh At the end, it prints out the command for setting up your other machines. You can run acp --setup any time you want to see the command.

Windows

Currently there is no installation script for PowerShell (PR welcomes :) You can download the released executable and put it on your Path. Then run acp --setup to generate an identity.

Usage

# sender
acp path/to/files

# receiver, to $(pwd)
acp
# or receive to/as specified target
acp -d path/to/target

You can run the sender and receiver in arbitrary order. Whenever both sides are up and running, they will attempt to establish a P2P connection. If you see messages such as rendezvous timeout, at least one side is behind a firewall or a strict NAT that prohibits P2P connection.

For advanced configuration and self-hosting, check out the docs here.

Similar projects

trzsz scp acp pcp croc
can share files to other people /

receiver needs to enter a token | | | | O | O | | LAN | O | O | O | O | O | | WAN (local ↔︎ remote) | O | O | O | P | O | | WAN (remote ↔︎ remote) | | P | O | P | O | | relay | | | P | P | O | | p2p | | | O | O | O | | distributive | | | O | O | |

O: supported; P: partial support or limited usablity; (void): not supported or not relevant

Don't judge a tool based on its apparent set of features. This table only lists a few features, intending to differentiate the target scenarios of these tools.

Acknowledgement

Apart from the dependencies listed in go.mod, this project is also built upon

  • Deno Deploy exposes low-level connection infomation and provides a fantastic BroadcastChannel API that makes "serverless" TCP hole-punching possible
  • mholt/archiver: tar/untar implementation
  • libp2p/go-reuseport: address reuse for TCP hole-punching
  • egoist/bina: installation script
  • Tailscale, as one of the connection option, provides a painstaking implementation of NAT traversal and a distributive relay service

Disclaimer

This project is not associated with Deno Land Inc. or Tailscale Inc.

Extension points exported contracts — how you extend this code

Dialer (Interface)
A Dialer establishes a stream for sending / receiving files, with the help of a rendezvous service. After implementing [4 …
pkg/stream/dialer.go
Logger (Interface)
Logger interface accepted by pnet for internal logging [2 implementers]
pkg/pnet/p2p.go
ClientInfo (Interface)
(no doc)
edge/index.ts
AddrPair (Interface)
(no doc)
edge/index.ts
ReplyInfo (Interface)
(no doc)
edge/index.ts

Core symbols most depended-on inside this repo

Debugf
called by 21
pkg/pnet/p2p.go
Close
called by 18
pkg/stream/tailscale.go
checkErr
called by 7
cmd/acp/main.go
Infof
called by 6
pkg/pnet/p2p.go
Init
called by 5
pkg/stream/dialer.go
getConfig
called by 5
pkg/config/config.go
ExchangeConnInfo
called by 4
pkg/pnet/p2p.go
RendezvousWithTimeout
called by 4
pkg/pnet/p2p.go

Shape

Function 89
Method 68
Struct 27
Interface 6
TypeAlias 3

Languages

Go94%
TypeScript6%

Modules by API surface

pkg/stream/tailscale.go22 symbols
pkg/pnet/p2p.go18 symbols
pkg/tui/status.go15 symbols
pkg/tui/logger.go14 symbols
edge/index.ts12 symbols
pkg/tui/auxlogger.go11 symbols
pkg/tailscale/cli.go11 symbols
pkg/config/config.go10 symbols
cmd/acp/tar.go10 symbols
pkg/stream/tcppunch.go8 symbols
pkg/stream/dialer.go8 symbols
pkg/pnet/portmapping.go8 symbols

For agents

$ claude mcp add acp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact