{"id":28288553,"url":"https://github.com/utkarshg1/scfldr","last_synced_at":"2026-03-03T22:01:43.516Z","repository":{"id":293812915,"uuid":"985199644","full_name":"utkarshg1/scfldr","owner":"utkarshg1","description":"A command-line tool to generate folder and file structures from YAML templates","archived":false,"fork":false,"pushed_at":"2025-05-19T11:40:20.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T13:01:45.299Z","etag":null,"topics":["asyncio","folder-structure","python3","scaffolding","typer-cli"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/scfldr/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/utkarshg1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-17T09:10:00.000Z","updated_at":"2025-05-19T11:40:24.000Z","dependencies_parsed_at":"2025-06-18T14:45:18.818Z","dependency_job_id":null,"html_url":"https://github.com/utkarshg1/scfldr","commit_stats":null,"previous_names":["utkarshg1/scaffolder","utkarshg1/scfldr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/utkarshg1/scfldr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarshg1%2Fscfldr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarshg1%2Fscfldr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarshg1%2Fscfldr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarshg1%2Fscfldr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utkarshg1","download_url":"https://codeload.github.com/utkarshg1/scfldr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utkarshg1%2Fscfldr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30063358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","folder-structure","python3","scaffolding","typer-cli"],"created_at":"2025-05-22T00:12:38.778Z","updated_at":"2026-03-03T22:01:43.509Z","avatar_url":"https://github.com/utkarshg1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scaffolder\n\nA command-line tool to generate folder and file structures from YAML templates.\n\n## Features\n\n- 🚀 **Fast**: Uses asynchronous I/O for efficient file operations\n- 🛠️ **Simple**: Define your project structure in a simple YAML file\n- 🎨 **Visual**: Rich console output with color-coded status messages and tree visualization\n- 🔄 **Non-destructive**: Asks for confirmation before overwriting existing files\n- 🧩 **Flexible**: Creates files with or without content, nested directories, and more\n- 📊 **Preview**: Visualize your project structure before generating it\n- 🔧 **Templates**: Built-in templates for common project structures\n\n## Installation\n\n```bash\npip install scfldr\n```\n\nOr install from source:\n\n```bash\ngit clone https://github.com/utkarshg1/scfldr.git\ncd scfldr\npip install -e .\n```\n\n## Usage\n\n### Creating Your Project Structure\n\nCreate a YAML template file to define your desired file structure:\n\n```yaml\n# template.yaml\nsrc:\n  main.py: |\n    def main():\n        print(\"Hello, world!\")\n\n    if __name__ == \"__main__\":\n        main()\n  utils:\n    helpers.py: |\n      def add(a, b):\n          return a + b\ndocs:\n  README.md: |\n    # My Project\n\n    This is a sample project.\ntests:\n  test_main.py: |\n    def test_sample():\n        assert True\n# Example with append mode\nlogs:\n  app.log: # Standard write mode (overwrites if file exists)\n    content: |\n      # Log file initialized\n      # App started\n  error.log: # Append mode (adds content if file exists)\n    content: |\n      # Error log entry\n      # Will be appended if the file exists\n    mode: a\n```\n\nThen generate your project structure:\n\n```bash\nscfldr generate-structure --template template.yaml --output my_project\n```\n\nThe tool will:\n\n1. Ask for confirmation before overwriting existing files\n2. Display a colorful tree visualization of the generated structure\n3. Show real-time progress with color-coded status messages\n\n### Creating Example Templates\n\nYou can quickly create example template files:\n\n```bash\nscfldr create-example --type basic --output my_template.yaml\nscfldr create-example --type web --output web_template.yaml\nscfldr create-example --type python_package --output pkg_template.yaml\n```\n\nYou can also print the raw template content to the terminal for easy copying:\n\n```bash\nscfldr create-example --type basic --print-raw\n```\n\n### Previewing Structure\n\nPreview the structure defined in your template without generating files. This will display a colorful tree visualization of the project structure:\n\n```bash\nscfldr show-structure --template template.yaml\n```\n\n### Checking Version\n\nYou can check the installed version of Scaffolder:\n\n```bash\nscfldr --version\n```\n\n### Command Line Options\n\n```\nUsage: scfldr [COMMAND] [OPTIONS]\n\nGenerate folder/file structure from a YAML template.\n\nCommands:\n  generate-structure     Generate a project structure from a YAML template\n  show-structure         Preview the directory structure from a YAML template\n  create-template-file   Create a YAML template file from predefined examples\n  create-example         Generate an example YAML template file\n\nOptions:\n  --help                 Show this message and exit\n  --version, -V         Show version and exit\n\nGenerate Structure Options:\n  --template PATH, -t PATH  Path to the YAML template. [default: template.yaml]\n  --output PATH, -o PATH    Output directory root. [default: .]\n  --force, -f / --no-force  Overwrite existing output directory if it exists.\n\nShow Structure Options:\n  --template PATH, -t PATH  Path to the YAML template. [default: template.yaml]\n\nCreate Template File Options:\n  TEMPLATE_NAME          Name of the template to create (e.g., 'basic', 'web', 'python_package')\n  --output-path PATH     Output path for the YAML template file. [default: template.yaml]\n  --print-raw, -p        Print raw template content to terminal for easy copying\n\nCreate Example Options:\n  --output PATH, -o PATH    Path to save the example template. [default: template.yaml]\n  --type TEXT               Type of template to generate (basic, web, python_package). [default: basic]\n  --force, -f / --no-force  Overwrite existing file if it exists.\n  --print-raw, -p           Print raw template content to terminal for easy copying\n```\n\n## YAML Template Format\n\nThe YAML template follows a simple structure:\n\n- Keys represent directory or file names\n- Generated templates use literal style (`|`) for multiline strings to preserve formatting\n- Values represent:\n  - For directories: A nested dictionary defining child entities\n  - For files:\n    - String content (can be multiline using YAML's `|` syntax)\n    - OR a dictionary with `content` and optional `mode` keys\n      - `mode: a` to append content to an existing file\n      - `mode: w` (default) to create or overwrite a file\n  - For empty directories: An empty dictionary `{}`\n\n### Examples:\n\n```yaml\n# Basic structure\nproject:\n  src:\n    main.py: |\n      def main():\n          print(\"Hello, world!\")\n    utils: {} # Empty directory\n  README.md: \"# Project Title\"\n```\n\n```yaml\n# Structure with append mode\nproject:\n  src:\n    main.py: |\n      def main():\n          print(\"Hello, world!\")\n  logs:\n    app.log: # Standard write mode (default)\n      content: \"Log entry\"\n    error.log: # Append mode\n      content: \"Error message\"\n      mode: a # 'a' for append, 'w' for write (default)\n```\n\n## Predefined Templates\n\nScaffolder comes with several predefined templates that you can use to quickly start a project:\n\n### Basic Template\n\nA simple project structure with source files, documentation, and tests.\n\n```bash\nscfldr create-template-file basic --output-path basic_template.yaml\n```\n\nYou can also print the raw template content to the terminal:\n\n```bash\nscfldr create-template-file basic --print-raw\n```\n\n### Web Template\n\nA Flask web application with static files, templates, and basic setup.\n\n```bash\nscfldr create-template-file web --output-path web_template.yaml\n```\n\n### Python Package Template\n\nA standard Python package structure with tests, setup.py, and more.\n\n```bash\nscfldr create-template-file python_package --output-path package_template.yaml\n```\n\n## Development\n\n### Requirements\n\n- Python 3.10+\n- Dependencies:\n  - typer\n  - pyyaml\n  - asyncio\n  - aiofiles\n  - rich\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarshg1%2Fscfldr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futkarshg1%2Fscfldr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futkarshg1%2Fscfldr/lists"}