sht / short / 🩳

Crate linux osx dicord dicord

A concise cli launcher / project manager using env files.

The main goal it's readability and time saving with commands use in your project. Short it's command-line tool that allow to run program (usually sh script) with environment variables mapping from .env files. It take care to synchronize and to check the format of all env files to each others. Allow to store critical environment files in private paths that not shared in the project source code. You can apply a mapping in order to select, group and add custom format / cases on the fly on the variables. The result of mapping will be inject as environment variables in the output .sh script that will be executed.

short global workflow


It's include an index/registry that allow to share project templates: 🎁 template-index.

Install

cargo install short

Configure prompt

✨ PS1

Example with PS1 configure by .bashrc

shell script export PS1="$(sht show -f):\w\$ "

✨ starship

Example with custom pre-prompt : starship.

Here the custom script that starship run before display prompt.

```shell script

!/bin/bash

function blastoff(){ sht show -f } starshipprecmduser_func=blastoff ```

Quick start with template

Generate an simply aws sam project base on this template aws-node-sam.

Requirement : You have installed SAM and AWS_CLI.

$> sht init $> sht generate aws-node-sam -d -t $> sht run

Quick start blank

Generate a simply bash script who display variables. You can use this base for do as you want.

$> sht init $> sht generate setup_1 test $> sht run


⚠️ wip ...

Help

``` USAGE: sht [SUBCOMMAND]

FLAGS: -h, --help Prints help information -V, --version Prints version information

SUBCOMMANDS: init Init project, create an empty "short.yaml" configuration file. generate Generate empty setup or from template setup repository. run Run setup [ARGS...]. rename Rename setup. new Create env file ".", in public directory by default. sync Sync env files. edit Edit env file. dir Public env directory, [.] by default. pdir Private env directory, unset by default. show Show your current setup. use Switch of current setup or/and environment. ls Display setups and environments available. vars Display mapping environment variables. envs Display environment variables. help Prints this message or the help of the given subcommand(s) ```