Code Monkey home page Code Monkey logo

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

dependabot[bot] avatar nikoksr avatar pfayle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

proji's Issues

Add 'cd' command

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

ReadMe

Write a good and modern readme.

Write go unittests

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

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.

Add a config

Add a general config file.

Possible options so far:

  • config directory
  • default editor

'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.

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.

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 '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.

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.

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.

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 a class remove command

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

Should be like:

proji class remove myClassName

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

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.

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.

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.

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__.

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.

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.

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 'clean' command

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

Build script

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

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>

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.

Clean up storage interface

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

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

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()

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.

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

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.

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.

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.

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.

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.

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.