rav


Namerav JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/jmitchel3/rav
SummaryA cross-platform Python CLI to shortcut tp command-line commands. Inspired by Makefiles and npm scripts.
upload_time2024-02-16 06:09:38
maintainer
docs_urlNone
authorJustin Mitchel
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rav

A cross-platform Python CLI to shortcut to command-line commands. Inspired by Makefiles and npm scripts.

## Install

It's recommended that you use a virtual environment with `rav`. 

```
python3 -m pip install rav
```
> Minimum python version is 3.7

## Start new project

Basic Usage:

```bash
cd ~/path/to/project
```

```bash
rav new
```
> Run through the setup wizard to create `rav.yaml`

or

Manually create `rav.yaml`

```yaml
scripts:
    echo: echo hello world
```

Use:

```
rav run echo
```


## Manage the Rav project `rav.yaml` file

The configuration block is flexible. Use `rav`, `scripts`, or `commands` as the top-level key.

`rav.yaml`
```yaml
name: rav-in-sixty-seconds

scripts:
    echo: echo "this is awesome"
    server: venv/bin/python -m http.server
```

Or if on windows:

`rav.yaml`
```yaml
name: rav-in-sixty-seconds

scripts:
    echo: echo this is awesome
    win-server: venv\Scripts\python -m http.server
```


The following all work and will run in this exact order (`rav` first, `scripts` second, `commands` last)

```yaml
rav:
    echo: echo "this is awesome"
    server: venv/bin/python -m http.server
```


```yaml
scripts:
    echo: echo "this is awesome"
    server: venv/bin/python -m http.server
```


```yaml
commands:
    echo: echo "this is awesome"
    server: venv/bin/python -m http.server
```



## Basic Syntax

```
rav run <command>
```

`rav.yaml`:
```
scripts:
    <command>: echo "this is a command"
```

## Basic Example


`rav.yaml`:
```
scripts:
    hello: echo hello world!
```

