Go CLI tool for rapidly setting up simple project structures with customizable templates, automating directory creation and basic file generation for streamlined development workflows.
- 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
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.
- Download appropiate binary: Visit the release psetup v2.1.0 and download the binary you need.
- Setup:
- Linux/macOS: Make executable with
chmod +x psetup - Windows: Run the
.exedirectly
- Linux/macOS: Make executable with
- Run the program:
./psetup -nme=my-project -rte=./ -lng=go -lic=mit -dcs=all
Before anything else, make sure you have installed Go 1.24.X or a newer version in your system.
- Clone the repository:
Open your prefered terminal and clone the project to your local machine.
git clone https://github.com/leojimenezg/psetup.git
- Navigate into the project directory:
cd psetup - Compile and install the project:
go install . - Run the Application:
Finally, execute the binary to launch the psetup program.
psetup -nme=my-project -rte=./ -lng=go -lic=mit -dcs=all
| 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 |
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)
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.
- 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
- Go Documentation - Official Go programming language documentation
- Go embed Package - Official Go embed package documentation
- argparse Documentation - Detailed argparse package documentation
- itemgen Documentation - Detailed itemgen package documentation