Package: newproject-cli
new-project-cliDescriptionRequirementsInstallationUsageCustomizationRoadmapContributingDescriptionCreate a new project from the terminal.This tool will help you create a minimal structure for your new project.You can create new:Bash projectsC projectsCpp projectsGo projectsJava projectsLua projectsOCaml projectsPHP projectsPython projectsRuby projectsRust projectsVlang projectsWeb projects (html, css, javascript)and open them in:Visual Studio CodePyCharmIntelliJ IDEAWhy these programming languages?I mainly based myself on the percentages reported byStackoverflow's 2023 Developer Surveyfor the"Programming, scripting, and markup languages"section, and I selected the most used languages and those
that I consider to be the most promising or interestingDefault development directories tree$HOME
└──Developer
   └── projects
       ├── bash_projects
       ├── c_projects
       ├── cpp_projects
       ├── go_projects
       ├── java_projects
       ├── lua_projects
       ├── ocaml_projects
       ├── php_projects
       ├── python_projects
       ├── ruby_projects
       ├── rust_projects
       ├── vlang_projects
       └── web_projectsProjects created via commandsE.g: To create a new Rust project, newproject use the following command:$cargonewproject_nameSo it use the default command to create a new cargo package.The same is for Ruby, OCaml and Vlang.RequirementsPython >= 3.10pipTo create a Rust projectsRustTo create a Ruby projectsRubybundlerTo create a OCaml projectsOCamlduneInstallationEasy as you can see here:$pipinstallnewproject-cliPlease note: After installing newproject with pip if you have not added ~/.local/bin (macOS/Linux) to $PATH you will be
asked to do so with a warning that should look like this:WARNING: The script newproject is installed in '/home/ubuntu/.local/bin' which is not on PATH.Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.UsageCreate a new python project$newproject--pythonproject_nameCreate a new web project$newproject--webproject_nameThis command will create a very simple web project with this structure:project_name
├── README.md
├── index.html
├── scripts
│   └── index.js
└── styles
    └── style.cssCreate a new project and open it in Visual Studio CodeWARNING: In order to open the new project in your favorite IDE you need to have the shell command$newproject--code--pythonproject_nameCustomizationThe default yaml config file is located in site_packagesHow can I find the default config file?$pip3shownewproject-cliName: newproject-cliVersion: 0.x.xSummary: A command-line tool to create new projectsHome-page: https://github.com/utox39/new-project-cliAuthor: utox39Author-email: francescomoccaldi39@gmail.comLicense: MITLocation: path/to/site-packages <-- LOOK HERERequires: jsonschema, pyyaml, rich, typer, typing_extensionsRequired-by:$cdpath/to/site-packages/newproject/configYAML config file in ~/.config/newproject (macOS/Linux only)The default configuration file is located in the site_packages folder, but you can also use a configuration file that
you
can create in the ~/.config/newproject folder.ATTENTION: Using this config file does not involve updating to the latest features involving the default
config file (located in the site_packages), therefore it requires manual interventionLet's see how you can do it:Create the configuration folder and the YAML config file$cd~/.config$mkdirnewproject$touchnewproject_config.yamlOpen the YAML file in your editor of choiceCopy the contents
ofthisfile into the
YAML fileDoneCustomize the Development folderIn newproject_config.yaml:development_dir_path:path/to/your/development/folder/E.g:development_dir_path:Documents/projects/Customize a programming language projects folderIn newproject_config.yaml:project_folder_names:python_projects_dir_name:python_projectsCustomize a programming language file contentIn newproject_config.yaml:You can customize the content of the files only of the following programming languages:BashCCppGoJavaLuaPHPPythonWeb projects (html, css, javascript)cpp:file_content:|#include <iostream>int main(){std::cout<<"hello world"<<'\n';return 0;}Customize the .gitignore for a specific programming languageIn newproject_config.yaml:You can customize the content of the .gitignore only of the following programming languages:BashCCppGoJavaLuaPHPPythonWeb projects (html, css, javascript)python:gitignore_content:|DS_Store.env.vscode/.idea/test/venv/Customize the default .gitignoredefault_gitignore_content:|.DS_Store.env.vscode/.idea/test/foo/RoadmapImprove customizationAdd more programming languagesAdd more IDEImprove user output and experiencePublish this project to package managersContributingIf you would like to contribute to this project just create a pull request which I will try to review as soon as
possible.