```
rav run hello
```
By default, `rav run` will look for a `rav.yaml` file in the current directory.  You can customize it, with `-f` as explained [below](#custom-rav-file).


## Try the built-in Sample

```
rav sample
```
This will output `rav.sample.yaml` in the current directory.

```
rav run -f rav.sample.yaml echo
```
`-f` is used to specify a custom rav file as documented [below](#custom-rav-file).


## Run a command

```
rav run echo
```

Or

```
rav run server
```

Or (if windows):

```
rav run win-server 8080
```

## Custom Rav File
Rav supports custom yaml files by default. The yaml declaration needs to be any of the following:

- `rav`
- `scripts`
- `commands`

`project.yaml`
```yaml
rav:
    sweet: echo "this is working"
    echo: echo "so is this"
```

`rav.basic.yaml`
```yaml
scripts:
    sweet: echo "this is working"
    echo: echo "so is this"
```

```
rav run -f project.yaml sweet
```
or
```
rav run --file rav.other.yaml echo
```

Here's a few rules for custom files:

- `-f` or `--file` is used to specify a custom rav file
- `-f` or `--file` must be used prior to the command shortcut name (e.g. `rav run -f <your-new-file> <your-command>`)


## Multiple Commands at Once

`rav.yaml`
```yaml
scripts:
    multi: 
        - echo this is
        - echo awesome
        - echo simple
        - echo and 
        - echo easy
```

Run with:

```
rav run multi
```

This is the same as running:

```
echo this is && echo awesome && echo simple && echo and && echo easy
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jmitchel3/rav",
    "name": "rav",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Justin Mitchel",
    "author_email": "Justin Mitchel <hello@teamcfe.com>",
    "download_url": "https://files.pythonhosted.org/packages/9f/48/8f0d257726cfabac975ba73ef7616f45dd2784ebccc120a8865050611212/rav-0.0.9.tar.gz",
    "platform": null,
    "description": "# rav\n\nA cross-platform Python CLI to shortcut to command-line commands. Inspired by Makefiles and npm scripts.\n\n## Install\n\nIt's recommended that you use a virtual environment with `rav`. \n\n```\npython3 -m pip install rav\n```\n> Minimum python version is 3.7\n\n## Start new project\n\nBasic Usage:\n\n```bash\ncd ~/path/to/project\n```\n\n```bash\nrav new\n```\n> Run through the setup wizard to create `rav.yaml`\n\nor\n\nManually create `rav.yaml`\n\n```yaml\nscripts:\n    echo: echo hello world\n```\n\nUse:\n\n```\nrav run echo\n```\n\n\n## Manage the Rav project `rav.yaml` file\n\nThe configuration block is flexible. Use `rav`, `scripts`, or `commands` as the top-level key.\n\n`rav.yaml`\n```yaml\nname: rav-in-sixty-seconds\n\nscripts:\n    echo: echo \"this is awesome\"\n    server: venv/bin/python -m http.server\n```\n\nOr if on windows:\n\n`rav.yaml`\n```yaml\nname: rav-in-sixty-seconds\n\nscripts:\n    echo: echo this is awesome\n    win-server: venv\\Scripts\\python -m http.server\n```\n\n\nThe following all work and will run in this exact order (`rav` first, `scripts` second, `commands` last)\n\n```yaml\nrav:\n    echo: echo \"this is awesome\"\n    server: venv/bin/python -m http.server\n```\n\n\n```yaml\nscripts:\n    echo: echo \"this is awesome\"\n    server: venv/bin/python -m http.server\n```\n\n\n```yaml\ncommands:\n    echo: echo \"this is awesome\"\n    server: venv/bin/python -m http.server\n```\n\n\n\n## Basic Syntax\n\n```\nrav run <command>\n```\n\n`rav.yaml`:\n```\nscripts:\n    <command>: echo \"this is a command\"\n```\n\n## Basic Example\n\n\n`rav.yaml`:\n```\nscripts:\n    hello: echo hello world!\n```\n\n```\nrav run hello\n```\nBy default, `rav run` will look for a `rav.yaml` file in the current directory.  You can customize it, with `-f` as explained [below](#custom-rav-file).\n\n\n## Try the built-in Sample\n\n```\nrav sample\n```\nThis will output `rav.sample.yaml` in the current directory.\n\n```\nrav run -f rav.sample.yaml echo\n```\n`-f` is used to specify a custom rav file as documented [below](#custom-rav-file).\n\n\n## Run a command\n\n```\nrav run echo\n```\n\nOr\n\n```\nrav run server\n```\n\nOr (if windows):\n\n```\nrav run win-server 8080\n```\n\n## Custom Rav File\nRav supports custom yaml files by default. The yaml declaration needs to be any of the following:\n\n- `rav`\n- `scripts`\n- `commands`\n\n`project.yaml`\n```yaml\nrav:\n    sweet: echo \"this is working\"\n    echo: echo \"so is this\"\n```\n\n`rav.basic.yaml`\n```yaml\nscripts:\n    sweet: echo \"this is working\"\n    echo: echo \"so is this\"\n```\n\n```\nrav run -f project.yaml sweet\n```\nor\n```\nrav run --file rav.other.yaml echo\n```\n\nHere's a few rules for custom files:\n\n- `-f` or `--file` is used to specify a custom rav file\n- `-f` or `--file` must be used prior to the command shortcut name (e.g. `rav run -f <your-new-file> <your-command>`)\n\n\n## Multiple Commands at Once\n\n`rav.yaml`\n```yaml\nscripts:\n    multi: \n        - echo this is\n        - echo awesome\n        - echo simple\n        - echo and \n        - echo easy\n```\n\nRun with:\n\n```\nrav run multi\n```\n\nThis is the same as running:\n\n```\necho this is && echo awesome && echo simple && echo and && echo easy\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A cross-platform Python CLI to shortcut tp command-line commands. Inspired by Makefiles and npm scripts.",
    "version": "0.0.9",
    "project_urls": {
        "Bug Tracker": "https://github.com/jmitchel3/rev/issues",
        "Homepage": "https://github.com/jmitchel3/rev"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8affab9a502d9f8fe3cde5e009caa7c3148d964d9da2f27e53f2020c1d292164",
                "md5": "e3e5b17372fc85d6fd2bf5c7ab913092",
                "sha256": "5a9429cade688b10ee11321d1c022435b6ac60baa6017c5c636791a4bb2a18c4"
            },
            "downloads": -1,
            "filename": "rav-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e3e5b17372fc85d6fd2bf5c7ab913092",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6557,
            "upload_time": "2024-02-16T06:09:36",
            "upload_time_iso_8601": "2024-02-16T06:09:36.665908Z",
            "url": "https://files.pythonhosted.org/packages/8a/ff/ab9a502d9f8fe3cde5e009caa7c3148d964d9da2f27e53f2020c1d292164/rav-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f488f0d257726cfabac975ba73ef7616f45dd2784ebccc120a8865050611212",
                "md5": "84f4236df6a801a8003a997b24037766",
                "sha256": "ebd4eb7efb620f9ec5016a0d40f27ff28ce69ddfc013c74c44c83d53bf50e9cc"
            },
            "downloads": -1,
            "filename": "rav-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "84f4236df6a801a8003a997b24037766",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 5383,
            "upload_time": "2024-02-16T06:09:38",
            "upload_time_iso_8601": "2024-02-16T06:09:38.715370Z",
            "url": "https://files.pythonhosted.org/packages/9f/48/8f0d257726cfabac975ba73ef7616f45dd2784ebccc120a8865050611212/rav-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-16 06:09:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jmitchel3",
    "github_project": "rav",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "rav"
}
        
Elapsed time: 1.96219s