Skip to content

Easily create a temporary project in your favorite language and open it in your $VISUAL env variable.

License

Notifications You must be signed in to change notification settings

marcelohdez/atmpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atmpt

Pronounced attempt, atmpt is a simple CLI program which lets you quickly create a temporary project and open it in your chosen $VISUAL environment variable.

This makes testing some quick lines of code easy without having to open a new replit or creating a new project with boilerplate yourself.

Showcase

($VISUAL variable set to nvim for Neovim)

asciicast

Running

After installing, you may run

atmpt <TEMPLATE>

where <TEMPLATE> is the name of the folder in atmpt's data directory which you would like to clone and open with the binary set as your $VISUAL environment variable.

After your editor exits you will be asked if you would like to keep or delete the attempt (by default they are stored in your system's temporary directory, which should get deleted in time if the folder is not moved manually). If you decide to keep it, you can reopen the attempt with --previous:

atmpt -p

Whether the attempt was saved or not, you can start a new attempt with the same template with --retry:

atmpt -r

To view all options please see the help page:

atmpt --help

Installing

Important

  • Ensure you have Rust installed.
  • Unless you bring your own templates, atmpt is useless without also installing the default ones. See the templates section.

atmpt is available on crates.io:

cargo install atmpt

Or you can build manually; After cloning this repo, cd into it and if you would like cargo to install into its default directory run:

cargo install --path .

Otherwise, to place in your $PATH yourself, you can build with:

cargo build -r

With the resulting binary being ./target/release/atmpt (or atmpt.exe on Windows).

Templates

atmpt uses any folders in your data directory as templates to clone. You may install the default ones (under /templates) by running the following commands after cloning and cding into this repo (example given for MacOS/Linux):

mkdir -p $(atmpt -d)
cp -r templates/* $(atmpt -d)

Data Directory

This is where your templates will be stored but is different depending on the system. atmpt offers the --list-template-dir option to print it out on your system (you may have used it while setting up your templates):

atmpt -d

In the printed directory you may put folders for atmpt to clone as temporary projects when run with their name as input.

License

atmpt is licensed under the GPLv3, a free and open source license. For more information, please read the LICENSE file in this repositories' root directory.

About

Easily create a temporary project in your favorite language and open it in your $VISUAL env variable.

Resources

License

Stars

Watchers

Forks

Languages