Giter Site home page Giter Site logo

proji-rocks / proji Goto Github PK

View Code? Open in Web Editor NEW
196.0 4.0 13.0 28.61 MB

A powerful cross-platform project templating tool.

License: MIT License

Go 98.58% Makefile 1.03% Lua 0.31% Python 0.07%
go golang project scaffolding templating structure cli productivity tool command-line cross-platform

proji's Introduction

proji logo

codecov Go Report Card Maintainability go.dev reference

A powerful cross-platform CLI project templating tool.


Quick proji demo


Key Features

  • Creates project directories of any size in seconds
  • Project templates are based on individual config files
  • Structures of GitHub/GitLab repos can be imported as templates
  • Structures of directories can be imported as templates
  • Infinitely extendable through integration of custom shell scripts
  • Supports custom template files
  • Shareable project configs
  • Projects are not bound to any language or framework
  • Boosts your productivity and simplifies your workflow
  • Works on Windows, macOS and Linux

Project Status

Proji is currently in an advanced stage of heavy refactoring. The current default branch is not stable and should not be used in production. The new version will be released soon.

proji's People

Contributors

nikoksr avatar dependabot[bot] avatar pfayle avatar

Stargazers

i33 avatar Jonathan Poczatek avatar Zhambyl Yermagambet avatar ismet bayandur avatar Daniel Bodnar avatar Michael Mbah avatar René Kuhn avatar  avatar  avatar  avatar Kevin Nguyen avatar Ivan Robles avatar Josh Klein avatar Kyle Summers avatar alaska avatar ged avatar Francisco Gálvez avatar Jan Möller avatar Abhishek Nambiar avatar Ender CAN avatar Erdal TAŞKESEN avatar Artur Gurov avatar Irfan Sofyana Putra avatar Budi Prakosa a.k.a Iyok avatar Radek Tomšej avatar Ricky Wu avatar Shadab Zafar avatar Tenvi avatar sheldonhull avatar Digital Grey Hat  avatar Aarmn the limitless avatar Carlos Amorim avatar Rodrigo Oliveira avatar  avatar Marco Ponton avatar Azat Akhmetov avatar Kostiantyn Kharalampidi avatar Cat  avatar Nijat Mahmudov avatar  avatar John Gosset avatar Marvin Heimbrodt avatar  avatar Taylor Mulder avatar Erik Osterman (CEO @ Cloud Posse) avatar chliu avatar Kenny Chen avatar Doru Carastan avatar  avatar  avatar Vilhelm Bergsøe avatar Clément Lafont avatar Felix Mohr avatar Aaron Massey avatar Martin Kinoo avatar Nikita avatar Ana Gelez avatar KokaKiwi avatar Clemens Radermacher avatar Akira Komamura avatar Ben Drucker avatar Adam Rahwane avatar Maninder avatar Yevhenii Hyzyla avatar Tony Kappen avatar  avatar Kevin Oliveira avatar Aurélien Rivet avatar Zs. Csaba Sz. avatar Marcus avatar Hagai Har-Gil avatar  avatar Adan Alvarado avatar iain wright avatar Luciano Nooijen avatar Oleg Pykhalov avatar Conner Crosby avatar Aloys avatar Roman Tezikov avatar Caleb Denio avatar Caleb Hagner avatar Ramene Anthony avatar Michal Kijowski avatar armaank avatar GaryNg avatar Sagi Sarussi avatar Lubomir Anastasov avatar Montana Flynn avatar Matthew Laird avatar Nimish Bongale avatar Antonio Villamarin avatar Jan Meischner avatar Pascal Martineau avatar  avatar K̶e̶v̶i̶n̶ avatar Alihan avatar Eugene Pisarchik avatar Matt C avatar Alex Kreidler avatar Alexandre Faustino avatar

Watchers

James Cloos avatar Ricky Wu avatar  avatar  avatar

proji's Issues

Switch from python to golang

Switching to golang out of personal reasons. Learning go atm and trying to become better at it. This will be my first go project.

Proji create: __PROJECT_NAME__ created two folders

