Skip to content

(unofficial) python command line client for internxt, includes webdav server

License

Notifications You must be signed in to change notification settings

CrispStrobe/internxt-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

52 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Internxt Python CLI

A Python implementation of the Internxt CLI for encrypted cloud storage with path-based operations, timestamp preservation, and a built-in WebDAV server.

⚠️ Disclaimer

This is an unofficial, open-source project and is not affiliated with, endorsed by, or supported by Internxt, Inc. It is a personal project built for learning and to provide an alternative interface. Use it at your own risk.

✨ Features

🌐 WebDAV Server

  • βœ… Mount as a local drive: Access your Internxt Drive directly from Finder, File Explorer, or any WebDAV client.
  • βœ… Cross-platform support: Works on Windows, macOS, and Linux.
  • βœ… Stable and Compatible: Uses waitress (recommended) or cheroot for the best client compatibility.
  • βœ… Server Choice: Force waitress or cheroot with the --server flag for debugging.

πŸ›£οΈ Path-Based Operations

  • βœ… Human-readable paths: Use /Documents/report.pdf instead of UUIDs.
  • βœ… Fuzzy Search: Instantly find files and folders with a fast, server-side search command.
  • βœ… Wildcard Find: Use find with patterns like *.pdf, report*, etc.
  • βœ… Tree visualization: See your folder structure at a glance.
  • βœ… Path navigation: Browse folders like your local filesystem.

πŸ” Core Functionality

  • βœ… Timestamp Preservation: Preserves original file modification/creation dates on upload and download-path.
  • βœ… Secure authentication: Login/logout with 2FA support.
  • βœ… File operations: Upload, download with progress indicators.
  • βœ… Folder management: Create and organize folders.
  • βœ… Zero-knowledge encryption: AES-256-CTR client-side encryption.

πŸš€ Quick Start

# Install dependencies
pip install -r requirements.txt

# (Recommended for WebDAV)
pip install waitress

# Login to your account
python cli.py login

# Mount your drive locally! (EASIEST WAY TO USE)
python cli.py webdav-start

# Or, use path-based commands
python cli.py list-path
python cli.py search "report"
python cli.py find /Documents "*.pdf"
python cli.py upload -r -p ./my-docs /Backups

πŸ“– Usage Guide

πŸ” Authentication

# Login with interactive prompts
python cli.py login

# Login non-interactively
python cli.py login --email user@example.com --password mypass --2fa 123456

# Check current user
python cli.py whoami

# Logout and clear credentials
python cli.py logout

🌐 WebDAV Server

Mount your Internxt Drive as a local disk.

# Start the WebDAV server (it will print the URL and credentials)
python cli.py webdav-start

# Start in the background
python cli.py webdav-start --background

# Force a specific server (e.g., cheroot for SSL)
python cli.py webdav-start --server cheroot

# Check if the server is running
python cli.py webdav-status

# Stop the server
python cli.py webdav-stop

# Show mount instructions for your OS
python cli.py webdav-mount

# Test if the server is responding correctly
python cli.py webdav-test

# Show full WebDAV configuration and paths
python cli.py webdav-config

# Show advanced debugging info
python cli.py webdav-debug

# Regenerate SSL certs
python cli.py webdav-regenerate-ssl

