Skip to main content

Claude-Pyrojects

sorry, I suck at naming

Claude-Pyrojects is a Python package that allows you to easily upload your entire project directory to a Claude project. By doing this, Claude can access your project files and utilize them effectively. This is particularly useful for leveraging Claude's capabilities in understanding and interacting with your codebase.

Special thanks to the creators of ClaudeAPI, specifically n0kovo's branch

Features

  • Initialize Project: Set up your project directory for integration with Claude by creating a .ignore file to specify folders and files that should be excluded from the upload.
  • Create Claude Project: Automatically create a new project in Claude and upload the entire directory structure and files.
  • Update Project: Reinitialize your Claude project by clearing existing files and re-uploading the current state of your project directory.
  • Flexible Ignoring: Customize which folders, file types, specific file names, and relative paths to exclude using the claude_pyrojects.ignore file.

Prerequisites

  • A Claude account (Claude Pro is recommended for the best experience).
  • Python 3.6 or higher.
  • An active Claude session key, which can be obtained from your Claude account.

Installation

To install Claude-Pyrojects, use pip:

pip install claude-pyrojects

Usage

Step 1: Initialize the Project

The first step is to initialize the project. This will create the necessary configuration files, including the ignore file (claude_pyrojects.ignore) and save your session key.

Refer to this on how to get your session key.

python -m claude-pyrojects.cli init -K "your_session_key"

Step 2: Create a New Project in Claude

Once your project is initialized, you can create a new project in Claude. This will upload your entire project directory, excluding any files and folders specified in the ignore file.

python -m claude-pyrojects.cli create -N "Your Project Name"

Step 3: Update the Claude Project

As your project evolves, you might need to re-upload it to Claude to reflect the latest changes. The update command reinitializes the project by clearing all existing files and re-uploading the current state of your directory.

python -m claude-pyrojects.cli update

Customizing the Ignore File

The claude_pyrojects.ignore file allows you to specify folders, file extensions, specific filename substrings, and relative paths to exclude from the upload process.

Example claude_pyrojects.ignore:

ignore_folders=[".venv", ".idea", ".vscode", "__pycache__", ".git"]
ignore_file_extensions=["pdf", "jpg", "png", "pyc", "manifest"]
ignore_name_includes=["claude_pyrojects", ".DS_Store"]
ignore_relative_paths=["docs/build", "tests/temp", "data/cache"]

Ignore Options Explained:

  • ignore_folders: List of folder names to be ignored anywhere in the directory tree.
  • ignore_file_extensions: List of file extensions to be ignored (without the dot).
  • ignore_name_includes: List of substrings that, if found in a filename, will cause the file to be ignored.
  • ignore_relative_paths: List of relative paths (from project root) to be ignored. This allows you to ignore specific subfolders like "folder/subfolder" or "src/tests/fixtures".

Relative Path Examples:

ignore_relative_paths=[
    "docs/build",           # Ignores the build folder inside docs
    "tests/temp",           # Ignores the temp folder inside tests  
    "data/cache",           # Ignores the cache folder inside data
    "frontend/node_modules", # Ignores node_modules in frontend folder
    "src/generated"         # Ignores the generated folder inside src
]

Note: Relative paths are normalized to work across different operating systems (Windows, macOS, Linux). You can use either forward slashes / or backslashes \ - they will be handled correctly.

Changing the Session Key

In order to change the session key, simply look for the claude_pyrojects.key file and replace its contents with your new key

Planned Features

  • GitHub Integration: A GitHub app that automatically updates the Claude project whenever changes are pushed to the repository.

Disclaimer

This project provides an unofficial API for Claude AI and is not affiliated with or endorsed by Claude AI or Anthropic. Use it at your own risk.

Please refer to the official Claude AI documentation for more information on how to use Claude AI.

GitAds Sponsored

Sponsored by GitAds

Metadata

Release files for claude-pyrojects 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-pyrojects 0.2.1
File Size Uploaded
claude-pyrojects-0.2.1.tar.gz 14.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-pyrojects 0.2.1
File Interpreter ABI Platform
claude_pyrojects-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 29.8 kB

Release files / claude-pyrojects-0.2.1.tar.gz

Download URL claude-pyrojects-0.2.1.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d47ef36d04a96fff7d433ea7f6a9527be22cc6bcf5aa52cef6817c20592cfe80
BLAKE2b-256 checksum
How to use checksums
918577fbd5379e8f0da015e7cad05758eb68ce3901cb9ebd0c417722ec24cbac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release files / claude_pyrojects-0.2.1-py3-none-any.whl

Download URL claude_pyrojects-0.2.1-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6eab4544ff67a5e2a2fc4f3bcf9e69cc997f4e56d096fb9f349b93dedecc0afb
BLAKE2b-256 checksum
How to use checksums
d2dbb0367829e26e61de6c725744a7602b379c9998b52619dfe46e9dbbe244dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page