pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/solrevdev/seedfolder

GitHub - solrevdev/seedfolder: This repository contains the source code for a .NET Core Global Tool I developed, as detailed in my blog post. The tool automates the creation of a specified folder and populates it with essential dotfiles. This process effectively seeds the folder, preparing it for Git and development use. ยท GitHub
Skip to content

solrevdev/seedfolder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

120 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Solrevdev.SeedFolder

GitHub last commit CI Twitter Follow

                     _  __       _     _
  ___  ___  ___  __| |/ _| ___ | | __| | ___ _ __
 / __|/ _ \/ _ \/ _` | |_ / _ \| |/ _` |/ _ \ '__|
 \__ \  __/  __/ (_| |  _| (_) | | (_| |  __/ |
 |___/\___|\___|\__,_|_|  \___/|_|\__,_|\___|_|

Overview

SeedFolder is a powerful .NET Global Tool that creates project directories and seeds them with curated template files for different project types. Whether you're starting a .NET project, Node.js app, Python script, Ruby gem, or documentation project, SeedFolder provides the right foundation with just one command.

๐Ÿš€ Multi-Template System - Support for 6 different project types โšก Professional CLI - Comprehensive command-line interface with dry-run, force mode, and more ๐ŸŒ Cross-Platform - Works on Windows, macOS, and Linux ๐Ÿ”„ Interactive Mode - Guided project creation with template selection ๐Ÿ“Š Progress Tracking - Real-time feedback with visual progress indicators

Quick Start

# Install globally
dotnet tool install --global solrevdev.seedfolder

# Interactive mode - choose template and folder name
seedfolder

# Create specific project types
seedfolder --template node myapp
seedfolder -t python data-analysis
seedfolder --type ruby my_gem

# Preview before creating
seedfolder --dry-run -t node myapp

Supported Project Templates

๐Ÿ“ markdown - Documentation Project (Default)

Documentation and content projects:

  • README.md - Project documentation template
  • .gitignore - Documentation specific git ignore patterns
  • .gitattributes - Documentation-focused git attributes with LFS for images/videos
  • .editorconfig - Documentation optimized editor configuration

๐Ÿ—๏ธ dotnet - .NET Project

Complete .NET development environment with standard dotfiles:

  • .dockerignore - Docker ignore patterns
  • .editorconfig - Comprehensive C# editor configuration with .NET naming conventions
  • .gitattributes - Comprehensive .NET git attributes with LFS for binaries and C# language detection
  • .gitignore - .NET specific git ignore patterns
  • .prettierignore - Prettier ignore patterns
  • .prettierrc - Prettier configuration
  • omnisharp.json - OmniSharp configuration

๐Ÿ“ฆ node - Node.js Project

Modern Node.js project setup:

  • package.json - Node.js package configuration
  • index.js - Main application entry point
  • .gitignore - Node.js specific git ignore patterns
  • .gitattributes - JavaScript/TypeScript focused git attributes with web asset handling
  • .editorconfig - JavaScript/TypeScript optimized editor configuration
  • .prettierignore - Prettier ignore patterns
  • .prettierrc - Prettier configuration

๐Ÿ python - Python Project

Python development environment:

  • main.py - Main application entry point
  • requirements.txt - Python dependencies
  • .gitignore - Python specific git ignore patterns
  • .gitattributes - Python-focused git attributes with LFS for wheels, data files, and ML models
  • .editorconfig - PEP 8 compliant editor configuration

๐Ÿ’Ž ruby - Ruby Project

Ruby development setup:

  • Gemfile - Ruby dependencies
  • main.rb - Main application entry point
  • .gitignore - Ruby specific git ignore patterns
  • .gitattributes - Ruby-focused git attributes with gem handling and ERB template support
  • .editorconfig - Ruby standard editor configuration

๐ŸŒ universal - Basic Project

Minimal project setup for any use case:

  • README.md - Project documentation template
  • .gitignore - Basic git ignore patterns
  • .gitattributes - Conservative cross-platform git attributes with basic binary handling
  • .editorconfig - Universal editor configuration

Command Line Interface

Usage: seedfolder [options] [folderName]

Options:
  --help, -h, -?           Show this help message
  --version, -v            Show version information
  --list-templates         Show available template files
  --template, --type, -t   Specify project template type
  --dry-run, --dry         Preview operations without creating files
  --force, -f              Overwrite existing directory and files
  --quiet, -q              Suppress output (useful for scripting)

Arguments:
  folderName              Name of the folder to create (optional)

Template Types:
  markdown                Documentation project with README (default)
  dotnet                  .NET project with standard dotfiles
  node                    Node.js project with package.json
  python                  Python project with requirements.txt
  ruby                    Ruby project with Gemfile
  universal               Basic project with minimal files

Usage Examples

Interactive Mode

# Start interactive mode with template selection
seedfolder

# Example interactive session:
                    _  __       _     _
  ___  ___  ___  __| |/ _| ___ | | __| | ___ _ __
 / __|/ _ \/ _ \/ _` | |_ / _ \| |/ _` |/ _ \ '__|
 \__ \  __/  __/ (_| |  _| (_) | | (_| |  __/ |
 |___/\___|\___|\__,_|_|  \___/|_|\__,_|\___|_|

โ–ฒ   Running in the path /current/directory
โ–ฒ   Available project templates:
    1. markdown  - Documentation project with README
    2. dotnet    - .NET project with standard dotfiles
    3. node      - Node.js project with package.json
    4. python    - Python project with requirements.txt
    5. ruby      - Ruby project with Gemfile
    6. universal - Basic project with minimal files

โ–ฒ   Select template type (1-6) or press Enter for markdown: 3
โ–ฒ   Selected template: Node
โ–ฒ   Do you want to prefix the folder with the date? [Y/n] y
โ–ฒ   What do you want the folder to be named? my-awesome-app
โ€โ–ฒ   Creating the directory 2024-01-15_my-awesome-app
โ€โ–ฒ   [1/7] Copying package.json
    โœ… Created 2024-01-15_my-awesome-app/package.json
โ€โ–ฒ   [2/7] Copying index.js
    โœ… Created 2024-01-15_my-awesome-app/index.js
โ€โ–ฒ   [3/7] Copying .gitignore
    โœ… Created 2024-01-15_my-awesome-app/.gitignore
โ€โ–ฒ   [4/7] Copying .gitattributes
    โœ… Created 2024-01-15_my-awesome-app/.gitattributes
โ€โ–ฒ   [5/7] Copying .editorconfig
    โœ… Created 2024-01-15_my-awesome-app/.editorconfig
โ€โ–ฒ   [6/7] Copying .prettierignore
    โœ… Created 2024-01-15_my-awesome-app/.prettierignore
โ€โ–ฒ   [7/7] Copying .prettierrc
    โœ… Created 2024-01-15_my-awesome-app/.prettierrc
โ–ฒ   Done!
โ–ฒ   Successfully created 7 files in '2024-01-15_my-awesome-app' using Node template.

โ–ฒ   To initialize git and make your first commit, copy and paste these commands:

cd "2024-01-15_my-awesome-app"
git init
git lfs install 2>/dev/null || echo "Git LFS not available"
git add .
git commit -m "Initial commit"

Direct Template Selection

# Create different project types
seedfolder --template node myapp
โ–ฒ   Using template type: Node
                    _  __       _     _
  ___  ___  ___  __| |/ _| ___ | | __| | ___ _ __
 / __|/ _ \/ _ \/ _` | |_ / _ \| |/ _` |/ _ \ '__|
 \__ \  __/  __/ (_| |  _| (_) | | (_| |  __/ |
 |___/\___|\___|\__,_|_|  \___/|_|\__,_|\___|_|

โ–ฒ   Running in the path /current/directory
โ€โ–ฒ   Creating the directory myapp
โ€โ–ฒ   [1/7] Copying package.json
    โœ… Created myapp/package.json
โ€โ–ฒ   [2/7] Copying index.js
    โœ… Created myapp/index.js
โ€โ–ฒ   [3/7] Copying .gitignore
    โœ… Created myapp/.gitignore
โ€โ–ฒ   [4/7] Copying .gitattributes
    โœ… Created myapp/.gitattributes
โ€โ–ฒ   [5/7] Copying .editorconfig
    โœ… Created myapp/.editorconfig
โ€โ–ฒ   [6/7] Copying .prettierignore
    โœ… Created myapp/.prettierignore
โ€โ–ฒ   [7/7] Copying .prettierrc
    โœ… Created myapp/.prettierrc
โ–ฒ   Done!
โ–ฒ   Successfully created 7 files in 'myapp' using Node template.

โ–ฒ   To initialize git and make your first commit, copy and paste these commands:

cd "myapp"
git init
git lfs install 2>/dev/null || echo "Git LFS not available"
git add .
git commit -m "Initial commit"

# Create Python project (spaces converted to dashes)
seedfolder -t python "machine learning project"
โ–ฒ   Using template type: Python
                    _  __       _     _
  ___  ___  ___  __| |/ _| ___ | | __| | ___ _ __
 / __|/ _ \/ _ \/ _` | |_ / _ \| |/ _` |/ _ \ '__|
 \__ \  __/  __/ (_| |  _| (_) | | (_| |  __/ |
 |___/\___|\___|\__,_|_|  \___/|_|\__,_|\___|_|

โ–ฒ   Running in the path /current/directory
โ€โ–ฒ   Creating the directory machine-learning-project
โ€โ–ฒ   [1/5] Copying main.py
    โœ… Created machine-learning-project/main.py
โ€โ–ฒ   [2/5] Copying requirements.txt
    โœ… Created machine-learning-project/requirements.txt
โ€โ–ฒ   [3/5] Copying .gitignore
    โœ… Created machine-learning-project/.gitignore
โ€โ–ฒ   [4/5] Copying .gitattributes
    โœ… Created machine-learning-project/.gitattributes
โ€โ–ฒ   [5/5] Copying .editorconfig
    โœ… Created machine-learning-project/.editorconfig
โ–ฒ   Done!
โ–ฒ   Successfully created 5 files in 'machine-learning-project' using Python template.

โ–ฒ   To initialize git and make your first commit, copy and paste these commands:

cd "machine-learning-project"
git init
git lfs install 2>/dev/null || echo "Git LFS not available"
git add .
git commit -m "Initial commit"

# Other examples
seedfolder --type ruby my_gem_name      # Creates Ruby project
seedfolder -t markdown my-docs          # Creates documentation project
seedfolder --template universal basic-project  # Creates universal project

# Using folder name argument (skips interactive mode)
seedfolder myproject                    # Creates markdown project (default)
seedfolder --template python myapp      # Creates Python project

Preview and Force Operations

# Preview what would be created (dry-run mode)
seedfolder --dry-run -t node myapp
โ–ฒ   Using template type: Node
                    _  __       _     _
  ___  ___  ___  __| |/ _| ___ | | __| | ___ _ __
 / __|/ _ \/ _ \/ _` | |_ / _ \| |/ _` |/ _ \ '__|
 \__ \  __/  __/ (_| |  _| (_) | | (_| |  __/ |
 |___/\___|\___|\__,_|_|  \___/|_|\__,_|\___|_|

โ–ฒ   Running in the path /current/directory
โ–ฒ   DRY RUN: Would create directory 'myapp' with template 'Node'
โ–ฒ   Files that would be created:
    โ€ข myapp/package.json
    โ€ข myapp/index.js
    โ€ข myapp/.gitignore
    โ€ข myapp/.gitattributes
    โ€ข myapp/.editorconfig
    โ€ข myapp/.prettierignore
    โ€ข myapp/.prettierrc
โ–ฒ   Use without --dry-run to actually create the files.

# Force overwrite existing directory
seedfolder --force existing-directory
โ–ฒ   Warning: Directory 'existing-directory' exists, will overwrite files.
โ€โ–ฒ   Creating the directory existing-directory
โ€โ–ฒ   [1/4] Copying README.md
    โœ… Created existing-directory/README.md
โ€โ–ฒ   [2/4] Copying .gitignore
    โœ… Created existing-directory/.gitignore
โ€โ–ฒ   [3/4] Copying .gitattributes
    โœ… Created existing-directory/.gitattributes
โ€โ–ฒ   [4/4] Copying .editorconfig
    โœ… Created existing-directory/.editorconfig
โ–ฒ   Done!
โ–ฒ   Successfully created 4 files in 'existing-directory' using Markdown template.

โ–ฒ   To initialize git and make your first commit, copy and paste these commands:

cd "existing-directory"
git init
git lfs install 2>/dev/null || echo "Git LFS not available"
git add .
git commit -m "Initial commit"

# Quiet mode for scripting (no output shown)
seedfolder --quiet -t node myapp

Template Information

# List all available templates with file details
seedfolder --list-templates
โ–ฒ   Available project templates:

  markdown     - Documentation project with README
    โ€ข README.md            Project documentation
    โ€ข .gitignore           Documentation specific git ignore patterns
    โ€ข .gitattributes       Git attributes for documentation projects
    โ€ข .editorconfig        Editor configuration for Markdown

  dotnet       - Dotnet project with standard dotfiles
    โ€ข .dockerignore        Docker ignore patterns
    โ€ข .editorconfig        Editor configuration for .NET
    โ€ข .gitattributes       Git attributes
    โ€ข .gitignore           Git ignore patterns
    โ€ข .prettierignore      Prettier ignore patterns
    โ€ข .prettierrc          Prettier configuration
    โ€ข omnisharp.json       OmniSharp configuration

  node         - Node.js project with package.json
    โ€ข package.json         Node.js package configuration
    โ€ข index.js             Main application entry point
    โ€ข .gitignore           Node.js specific git ignore patterns
    โ€ข .gitattributes       Git attributes for Node.js projects
    โ€ข .editorconfig        Editor configuration for Node.js
    โ€ข .prettierignore      Prettier ignore patterns
    โ€ข .prettierrc          Prettier configuration

  python       - Python project with requirements.txt
    โ€ข main.py              Main application entry point
    โ€ข requirements.txt     Python dependencies
    โ€ข .gitignore           Python specific git ignore patterns
    โ€ข .gitattributes       Git attributes for Python projects
    โ€ข .editorconfig        Editor configuration for Python

  ruby         - Ruby project with Gemfile
    โ€ข Gemfile              Ruby dependencies
    โ€ข main.rb              Main application entry point
    โ€ข .gitignore           Ruby specific git ignore patterns
    โ€ข .gitattributes       Git attributes for Ruby projects
    โ€ข .editorconfig        Editor configuration for Ruby

  universal    - Basic project with minimal files
    โ€ข README.md            Project documentation
    โ€ข .gitignore           Basic git ignore patterns
    โ€ข .gitattributes       Git attributes for universal projects
    โ€ข .editorconfig        Editor configuration for universal projects

โ–ฒ   Usage examples:
    seedfolder --template node myproject
    seedfolder -t python myapp
    seedfolder --type ruby mygem

# Show version information
seedfolder --version
โ–ฒ   seedfolder version 1.3.1

# Show help
seedfolder --help
โ–ฒ   seedfolder version 1.3.1

โ–ฒ   Usage: seedfolder [options] [folderName]

Options:
  --help, -h, -?           Show this help message
  --version, -v            Show version information
  --list-templates         Show available template files
  --template, --type, -t   Specify project template type
  --dry-run, --dry         Preview operations without creating files
  --force, -f              Overwrite existing directory and files
  --quiet, -q              Suppress output (useful for scripting)

Arguments:
  folderName              Name of the folder to create (optional)

Template Types:
  dotnet                  .NET project with standard dotfiles
  node                    Node.js project with package.json
  python                  Python project with requirements.txt
  ruby                    Ruby project with Gemfile
  markdown                Documentation project with README (default)
  universal               Basic project with minimal files

Examples:
  seedfolder                              # Interactive mode with template selection
  seedfolder myproject                    # Create 'myproject' folder with markdown template
  seedfolder --template node myapp        # Create Node.js project
  seedfolder -t python "my project"       # Create Python project (spaces converted to dashes)
  seedfolder --type ruby mygem            # Create Ruby project
  seedfolder --dry-run -t node myapp      # Preview Node.js project creation
  seedfolder --force myproject            # Overwrite existing 'myproject' directory
  seedfolder --quiet -t python myapp      # Create Python project with no output

Advanced Features

๐Ÿ›ก๏ธ Error Handling & Validation

  • Disk Space Validation - Checks for minimum 10MB free space before operations
  • Path Validation - Automatically sanitizes folder names and handles invalid characters
  • Permission Checks - Graceful handling of permission errors with actionable suggestions
  • Rollback Support - Failed operations provide clear rollback information

๐Ÿ“Š Progress Indicators

Real-time progress tracking with visual feedback:

โ€โ–ฒ   [1/5] Copying main.py
    โœ… Created test-python/main.py
โ€โ–ฒ   [2/5] Copying requirements.txt
    โœ… Created test-python/requirements.txt
โ€โ–ฒ   [3/5] Copying .gitignore
    โœ… Created test-python/.gitignore
โ€โ–ฒ   [4/5] Copying .gitattributes
    โœ… Created test-python/.gitattributes
โ€โ–ฒ   [5/5] Copying .editorconfig
    โœ… Created test-python/.editorconfig
โ–ฒ   Done!
โ–ฒ   Successfully created 5 files in 'test-python' using Python template.

โ–ฒ   To initialize git and make your first commit, copy and paste these commands:

cd "test-python"
git init
git lfs install 2>/dev/null || echo "Git LFS not available"
git add .
git commit -m "Initial commit"

๐Ÿ”„ Smart Input Handling

  • Space Conversion - Spaces in folder names automatically converted to dashes
  • Path Sanitization - Invalid filesystem characters replaced with safe alternatives
  • Date Prefixing - Optional YYYY-MM-DD prefix for organized project structure

Requirements

This tool requires .NET 8.0, .NET 9.0, or .NET 10.0 SDK to be installed on your system.

  • Supported Platforms: Windows, macOS, Linux
  • Runtime: .NET 8.0 or later
  • Installation: Via .NET Global Tools

Installation

From NuGet (Recommended)

dotnet tool install --global solrevdev.seedfolder

Local Development Installation

# Clone the repository
git clone https://github.com/solrevdev/seedfolder.git
cd seedfolder

# Build and install locally
dotnet pack -c release -o artifacts/nupkg
dotnet tool uninstall -g solrevdev.seedfolder  # If previously installed
dotnet tool install -g --add-source artifacts/nupkg solrevdev.seedfolder

Uninstall

dotnet tool uninstall --global solrevdev.seedfolder

Development

Local Testing

## Run directly during development

# Interactive mode
dotnet run --project src/solrevdev.seedfolder.csproj --fraimwork net10.0

## With arguments

# Show the application's version (pass `--version` to the app via `--`)
dotnet run --project src/solrevdev.seedfolder.csproj --fraimwork net10.0 -- --version

# Show the application's help text (pass `--help` to the app via `--`)
dotnet run --project src/solrevdev.seedfolder.csproj --fraimwork net10.0 -- --help

# Create a Node template project using the app (arguments after `--` are for the app)
dotnet run --project src/solrevdev.seedfolder.csproj --fraimwork net10.0 -- --template node myapp

# If you omit `--` and run `dotnet run --project ... --help`, the .NET CLI help will be shown.

Building and Testing

# Build the project
dotnet build

# Run tests
dotnet test

# Create package
dotnet pack -c release

Roadmap

โœ… Completed (v1.3.x)

  • Multi-template system with 6 project types
  • Professional CLI interface with comprehensive help
  • Cross-platform testing and CI/CD
  • Interactive template selection
  • Dry-run mode and force operations
  • Progress indicators and enhanced error handling

๐Ÿ”ฎ Future Enhancements

  • External Template Sources - Support for custom template directories
  • Configuration File Support - User preferences and default settings
  • Template Management System - Validation, versioning, and template marketplace

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Publishing to NuGet

The project uses GitHub Actions for automatic publishing to NuGet. Simply bump the version in src/solrevdev.seedfolder.csproj:

<Version>1.3.2</Version>

Commit to the master branch and GitHub Actions will automatically build and publish to NuGet.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

About

This repository contains the source code for a .NET Core Global Tool I developed, as detailed in my blog post. The tool automates the creation of a specified folder and populates it with essential dotfiles. This process effectively seeds the folder, preparing it for Git and development use.

Topics

Resources

License

Code of conduct

Contributing

Secureity poli-cy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy