termscp

repository·main·Indexed 25 days ago

https://github.com/veeso/termscp

A feature-rich terminal file transfer and explorer with a TUI. termscp supports multiple protocols including SFTP, SCP, FTP, Kube, S3, SMB, and WebDAV, allowing users to interact with both local and remote file systems.

Tokens
14.7K
Snippets
29
Records
123
Agent score
82%

What's inside termscp

  1. Overview of termscp features

    main

    termscp is a terminal-based file transfer client and explorer with a TUI (Terminal User Interface). It provides a dual-pane interface to interact with both local and remote file systems simultaneously.

    Key capabilities include:

    • Protocol Support: SFTP, SCP, FTP, FTPS, Kube, S3, SMB, and WebDAV.
    • File Operations: Create, remove, rename, search, view, and edit files on both local and remote systems.
    • Connectivity: Support for SSH keys or username/password authentication; bookmarks and recent connections for quick access.
    • Workflow Tools: Embedded terminal for system commands, file watcher for synchronization, and desktop notifications for large transfers.
    • Customization: Support for themes, custom file explorer formats, custom text editors, and custom file sorting.
    • Security: Integration with operating system key vaults to save passwords.

    Supported platforms: Linux, macOS, FreeBSD, NetBSD, and Windows.

  2. Understand the file explorer panel layout

    main

    Once a connection to a remote host is established, termscp displays a three-panel file explorer interface:

    • Local explorer panel: Located on the left; displays entries for the current directory on localhost.
    • Remote explorer panel: Located on the right; displays entries for the current directory on the remote host.
    • Find results panel: Appears after performing a file search. It replaces either the local or remote explorer panel (depending on the search scope) to list entries matching your query.
  3. Understand termscp password encryption and storage

    main

    termscp encrypts bookmark passwords using AES. The encryption key is stored in your operating system's native secret store whenever possible:

    • Windows: Windows Vault
    • Linux: System keyring (requires a service exposing org.freedesktop.secrets on D-Bus)
    • macOS: Keychain
    • BSD and WSL: No native secret store is available. The encryption key is saved on disk at $HOME/.config/termscp. While protected by file permissions, it is recommended to avoid saving passwords for internet-exposed servers on these systems.
  4. Understand the termscp core architecture

    main

    termscp is built around three core modules that manage the host, the user interface, and the lifecycle of the application:

    • host: Provides file system interaction via the HostBridge trait, abstracting operations over both Localhost and RemoteBridged hosts.
    • ui: Implements the user interface using an Activity-based system.
    • activity_manager: Manages the lifecycle of activities, deciding when to terminate the current activity and which one to run next based on their state.

    Additional supporting modules include config (schema and serialization), explorer (directory models and view states), filetransfer (protocol construction), system (config, ssh keys, and bookmarks), and utils.

  5. Install termscp on Linux, macOS, or FreeBSD

    main

    You can install termscp using a single shell script command. Note that macOS users should have Homebrew installed; otherwise, the installer will attempt to install the Rust compiler.

    curl --proto '=https' --tlsv1.2 -sSLf https://termscp.rs/install.sh | sh
  6. Select multiple files in termscp

    main

    You can build a selection of files to perform bulk actions using the following keyboard shortcuts:

    • <M>: Mark the currently highlighted file for selection.
    • <CTRL+A>: Select all files in the current directory.
    • <ALT+A>: Deselect all files.

    Marked files are visually identified by a highlighted background. When a selection is active, actions will only apply to the selected files, and the currently highlighted (but unselected) item will be ignored.

  7. Workflow for editing remote files

    main

    Directly editing remote files via the remote panel is not supported because termscp cannot detect when an external editor has finished the session.

    To edit a remote file, follow this workflow:

    1. Download the file from the remote host to a local directory.
    2. Edit the file locally using your preferred editor.
    3. Upload the modified file back to the remote host.
  8. Get started with termscp

    main

    To begin using termscp, follow these core steps:

    1. Installation: Set up the termscp binary on your system.
    2. Connecting to a server: Establish a connection to a remote host.
    3. Connection parameters: Configure the specific protocols and credentials required for your connection (e.g., SCP, SFTP, FTP, Kube, S3, or WebDAV).
  9. Use termscp file explorer and features

    main

    termscp provides several interactive features for managing remote files:

    • File Explorer: Navigate remote directories.
    • Keyboard Shortcuts: Use predefined keys for rapid navigation and actions.
    • Multiple Files: Perform operations on groups of files.
    • Synchronized Browsing: View multiple remote locations simultaneously.
    • Opening and Editing: Access and modify files directly.
    • Bookmarks and Recent Hosts: Quickly return to frequent connections or recently visited hosts.
    • File Watcher: Keep local and remote files in sync.