I added a new class (golang maybe it's still in the database) and assigned it a folder cmd/__PROJECT_NAME__.
After running the command proji create go testProj proji created a correctly the subfolder cmd/testProj but additionally and falsely the subfolder cmd/__PROJECT_NAME__.

Move my templates to an example folder

Move my personal templates to a example folder in the proji config folder. When proji gets installed there should be an empty template folder.

Maybe add a command flag like proji class add --from-example cpp which would copy my cpp class to the templates folder.

Add a class remove command

Create the opposite of #6. Enable user to remove classes from the database.

Should be like:

proji class remove myClassName

Improve project management

Add functions that allow the user to load, remove update and change the status of projects. Currently only the project creation is supported.

Build script

Add a build script which automatically builds the project for a set of platforms and architectures.

Keep track of projects

Created projects could be added to the database in the table project. Should keep track of name, class, location and creation date.

A command like proji status could check the status of all active projects.

'Class import' imports non toml files

Class import command imports non toml files, creates a empty class and returns success.

Check if given file is toml and check if toml file meets proji config criteria. Respond with an error if not.

Add 'cd' command

Add a cd like command which lets the user quickly change into a project directory.

Export/import class from database

Create an option to export and import the setup of specified class from the sqlite database.
Export it to json or something along those lines.

Enables useres to share setups/configs.

Windows and Mac support

Functions that use system paths would currently not work under windows. Think about implementing windows support.

Question is, if it's worth the effort.

Clean up storage interface

Storage interface feels bloated and some functions seem pretty redundant. Simplify and clean up the code.

Create class from stdout of command like ls

Pipe the output of a listing program like ls in this program (maybe with a flag) and create a new class from it in the database.

e.g.: ls -a | proji class add --from-stdout <name>

Fix travisci tests

Travis fails to build the application because it can't find the necessary database containing languages, folder etc. Currently the database is only available on my local machine.

Have to edit travis.yml and tell it to deploy the database.

Improve errors

In some functions before returning to the caller the last action is to execute another function, receive a potential error, check if an error occurred and return the error if so. If no error occurred just return nil. Simplified version with the same result would be to return the result of the last function directly without evaluating it.

Looks like this:

err := someFunc()
if err != nil {
    return err
}
return nil

Should look like this:

return someFunc()

Scripts don't work interactively

When a script like init_git.sh is being executed the output and input of the script isn't piped to proji thus the script just executes and the user is not able to interact with the running script.

Fix sql unique index constraints

The unique constraints for the tables class_folder and class_file are not set up properly.
The unique index should be between project_class_id and target_path, currently it's the target_path and the template_name which results in the possibility to create multiple files or folders with the same target_path.

Now, changing the index accordingly would result in a problematic situation for globals. If the index is between project_class_id and target_path it is possible to create duplicate target paths because there might be a target path testPath which would be assigned to a project_class_id` but there might be the same target path assigned to a global. This doesn't hurt the unique constraint because the global and class don't share the same id.

Possible solution is to export the globals into separate tables.

Integrate variables into sqlite

Problem:
It's currently not supported to dynamically create folders or files based on for example the name of the project that's currently being created. In python it's not untypical to name the folder containing most of the source code after the project itself. So the project test-py should contain a folder named test-py. This behaviour is currently not supported.

Possible solution:
Add key words to the cell values in the sqlite database. Currently for example the target_path column in the folder table would contain a cell with the value src/. And to make this value dynamic add recognizable key words like __PROJECT_NAME__. So this would result in a cell value of src/__PROJECT_NAME__. And the key word could be replaced with the actual project name during runtime. Regex for example could search for occurrences of these key words and replace them accordingly.

ReadMe

Write a good and modern readme.

Add setup script

Add a script that installs the application. It has to create the config folder, deploy the database, and put the app in a folder like /usr/bin.

Integrate go routines

Currently proji runs in a single go routine. It would be useful in certain areas to improve performance by using multiple go routines. For example, when creating files and directories or importing multiple configs.

Add 'add' command

Creating of projects is now possible. What's missing is the individualization. Add an 'add' command which makes it possible for the user to add classes to the database.

Export class doesn't show file name

When exporting a class the export process itself is successful but the info message doesn't print the name of the exported file.

Actual: Class python was successfully exported to file .
Expected: Class python was successfully exported to file proji-python.toml.

Add proji command 'global'

global command should have a similar functionality like the class command.
With global the user should be enabled to add new globals - files, folders and scripts that do not belong to any specific class and are always included or executed.

Example:

proji global add --folder new-folder/
proji global add --file new-main.prj
proji global add --script new-script.sh

Add 'clean' command

Add a clean command that iterates over the projects list and checks for dead project paths, missing statuses and such.

Prettify console output

Colorize errors red, colorize project names, success messages.. etc
Package: aurora

Maybe add tables of some form likely for commands that display data like class show/ls.
Package: tabby

Add a config

Add a general config file.

Possible options so far:

  • config directory
  • default editor

Change cli argument order

Change cli argument order from create_project <project_name> <language> to create_project <language> <project_name>.

Less annyoing when creating new projects with the same language.

Add 'class' 'import/export' subcommands

Import a class config from a config file(probably toml). And export existing classes to a config file. Enables users to share class configs.

Replaces add --from-file flag in #6.

Refactor everything

Use tools like staticcheck and safesql to check for possible improvements. Look for duplicate code manually and with help from tools like dupl.

Database: Label unique index

Currently the unique index for the table class_label is between the columns project_class_id and label. This allows different classes to have equal labels which is problematic since proji creates new projects based on a given label. If a label is shared between to classes, proji won't now which class to choose.

The unique index should only be on the label column granting that every label is unique and labels can't be shared between classes.

Change name 'class' to 'template'

Change the name class to template. Template describes better what the purpose of this function group is.

Old: proji class add myClass
New: proji template add myTemplate

Write go unittests

Transition from python to go is mostly done. Only thing missing are the unittests and circleci integration.

Track more data

Think about tracking more use stats like the calls of a specific class, project creation date..
With this data you could draw interesting usage graphs or calculate how much time the user has saved by using proji.

Make sql queries more stable

Make the sql queries more stable by regulating the user input. For example make all labels and class names lowercase before inserting or querying.

Allow simultaneous creation of multiple projects

The cli argument for the project_name may become a list instead of a string which would allow iterating over and creating multiple project names in one command. Otherwise the whole command needs to be executed multiple times with different project names.

Example old style:
create_project cpp proj1
create_project cpp proj2
create_project cpp proj3

Example new style:
create_project cpp proj1 proj2 proj3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.