Skip to content

feat: add WebDAV storage provider (Nextcloud, ownCloud)#25

Open
tikibozo wants to merge 1 commit intotawanorg:mainfrom
tikibozo:feat/nextcloud-webdav-provider
Open

feat: add WebDAV storage provider (Nextcloud, ownCloud)#25
tikibozo wants to merge 1 commit intotawanorg:mainfrom
tikibozo:feat/nextcloud-webdav-provider

Conversation

@tikibozo
Copy link
Copy Markdown

@tikibozo tikibozo commented Apr 24, 2026

Summary

  • Adds a new webdav storage provider enabling sync through self-hosted WebDAV servers (Nextcloud, ownCloud, etc.)
  • Zero external dependencies — uses Go stdlib net/http and encoding/xml for all WebDAV operations (PUT, GET, DELETE, PROPFIND, MKCOL)
  • Includes interactive setup wizard, CLI flags (--webdav-url, --webdav-username, --webdav-password, --webdav-path-prefix), and config validation

Motivation

The existing providers (R2, S3, GCS) all require external cloud accounts. Many users already run Nextcloud or similar WebDAV servers and would prefer to keep their Claude Code session data self-hosted. WebDAV is a widely supported protocol that maps cleanly to the existing Storage interface.

Implementation

File Change
internal/storage/webdav/webdav.go Storage interface implementation via HTTP/WebDAV
internal/storage/webdav/propfind.go XML parser for PROPFIND multistatus responses
internal/storage/webdav/propfind_test.go Tests for XML parsing (collections, URL decoding, non-200 filtering)
internal/storage/storage.go ProviderWebDAV constant, NewWebDAV factory var
internal/storage/config.go WebDAV config fields, validation, bucket requirement skipped for WebDAV
internal/storage/config_test.go 5 WebDAV validation test cases
cmd/claude-sync/main.go Provider menu entry, CLI flags, setup wizard, side-effect import

Storage interface mapping

Interface method WebDAV operation
Upload PUT with auto MKCOL for parent dirs
Download GET
Delete / DeleteBatch DELETE (sequential for batch)
List PROPFIND depth-infinity, filters out collections
Head PROPFIND depth-0
BucketExists PROPFIND depth-0 on root path prefix

Test plan

  • All existing tests pass (go test ./...)
  • New PROPFIND parser tests pass (collections, URL-encoded paths, non-200 propstat)
  • New config validation tests pass (valid config, missing URL/username/password, bucket not required)
  • Binary builds and --help shows WebDAV provider
  • End-to-end: claude-sync init --provider webdav → push → pull on second device

🤖 Generated with Claude Code

@tikibozo tikibozo marked this pull request as ready for review April 24, 2026 01:27
@tikibozo tikibozo force-pushed the feat/nextcloud-webdav-provider branch from 885a13c to 6af0ac9 Compare April 24, 2026 02:25
…nCloud)

Add a new WebDAV-based storage provider that enables syncing Claude Code
sessions through self-hosted WebDAV servers like Nextcloud or ownCloud,
removing the dependency on external cloud storage (R2/S3/GCS).

The implementation uses only Go stdlib (net/http, encoding/xml) with no
external dependencies. Includes setup wizard, CLI flags, config
validation, and PROPFIND XML parser tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tikibozo tikibozo force-pushed the feat/nextcloud-webdav-provider branch from 6af0ac9 to 9caa740 Compare April 24, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant