Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 2.12 KB

File metadata and controls

66 lines (50 loc) · 2.12 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository Overview

RepoLauncher is a Python CLI tool that automates Git repository initialization and GitHub repository creation. It streamlines the workflow of setting up new projects by handling git initialization, GitHub API calls, and remote configuration in a single command.

Commands

Development Setup

# Install dependencies using uv
uv sync

# Run the application
uv run main.py [path] [--private]

Common Usage

# Initialize current directory
uv run main.py

# Initialize specific directory
uv run main.py /path/to/project

# Create private repository
uv run main.py --private

Architecture

Core Components

  • main.py: Single-file application containing all functionality
    • run_command(): Shell command execution wrapper
    • create_github_repo(): GitHub API integration for repository creation
    • push_to_github(): Git remote configuration and push logic
    • init_git(): Git repository initialization with branch renaming to 'main'

External Dependencies

  • python-dotenv: Environment variable management
  • requests: GitHub API HTTP calls
  • uv: Modern Python package manager (preferred over pip)

Configuration

  • Environment variables loaded from .env file
  • Requires GITHUB_TOKEN with repo permissions
  • Uses Tsinghua University PyPI mirror for faster downloads in China

Workflow

  1. Validates target directory exists
  2. Initializes git repository (renames branch to 'main' if new)
  3. Creates GitHub repository via API
  4. Configures remote origin
  5. Commits uncommitted changes
  6. Pushes current branch to GitHub

Key Considerations

  • No test framework: Project lacks automated testing setup
  • No linting configuration: No code quality tools configured
  • Single-file architecture: All logic contained in main.py
  • GitHub API dependency: Requires valid personal access token
  • Branch handling: Automatically detects and pushes current branch (main/master/etc.)
  • Error handling: Basic error handling with sys.exit() on failures