Skip to main content

Add your description here

Project description

CraftLet

CraftLet is a Python-based CLI (Command-Line Interface) tool designed to streamline project template management and initialization. It enables developers to quickly scaffold new projects from GitHub-hosted templates with minimal configuration overhead.

Core Purpose

CraftLet automates the process of:

  1. Template Loading from GitHub - Fetches project templates directly from GitHub repositories
  2. Dynamic Project Configuration - Prompts users for configuration values based on a template configuration schema
  3. Environment Variable Generation - Automatically creates .env files with configured environment variables
  4. Template Instantiation - Extracts and customizes template files into a target directory

Key Features

  • GitHub Integration - Converts GitHub repository URLs to downloadable zip archives using the Codeload API
  • Interactive Configuration - Uses Typer to create an interactive CLI that prompts users for required inputs
  • Template Configuration Schema - Supports JSON-based templateConfig.json files that define:
    • User input prompts
    • Environment variable mappings
    • Nested configuration structures
  • Asynchronous Operations - Leverages async/await for efficient HTTP requests using httpx
  • Project Initialization - Extracts template files while preserving directory structure and optionally generates environment configuration

Technology Stack

  • Framework - Typer (modern CLI framework)
  • HTTP Client - httpx (async HTTP client)
  • Python Version - 3.12+
  • Dependencies - typer, httpx

Architecture

  • CLI Module (src/craftlet/cli/CraftLetCLI.py) - Command registration and user-facing CLI commands
  • Feature Module (src/craftlet/feature/CraftLet.py) - Core template loading and disk writing logic
  • Utils Module (src/craftlet/utils/) - Helper functions for configuration building and URL mapping

Target Use Case

CraftLet is ideal for project maintainers who want to distribute boilerplate code/templates, allowing end-users to clone and customize templates without manual file editing or complex setup steps.

Installation

pip install -e .

Usage

Load a template from GitHub:

craftlet load-template --github

When prompted, provide:

  • The GitHub repository URL for the template
  • The desired project name

Optionally generate an .env file:

craftlet load-template --github --generate-env

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

craftlet-0.2.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

craftlet-0.2.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file craftlet-0.2.0.tar.gz.

File metadata

  • Download URL: craftlet-0.2.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for craftlet-0.2.0.tar.gz
Algorithm Hash digest
SHA256 114be031c7581fd515e7151a8e8f26bd57c602a4419bbe2e08cabd85b33c3730
MD5 3badf2a9597463331a426a528643ecc0
BLAKE2b-256 5d03f740596f175e6ea9ea0534c01aabef555233529bb70d577e6c263540ef17

See more details on using hashes here.

File details

Details for the file craftlet-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: craftlet-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for craftlet-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e0e1d6fce59f7d3fab16ab22536d99e0c529a22f0cbbb98248018874750e618
MD5 5800aa9da63da6cb9113636c63cb6dd0
BLAKE2b-256 4c5ee551da422402063ac89a9a526c035048b3643b98f6f3cdfac081a9f7e020

See more details on using hashes here.

Supported by

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