GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 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.

BranchesTags
Open more actions menu

Latest commit

 

History

145 Commits
145 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
build
build
 
 
docs
docs
 
 
samples
samples
 
 
src
src
 
 
tests
tests
 
 
.dockerignore
.dockerignore
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc
.prettierrc
 
 
AGENTS.md
AGENTS.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
global.json
global.json
 
 
solrevdev.seedfolder.sln
solrevdev.seedfolder.sln
 
 

Repository files navigation

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 the .NET 10.0 SDK or later to be installed on your system. .NET 11 is used when present.

  • Supported Platforms: Windows, macOS, Linux
  • Runtime: .NET 10.0 or later
  • Older runtimes: From 1.7.0 the tool no longer targets .NET 8 or .NET 9, which left support on 10 November 2026. A machine with only .NET 8 or .NET 9 cannot install new releases. Install .NET 10 or later, or pin version 1.6.2.
  • 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 --framework net10.0

## With arguments

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

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

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

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

SDK policy

global.json pins SDK 10.0.100 with rollForward: latestMajor, so .NET 10 (LTS) is the baseline and the newest installed SDK is used. With SDK 11 installed the project builds net10.0 and net11.0. With only SDK 10 it builds net10.0 alone, because TargetFrameworks adds net11.0 only when NETCoreSdkVersion is 11.0 or later. CI installs both SDKs, so the published package always holds both targets.

Building and Testing

# Build the project
dotnet build

# Run the integration tests for each target framework
./tests/integration-test.sh net10.0
./tests/integration-test.sh net11.0  # needs SDK 11

# 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

  • šŸ› Issues: GitHub Issues
  • šŸ’¬ Discussions: GitHub Discussions
  • 🐦 Twitter: @solrevdev

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.

solrevdev.com/2020/10/05/creating-a.net-core-global-tool.html

Topics

csharpdotfilesdotnetdotnet-global-tooldotnet-global-toolsdotnetcoredotnetcore3-1git-tools

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

9 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.