Skip to content

leojimenezg/psetup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psetup-logo

psetup

Go CLI tool for rapidly setting up simple project structures with customizable templates, automating directory creation and basic file generation for streamlined development workflows.

Features

  • Quick project scaffolding with predefined directory structures
  • Multi-language support for different project types (Go, Python, C++, JavaScript, etc.)
  • Template-based file generation with customizable content
  • Embedded filesystem to remove any external file dependencies
  • License integration with MIT and Apache options
  • Multiple value arguments for selecting multiple documentation types in a single command
  • Flexible documentation setup with selective generation of README, .gitignore, and license files
  • Configurable project location and naming

Installation

Note: Cross-compiled binaries are provided in the latest release for convenience but haven't been tested on all target platforms. If you encounter issues, please report them or build from source.

Option 1: Download binary (recommended)

  1. Download appropiate binary: Visit the release psetup v2.1.0 and download the binary you need.
  2. Setup:
    • Linux/macOS: Make executable with chmod +x psetup
    • Windows: Run the .exe directly
  3. Run the program:
    ./psetup -nme=my-project -rte=./ -lng=go -lic=mit -dcs=all

Option 2: Build from source

Prerequisites

Before anything else, make sure you have installed Go 1.24.X or a newer version in your system.

Steps

  1. Clone the repository: Open your prefered terminal and clone the project to your local machine.
    git clone https://github.com/leojimenezg/psetup.git
  2. Navigate into the project directory:
    cd psetup
  3. Compile and install the project:
    go install .
  4. Run the Application: Finally, execute the binary to launch the psetup program.
    psetup -nme=my-project -rte=./ -lng=go -lic=mit -dcs=all

Command-line options

Option Description Default Allowed Values
-nme Project name new-project Any string
-rte Creation path ./ Any valid path
-lng Language/Extension go py, c, java, go, cpp, lua, js, r, txt
-lic License type mit mit, apache
-dcs Documents to include all all, license, ignore, readme

Generated structure

The program may create the following project structure:

your-project/
├── src/
│   └── main.{lng}          # Main file with specified language/extension
├── tests/                  # Tests directory
├── data/                   # Data files directory
├── public/                 # Public files directory
├── README.md               # Project documentation (if requested)
├── .gitignore              # Git ignore file (if requested)
└── LICENSE                 # License file (if requested)

Templates

Embedded templates: Virtual filesystem to embed the templates in the resulting binary for complete portability.

psetup uses an embedded filesystem containing template files for consistent content generation:

  • License templates: Pre-configured MIT and Apache 2.0 licenses
  • README template: Basic project documentation structure
  • Gitignore template: Common ignore patterns for various environments

Templates are embedded directly into the binary using Go's embed package, eliminating external dependencies and ensuring the tool works anywhere without additional setup.

Notes

  • All configurations have sensible defaults for immediate usage
  • Invalid arguments fall back to default values rather than causing errors
  • The tool ensures all parent directories exist before creating files
  • As mentioned in a previous section of this file, I have compiled the project to different platforms, however, I can not guarantee they all work properly, as I haven't tested them all
  • This project has a previous version made in Lua project-basic-setup, where the problem was very strictly solved.
  • This new version was designed to be as flexible and modular as possible. Also, this was my first project made in Go, so I don't expect it to be perfect

Useful Resources

About

Go CLI tool for rapidly setting up simple project structures with customizable templates, automating directory creation and basic file generation for streamlined development workflows.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages