Crates.io | atmpt |
lib.rs | atmpt |
version | 0.2.0 |
source | src |
created_at | 2024-01-15 02:58:44.730605 |
updated_at | 2024-02-19 02:09:31.223812 |
description | Attempt quick, temporary code projects |
homepage | https://github.com/marcelohdez/atmpt |
repository | |
max_upload_size | |
id | 1100016 |
size | 68,831 |
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.
Currently the only installation method, ensure you have Rust installed.
After cloning this repo, cd
into it and install by running:
cargo install --path .
This 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.