Skip to main content

A tool to synchronize local files with Claude.ai projects

Project description

ClaudeSync

GitHub Actions

ClaudeSync is a Python tool that automates the synchronization of local files with Claude.ai Projects. It watches specified directories and automatically uploads modified files to your Claude.ai Project's knowledge base.

Key features:

  • Monitors local directories for file changes
  • Automatically uploads new or modified files to Claude.ai Projects
  • Configurable delay to prevent excessive uploads during active editing
  • Supports both command-line arguments and config file for flexibility
  • Handles recursive directory watching
  • User-friendly Terminal User Interface (TUI)

Use ClaudeSync if you're working with Claude.ai Projects and want to keep your project's knowledge base updated with your local files without manual uploads.

Illustration

Installation

Install ClaudeSync using pip:

pip install claudesync

Configuration

You have two options for configuring ClaudeSync:

  1. Command-line arguments (recommended for one-time use or testing)
  2. Configuration file (recommended for repeated use)

Option 1: Command-line Arguments

Provide your session key and watch directory directly in the command:

claudesync --session-key YOUR_SESSION_KEY --watch-dir /path/to/watch

Option 2: Configuration File

Create a config.json file in your working directory:

{
    "user_id": "your-user-id-here",
    "project_id": "your-project-id-here"
}

Then run ClaudeSync:

claudesync --session-key YOUR_SESSION_KEY --watch-dir /path/to/watch

Usage

Basic Usage

claudesync --session-key YOUR_SESSION_KEY --watch-dir /path/to/watch

Parameters

  • --session-key: Your Claude.ai session key (required)
  • --watch-dir: Directory to watch for changes (default: current directory)
  • --user-id: User ID for Claude API (optional if in config.json)
  • --project-id: Project ID for Claude API (optional if in config.json)
  • --delay: Delay in seconds before uploading (default: 5)

Examples

Watch the current directory and sync changes:

claudesync --session-key YOUR_SESSION_KEY

Watch a specific directory with a custom delay:

claudesync --session-key YOUR_SESSION_KEY --watch-dir /path/to/watch --delay 10

Terminal User Interface (TUI)

ClaudeSync now features a user-friendly TUI that displays:

  • Watched directory
  • Upload delay
  • User ID
  • Project ID
  • Recent activity log

To exit the TUI, press 'q'.

Contributing

We welcome contributions to ClaudeSync! Please see our Contributing Guidelines for more information on how to get started.

License

MIT License

Disclaimer

Ensure you have the necessary permissions to access and modify your Claude.ai projects. Keep your session key secure and do not share it publicly.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claudesync-0.2.0.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

claudesync-0.2.0-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page