After starting, open your file manager (Finder/File Explorer) or Client (like CyberDuck) and connect to the server (e.g., http://localhost:8080) with username internxt and password internxt-webdav.

πŸ›£οΈ Path-Based Operations

List & Navigate

# List root folder with readable paths
python cli.py list-path

# List specific folders
python cli.py list-path "/Documents"
python cli.py list-path "/Photos/2023/Summer"

# Show detailed information (size, date)
python cli.py list-path "/Documents" --detailed

# Show folder structure as tree
python cli.py tree
python cli.py tree "/Projects" --depth 2

Search & Find

# Fast, global, server-side fuzzy search
python cli.py search "report"

# Show full details (size, date, full path) (slow!)
python cli.py search "report" --detailed

# Slow, client-side wildcard find (POSIX-like syntax, slow!)
python cli.py find / "*.pdf"              # All PDF files in entire drive
python cli.py find /Photos "*.jpg"        # All JPGs in /Photos
python cli.py find . "report*"            # Files starting with "report" in current path

⬆️⬇️ Upload & Download

Upload

# Upload a single file, preserving its timestamp
python cli.py upload -p ./local-report.pdf /Documents/

# Upload a whole folder recursively, preserving all timestamps
python cli.py upload -r -p ./my-project /Backups/

# Upload with filters and overwrite conflicts
python cli.py upload -r ./photos /Photos --include "*.jpg" --on-conflict overwrite

Download

# Download a file by path, preserving its timestamp
python cli.py download-path -p "/Documents/report.pdf"

# Download a folder recursively to a local directory
python cli.py download-path -r "/Photos/2023" --destination ./My-Photos

# Download a folder with filters
python cli.py download-path -r "/Music" --include "*.mp3" --exclude "demo_*"

πŸ—‘οΈ Delete & Trash Operations

Move to Trash (Recoverable)

# Move to trash by path
python cli.py trash-path "/OldDocuments/outdated.pdf"
python cli.py trash-path "/TempFolder"

Permanent Delete (⚠️ Cannot Be Undone)

# Permanently delete by path (with warnings)
python cli.py delete-path "/TempFile.txt"

πŸ“ Traditional Operations (UUID-based)

# List folders (old way with UUIDs)
python cli.py list
python cli.py list --folder-id <folder-uuid>

# Create folders
python cli.py mkdir "My New Folder"

# Upload/Download by UUID (see path-based commands for more features)
python cli.py upload ./document.pdf
python cli.py download <file-uuid>

πŸ”§ Utility Commands

# Show current configuration
python cli.py config

# Test CLI components
python cli.py test

# Extended help with examples
python cli.py help-extended

# Debug path resolution
python cli.py resolve "/Documents/report.pdf"

πŸ“¦ Installation

# Clone the repository
git clone https://github.com/CrispStrobe/internxt-python
cd internxt-python

# Install dependencies
pip install -r requirements.txt

# For the best WebDAV experience, install 'waitress'
pip install waitress  # (Highly recommended for WebDAV)

# Start using immediately
python cli.py login
python cli.py webdav-start

Requirements

  • Python 3.8+
  • Dependencies: cryptography, mnemonic, tqdm, requests, click, WsgiDAV
  • WebDAV Server: waitress (recommended) or cheroot

πŸ”’ Security & Privacy

This CLI implements the same security model as official Internxt clients:

  • Client-side encryption: All files encrypted on your device before upload (AES-256-CTR).
  • Zero-knowledge: Internxt servers never see your unencrypted data or keys.
  • Secure Credentials: Encrypted and stored locally in ~/.internxt-cli/.

πŸ—οΈ Development

Project Structure

internxt-python/
β”œβ”€β”€ cli.py                    # Main CLI interface with all commands
β”œβ”€β”€ config/
β”‚   └── config.py             # Configuration management
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ auth.py               # Authentication & login
β”‚   β”œβ”€β”€ crypto.py             # Encryption/decryption
β”‚   β”œβ”€β”€ drive.py              # Drive operations & path resolution
β”‚   β”œβ”€β”€ webdav_provider.py    # WsgiDAV provider for Internxt
β”‚   └── webdav_server.py      # WebDAV server management
└── utils/
    └── api.py                # HTTP API client

Development Setup

# Clone and setup development environment
git clone https://github.com/CrispStrobe/internxt-python.git
cd internxt-python

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/macOS

# Install in development mode
pip install -e .
pip install -r requirements.txt

Getting Help

python cli.py --help
python cli.py help-extended
python cli.py <command> --help

πŸ“„ License

AGPL-3.0 license


Made with ❀️ for the Internxt community

About

(unofficial) python command line client for internxt, includes webdav server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages