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.
($VISUAL
variable set to nvim
for Neovim)
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. For example, if you have a cpp
template for C++, you
would run
atmpt cpp
Afterwards, whatever you have set as your $VISUAL
environment variable will be run in the new directory.
Ensure you have Rust installed.
You can install from crates.io
using cargo
:
cargo install atmpt
Or you can build manually; After cloning this repo, cd
into it and install by
running:
cargo install --path .
Both of the methods above should place atmpt
in $HOME/.cargo/bin
, but you
will not have any templates. You may either create them in the data directory,
or you could use the default ones included in this repo (example given for
Unix-like systems e.g. Linux or MacOS):
mkdir -p $(atmpt -d)
cp -r templates/* $(atmpt -d)
Additionally, autocompletion files for several shells are created in cargo's
$OUTDIR
directory, which should have been printed out by cargo during
compilation, something like: ./target/release/build/atmpt-<hash>/out/
. These
should be placed in your respective shell's autocompletion directory, for
example, zsh
reads completion files from any directory in your $fpath
environment variable.
Many times above you may have seen talk about a data directory, this is where your templates should be stored, but is dependent on the OS. Therefore, Atmpt offers an option to print it out on your system (you may have seen its output be used in the installing section):
atmpt --list-template-dir
(This option can be shortened to -d
, as seen in examples)
In the printed directory you may put folders for atmpt to clone as temporary projects when run with their name as input.
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.