dap
v2.1.0
Published
Data access proxy for SSH hosts, port forwards, and remote filesystem mounts.
Maintainers
Readme
dap
dap is a data access proxy for SSH-based machines. It scans your OpenSSH config, lists configured hosts, adds and edits SSH host blocks, connects to remote machines, proxies remote ports, and mounts remote folders into your local filesystem.
dap uses OpenSSH as the source of truth. Your ~/.ssh/config, SSH agent, keys, ProxyJump, known hosts, and normal ssh behavior remain in control.
Issue Reporting and Security
For reporting bugs, issues, or security vulnerabilities, please visit community.foss.global/. This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a code.foss.global/ account to submit Pull Requests directly.
Install
Install globally:
pnpm install -g dapOr install in a project:
pnpm install dapQuick Start
Open the interactive dashboard:
dapList configured SSH hosts:
dap listAdd a host:
dap add production --hostname 203.0.113.10 --user root --identity-file ~/.ssh/id_ed25519Connect to a host:
dap ssh productionProxy a remote PostgreSQL port to your local machine:
dap proxy production --local 5433:127.0.0.1:5432Mount a remote folder locally:
dap mount production:/var/www ./mounts/production-wwwCheck local system support:
dap doctorCommands
dap
Starts the interactive dashboard.
dapThe dashboard can list hosts, add hosts, edit hosts, connect over SSH, start port proxies, mount remote paths, and run diagnostics.
dap list
Lists hosts found in your SSH config.
dap listdap reads the main config and included files.
dap add
Adds a DAP-managed host block to the main SSH config.
dap add staging --hostname staging.example.com --user deploy --port 22 --identity-file ~/.ssh/id_ed25519Generated block:
# dap:begin staging
Host staging
HostName staging.example.com
User deploy
Port 22
IdentityFile ~/.ssh/id_ed25519
# dap:end stagingIf required fields are missing, dap add asks for them interactively.
dap edit <host>
Edits a host in the main SSH config.
dap edit production --user deploy --identity-file ~/.ssh/id_ed25519Editable fields include:
HostNameUserPortIdentityFileProxyJumpLocalForwardRemoteForward
DAP-managed blocks are updated directly. Existing non-DAP host blocks are shown as a diff before writing unless --yes is passed.
dap ssh <host>
Connects to a host using the system ssh binary.
dap ssh productionBy default this starts a session bridge and temporarily places a dap command into the remote session PATH. The command is created in a temporary remote directory and removed when the SSH session exits.
Disable the bridge when you want a plain SSH call:
dap ssh production --no-bridgePass raw SSH arguments after --:
dap ssh production -- -ARemote Session dap
When you connect with dap ssh <host>, the remote shell receives a temporary dap command.
Inside the remote session:
dap infoMount the current remote directory into a local path:
dap mount . ./dap-mounts/projectThe remote command talks back to the local DAP session through an SSH reverse forward. The bridge uses a one-time token and only exposes explicit DAP actions.
The remote machine needs curl for bridged remote commands.
dap proxy <host>
Starts an SSH local forward.
dap proxy production --local 5433:127.0.0.1:5432This maps:
localhost:5433 -> production:127.0.0.1:5432Internally this uses:
ssh -N -L 5433:127.0.0.1:5432 productiondap mount <host>:<remotePath> <localPath>
Mounts a remote path into your local filesystem.
dap mount production:/srv/project ./mounts/projectBackends:
sshfs, preferred when available.rclone mount, used as a fallback with the documented--sftp-sshoption so OpenSSH host aliases can still be used.
Force a backend:
dap mount production:/srv/project ./mounts/project --backend sshfsLinux requires FUSE. macOS requires macFUSE.
dap unmount <localPath>
Unmounts a local mount path.
dap unmount ./mounts/projectOn Linux, dap uses fusermount3, fusermount, or umount. On macOS, it uses umount.
dap doctor
Checks the local system for required tools and platform support.
dap doctorIt checks:
sshsshfsrclone~/.ssh/config- FUSE on Linux
- macFUSE on macOS
SSH Config Handling
dap uses the main SSH config:
~/.ssh/configIt also scans files referenced by Include directives.
When adding new hosts, dap writes managed blocks directly to the main config. Managed blocks are wrapped with markers:
# dap:begin production
Host production
HostName 203.0.113.10
User root
IdentityFile ~/.ssh/id_ed25519
# dap:end productionBefore changing the main config, dap creates a timestamped backup:
~/.ssh/config.dap-backup-2026-05-30T12-30-00-000ZFor existing non-DAP host blocks, dap edit shows a diff before writing.
Mounting Notes
sshfs is the simplest backend because it maps directly to OpenSSH host aliases:
sshfs production:/srv/project ./mounts/projectrclone mount is available as a fallback. DAP invokes it with the external SSH option so your SSH config alias remains the connection entry point:
rclone mount :sftp:/srv/project ./mounts/project --sftp-ssh "ssh production" --sftp-shell-type noneSafety Model
dap follows these rules:
- OpenSSH remains authoritative.
- The main SSH config is backed up before writes.
- DAP-created blocks are clearly marked.
- Non-DAP host edits require diff confirmation by default.
- Remote
dapexists only for the currentdap sshsession. - The remote session bridge uses a one-time token.
- The bridge exposes explicit DAP actions, not arbitrary local shell execution.
Platform Support
dap targets:
- Linux
- macOS
Windows is not part of the initial scope.
License and Legal Information
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the repository license.md file.
Please note: The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
Company Information
Task Venture Capital GmbH Registered at District Court Bremen HRB 35230 HB, Germany
For any legal inquiries or further information, please contact us via email at [email protected].
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
