An open API service indexing awesome lists of open source software.

https://github.com/pigeonposse/pigeonsh

βš‘οΈπŸ—ƒ Centralize your server scripts in a single folder and run them using a command.
https://github.com/pigeonposse/pigeonsh

cli javascript sh shell-scripts

Last synced: 4 months ago
JSON representation

βš‘οΈπŸ—ƒ Centralize your server scripts in a single folder and run them using a command.

Awesome Lists containing this project

README

          

![HEADER PIGEONSH](docs/header.png)

[![Web](https://img.shields.io/badge/Web-grey?style=flat-square)](https://pigeonposse.com/)
[![About us](https://img.shields.io/badge/About%20us-grey?style=flat-square)](https://pigeonposse.com/?popup=about)
[![Github](https://img.shields.io/badge/Github-grey?style=flat-square)](https://github.com/pigeon-posse)
[![Donate](https://img.shields.io/badge/Donate-pink?style=flat-square)](https://pigeonposse.com/?popup=donate)

[![Size](https://img.shields.io/bundlephobia/min/@pigeon-posse/pigeonsh?label=Size&style=flat-square)](https://npmjs.com/package/@pigeon-posse/pigeonsh)
[![License](https://img.shields.io/github/license/pigeon-posse/pigeonsh?color=blue&label=License&style=flat-square)](https://npmjs.com/package/@pigeon-posse/pigeonsh)
[![Version](https://img.shields.io/npm/v/@pigeon-posse/pigeonsh?color=a1b858&label&style=flat-square)](https://npmjs.com/package/@pigeon-posse/pigeonsh)

# PIGEONSH by _PIGEONPOSSEβ„’_

> :warning: **_Beta_ version**. It can be installed and used but things may change in the future.

## πŸ—’ Description

Centralize your server scripts in a single folder and run them using the ```psh``` or ```pigeonsh``` command.
Can be used with ```.sh```, ```.zsh```, ```.js```, and ```.py``` files.

Index

1. [Description](#-description)
2. [Installation](#-installation)
3. [Usage](#%EF%B8%8F-usage)
- [Write scripts](#write-scripts)
- [Execute scripts](#execute-scripts)
- [list](#-psh-list)
- [[script-name] or exec [script-name]](#-psh-script-name-or-psh-exec-script-name)
- [info [script-name]](#-psh-info-script-name)
4. [Development](#-development)
5. [Donate](#-donate)
6. [License](#-license)
7. [About us](#-about-us)

## πŸ”‘ Installation

### ⚑️ Using NPM

```bash
npm install -g @pigeon-posse/pigeonsh
```

### ☒️ With a executable

View details

> :warning: __Not recommended__. If you install it this way, the executable will be heavier.

Supported on __Linux__, __MacOs__ and __Windows__.

#### Fast mode

##### ```macos```:

```bash
git clone https://github.com/pigeon-posse/pigeonsh.git pigeonsh && cp pigeonsh/dist/pigeonsh-macos /usr/local/bin/psh && psh hello
```

##### ```linux```:

```bash
git clone https://github.com/pigeon-posse/pigeonsh.git pigeonsh && cp pigeonsh/dist/pigeonsh-linux /usr/local/bin/psh && psh hello
```

##### ```Windows``` (no tested):

```cmd
git clone https://github.com/pigeon-posse/pigeonsh.git pigeonsh && copy pigeonsh/dist/pigeonsh-win.exe C: \Program Files (x86)\Git \us\ local bin\psh && psh hello
```

##### βœ… Success installation
If the installation has been executed correctly you should see at the end of your line a:

```Hello Pigeon 🐦🌈```

#### Manual mode

1. Clone the repository and go to the dist folder.
2. Copy the executable corresponding to your operating system in your ```bin``` folder.

## βš™οΈ Usage

### Write scripts

You can write your scripts in your ```~/.scriptsrc``` folder. The structure for the script to work must be:

```bash
- ~/.scriptsrc
- πŸ“‚ [script-name]
- πŸ“„ main.[sh, zsh, js, py]
- πŸ“œ info.[yml, yaml, json] # not required
```

View details.




  • πŸ“‚ [script-name]:
    The name of the folder will be the name that you execute from the psh command.
    Folder name must not contain spaces.



  • πŸ“„ main.[sh, js, py]:
    The main file is the file that will be executed, here you will write your code. It could be .sh, .js, .py. main.sh example:

    ```bash
    #!/bin/sh

    echo "Hello Pigeon 🐦🌈"
    ```




  • πŸ“œ info.[yml, yaml, json]:
    Not required. In this file you will add the information of your scripts. info.yml example:

    ```yaml
    description: Print hello message.
    version: 1.0.0
    ```



  • ### Execute scripts

    #### πŸš€ ```psh list```
    Running this command lists all the scripts saved in your ```~/.scriptsrc``` folder.

    Example

    Run:

    ```bash
    psh list
    ```

    Returns list of scripts like:

    ```bash
    hello
    aliasrc
    hosts
    ```

    #### πŸš€ ```psh [script-name]``` or ```psh exec [script-name]```

    Running this command will run the scripts with the same name if they exist.

    Example

    Run:

    ```bash
    psh hello
    ```
    or
    ```bash
    psh exec hello
    ```

    Returns hello script:

    ```bash
    Hello Pigeon 🐦🌈
    ```

    #### πŸš€ ```psh info [script-name]```

    Running this command will display info of script.

    Example

    Run:

    ```bash
    psh info hello
    ```

    Returns hello script info:

    ```bash
    {
    "description": "Print hello message",
    "version": "1.0.0"
    }
    ```

    ## πŸ‘¨β€πŸ’» Development

    You can contribute via **_Github_**.

    [![Issues](https://img.shields.io/badge/Issues-grey?style=flat-square)](https://github.com/pigeon-posse/pigeonsh/issues)
    [![Pull requests](https://img.shields.io/badge/Pulls-grey?style=flat-square)](https://github.com/pigeon-posse/pigeonsh/pulls)

    ## β˜• Donate

    Help us to develop more interesting things.

    [![Donate](https://img.shields.io/badge/Donate-grey?style=flat-square)](https://pigeonposse.com/?popup=donate)

    ## πŸ“œ License

    This software is licensed with GPLv3 (GNU GENERAL PUBLIC LICENSE Version 3).

    [![Read more](https://img.shields.io/badge/Read-more-grey?style=flat-square)](https://github.com/pigeon-posse/pigeonsh/blob/main/LICENSE)

    ## 🐦 About us

    _PigeonPosse_ is a ✨ **code development collective** ✨ focused on creating practical and interesting tools that help developers and users enjoy a more agile and comfortable experience. Our projects cover various programming sectors and we do not have a thematic limitation in terms of projects.

    [![More](https://img.shields.io/badge/Read-more-grey?style=flat-square)](https://github.com/PigeonPosse/PigeonPosse)

    ### Collaborators

    | | Name | Role | GitHub |
    | ---------------------------------------------------------------------------------- | ----------- | ------------ | ---------------------------------------------- |
    | | AngelEspejo | Author | [@AngelEspejo](https://github.com/AngelEspejo) |
    | | Irfaelo | Windows compatibility | [@irfaelo](https://github.com/irfaelo) |
    | | PigeonPosse | Collective | [@PigeonPosse](https://github.com/PigeonPosse) |