eazy-project icon indicating copy to clipboard operation
eazy-project copied to clipboard

Boost your development!

  • EAZY-Project - Interactive Project Generator & Manager

[[https://travis-ci.org/guicho271828/eazy-project][https://travis-ci.org/guicho271828/eazy-project.svg?branch=master]]

This used to be a fork from cl-project@fukamachi, but since almost everything is rewritten and added very much of new features, I renamed it as a new library. It is focused on the interactive features.

Now quicklisp loadable: =(ql:quickload :eazy-project)=.

  • Launching the menu from the shell

In order to use the library from the command line you have to install it from =ros install=.

#+begin_src $ ros install eazy-project $ eazy-project #+end_src

Make sure =~/.roswell/bin= is in the =PATH=. otherwise replace the second line with =ros exec eazy-project=

  • Usage

On the command line:

#+begin_src $ eazy-project # launches the main menu. $ eazy-project # starts from the project creation submenu, with the project name already set. #+end_src

On REPL:

#+BEGIN_SRC lisp ;; Add this statement in your .sbclrc / .ccl-init.lisp (ql:quickload :eazy-project.autoload)

;; To launch a menu, enter "!". ;; This is a symbol-macrolet alias to (eazy-project:launch-menu). ;; symbol "!" is imported to CL-USER when eazy-project.autoload is loaded. !

;; "!!" restores the saved lisp state (described later). !!

;; Otherwise load eazy-project and use !/!! with a package prefix (ql:quickload :eazy-project) eazy-project:! #+END_SRC

** Tutorial: Creating a project using templates

Assume you are creating a new project named "myproj". First, open the menu from a REPL or the command line.

#+BEGIN_SRC (You are now in menu EP-MAIN.) What to do next?

Here are current default configs: :SESSION.SYSTEMS = (... "fare-quasiquote") :SESSION.PACKAGE = "COMMON-LISP-USER" :LOCAL-REPOSITORY = #P"/mnt/video/guicho/repos/lisp/" :SKELETON-DIRECTORY = #P"/mnt/video/guicho/repos/lisp/eazy-project/skeleton" :AUTHOR = "Masataro Asai" :EMAIL = "[email protected]" :GIT = T :README-EXTENSION = "md" :SOURCE-DIR = "src" :TEST-DIR = "t" :TEST-SUBNAME = "test" :DELIMITER = "." :LICENSE = "LLGPL" :TEST = :FIVEAM [Condition of type EAZY-PROJECT:ASK]

Restarts: 0: [SESSION] Save/Restore the currently loaded libraries 1: [CREATE-PROJECT] Create a new project. 2: [SET-GLOBAL] Modify these default values 3: [UP] Back to the section EP-MAIN. 4: [QUIT-SESSION] Quit this session. 5: [RETRY] Retry SLIME REPL evaluation request. #+END_SRC

Noitice the several entries are already filled in, e.g., =:AUTHOR = "Masataro Asai"=, =:EMAIL = "[email protected]"=. They can be modified later in =SET-GLOBAL= submenu. The similar interactive interface shows up. To select a submenu, enter the corresponding number for the restarts (0-5) or click on each menu (on Slime REPL).

If you are satisfied with these global configurations, then select =CREATE-PROJECT=. A new menu shows up:

#+BEGIN_SRC (You are now in menu CREATE-PROJECT.) Select and enter the information, then select 'CREATE'. Current global configuration: ....

Current local configuration: (no configuration specified) [Condition of type EAZY-PROJECT:ASK]

Restarts: 0: [CREATE] Create 1: [RESET-LOCAL-CONFIG] Reset the current local config 2: [ADD-LOCAL-DEPENDENCY] Add-Local-Dependency 3: [NAME] Name ... #+END_SRC

In this submenu, you can further modify several /project-local/ configurations. Those configurations are cleared each time you enter =CREATE-PROJECT= submenu.

  • Select =NAME= to enter the name of the new project, now "myproj". (if you attempt to create a project without it, the generator complains and opens an interactive prompt).
  • You can further add the dependencies in ADD-LOCAL-DEPENDENCY submenu.
    • The project-local dependency is a dependency only for this project.

Finally, select =CREATE=. It will set up the repository, initialize the repo with git (by default. It can be disabled) and load it.

** Tutorial: Restore the Yesterday's Coding Environment

Save and restore the set of currently loaded libraries. In the main menu, select the =SESSION= submenu. (The menu items below might not reflect the latest version)

Main menu: #+BEGIN_SRC (You are now in menu EP-MAIN.) What to do next? ... ... [Condition of type EAZY-PROJECT:ASK]

Restarts: 0: [SESSION] Save/Restore the currently loaded libraries 1: [CREATE-PROJECT] Create a new project. 2: [SET-GLOBAL] Modify these default values 3: [UP] Back to the section EP-MAIN. 4: [QUIT-SESSION] Quit this session. 5: [RETRY] Retry SLIME REPL evaluation request. #+END_SRC

SESSION submenu: #+BEGIN_SRC (You are now in menu SESSION.) What to do next? [Condition of type EAZY-PROJECT:ASK]

Restarts: 0: [TOGGLE-WATCH] Watch and automatically save the session 1: [ADD-DEFAULT-SYSTEM] Add-Default-System 2: [SAVE] Save the current loaded session 3: [ABORT] Return to sldb level 1. 4: [UP] Back to the section EP-MAIN. 5: [QUIT-MENU] Quit this eazy-project menu. #+END_SRC

Then, SAVE or RESTORE the current session. SAVE will store the current =package= and =asdf:already-loaded-systems= to a persistent database. RESTORE will restore the saved session. Finally, TOGGLE-WATCH will initiate watching in a background thread which periodically check and save the session.

** TODO Using Programatically

Although it is possible, the interface is not documented not structured very well. For automated testing, I'm using =simulate-menu-selection=, but please don't use it. For such a purpose, use =cl-project=.

#+BEGIN_SRC lisp (simulate-menu-selection `((eazy-project::create-project) (:name "test") (eazy-project::create))) #+END_SRC

I plan to separate the interactive interface as an independent library in the near future.

** TODO Skeletons

Skeleton of the new project is currently not customizable, unlike original =cl-project=.