resotoshell


Nameresotoshell JSON
Version 3.9.0 PyPI version JSON
download
home_page
SummaryCommandline interpreter to interact with Resoto.
upload_time2024-02-20 18:31:05
maintainer
docs_urlNone
authorSome Engineering Inc.
requires_python>=3.9
licenseAGPLv3
keywords cloud security
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # `resh`
Resoto Shell


## Table of contents

* [Overview](#overview)
* [Usage](#usage)
* [Examples](#examples)
    * [Basics](#basics)
    * [Intermediate](#intermediate)
    * [Advanced](#advanced)
* [Contact](#contact)
* [License](#license)


## Overview
`resh` starts the resoto shell. It is used to interact with `resotocore`. It allows you to explore the graph, find resources of interest, mark them for cleanup, fix their tagging, aggregate over their metadata to create metrics and format the output for use in a 3rd party script or system.

More information can be found below and in [the docs](https://resoto.com/docs/concepts/components/shell).


## Usage
`resh` uses the following commandline arguments:
```
  --resotocore-uri RESOTOCORE_URI
                        resotocore URI (default: https://localhost:8900)
  --resotocore-section RESOTOCORE_SECTION
                        All queries are interpreted with this section name. If not set, the server default is used.
  --resotocore-graph RESOTOCORE_GRAPH
                        The name of the graph to use by default. If not set, the server default is used.
  --download-directory DOWNLOAD_DIRECTORY
                        If files are received, they are written to this directory.
  --no-color            Output should be rendered plain without any color escape sequences.
  --stdin               Read from STDIN instead of opening a shell
  --verbose, -v         Verbose logging
  --quiet               Only log errors
  --psk PSK             Pre-shared key
  --ca-cert CA_CERT     Path to custom CA certificate file
  --no-verify-certs     Turn off certificate verification
```

ENV Prefix: `RESOTOSHELL_`
Every CLI arg can also be specified using ENV variables.

For instance `--resotocore-uri http://foobar.tld:8900` would become `RESOTOSHELL_RESOTOCORE_URI=http://foobar.tld:8900`.



## Examples
### Basics
Enter `help` into `resh` to get an overview of all available commands

Using `help` followed by a command will provide more information about that command.


### Intermediate
Show all storage volumes that are in use
```
> search is(volume) and volume_status = in-use
```

Show all storage volumes in use and format the output as CSV
```
> search is(volume) and volume_status = in-use | format {kind},{id},{name},{ctime}
```

Show all storage volumes not in use with a size of more than 10 GB
```
> search is(volume) and volume_status = available and volume_size > 10
```


### Advanced
Find volumes in cloud AWS that are in use
```
search is(volume) and volume_status = in-use and /ancestors.cloud.reported.name = aws
```

Alternatively instead of filtering for storage volumes of the generic `volume` kind we can also be more specific
```
search is(aws_ec2_volume) and volume_status = in-use
```

Find unused AWS volumes older than 30 days with no I/O in the past 7 days
```
search is(aws_ec2_volume) and volume_status = available and ctime < -30d and atime < -7d and mtime < -7d
```


## Contact
If you have any questions feel free to [join our Discord](https://discord.gg/someengineering) or [open a GitHub issue](https://github.com/someengineering/resoto/issues/new).


## License
See [LICENSE](../LICENSE) for details.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "resotoshell",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "cloud security",
    "author": "Some Engineering Inc.",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/2d/b4/64777a529ba0307a1e460e31493e02668cc6d6a0a34e9e76b67575766073/resotoshell-3.9.0.tar.gz",
    "platform": null,
    "description": "# `resh`\nResoto Shell\n\n\n## Table of contents\n\n* [Overview](#overview)\n* [Usage](#usage)\n* [Examples](#examples)\n    * [Basics](#basics)\n    * [Intermediate](#intermediate)\n    * [Advanced](#advanced)\n* [Contact](#contact)\n* [License](#license)\n\n\n## Overview\n`resh` starts the resoto shell. It is used to interact with `resotocore`. It allows you to explore the graph, find resources of interest, mark them for cleanup, fix their tagging, aggregate over their metadata to create metrics and format the output for use in a 3rd party script or system.\n\nMore information can be found below and in [the docs](https://resoto.com/docs/concepts/components/shell).\n\n\n## Usage\n`resh` uses the following commandline arguments:\n```\n  --resotocore-uri RESOTOCORE_URI\n                        resotocore URI (default: https://localhost:8900)\n  --resotocore-section RESOTOCORE_SECTION\n                        All queries are interpreted with this section name. If not set, the server default is used.\n  --resotocore-graph RESOTOCORE_GRAPH\n                        The name of the graph to use by default. If not set, the server default is used.\n  --download-directory DOWNLOAD_DIRECTORY\n                        If files are received, they are written to this directory.\n  --no-color            Output should be rendered plain without any color escape sequences.\n  --stdin               Read from STDIN instead of opening a shell\n  --verbose, -v         Verbose logging\n  --quiet               Only log errors\n  --psk PSK             Pre-shared key\n  --ca-cert CA_CERT     Path to custom CA certificate file\n  --no-verify-certs     Turn off certificate verification\n```\n\nENV Prefix: `RESOTOSHELL_`\nEvery CLI arg can also be specified using ENV variables.\n\nFor instance `--resotocore-uri http://foobar.tld:8900` would become `RESOTOSHELL_RESOTOCORE_URI=http://foobar.tld:8900`.\n\n\n\n## Examples\n### Basics\nEnter `help` into `resh` to get an overview of all available commands\n\nUsing `help` followed by a command will provide more information about that command.\n\n\n### Intermediate\nShow all storage volumes that are in use\n```\n> search is(volume) and volume_status = in-use\n```\n\nShow all storage volumes in use and format the output as CSV\n```\n> search is(volume) and volume_status = in-use | format {kind},{id},{name},{ctime}\n```\n\nShow all storage volumes not in use with a size of more than 10 GB\n```\n> search is(volume) and volume_status = available and volume_size > 10\n```\n\n\n### Advanced\nFind volumes in cloud AWS that are in use\n```\nsearch is(volume) and volume_status = in-use and /ancestors.cloud.reported.name = aws\n```\n\nAlternatively instead of filtering for storage volumes of the generic `volume` kind we can also be more specific\n```\nsearch is(aws_ec2_volume) and volume_status = in-use\n```\n\nFind unused AWS volumes older than 30 days with no I/O in the past 7 days\n```\nsearch is(aws_ec2_volume) and volume_status = available and ctime < -30d and atime < -7d and mtime < -7d\n```\n\n\n## Contact\nIf you have any questions feel free to [join our Discord](https://discord.gg/someengineering) or [open a GitHub issue](https://github.com/someengineering/resoto/issues/new).\n\n\n## License\nSee [LICENSE](../LICENSE) for details.\n",
    "bugtrack_url": null,
    "license": "AGPLv3",
    "summary": "Commandline interpreter to interact with Resoto.",
    "version": "3.9.0",
    "project_urls": {
        "Documentation": "https://resoto.com",
        "Source": "https://github.com/someengineering/resoto/tree/main/resotoshell"
    },
    "split_keywords": [
        "cloud",
        "security"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0656dac5b3c2b0d80128ec2fa9830289d4be745f7130a8cba2f180669e44ca76",
                "md5": "5999393b6eda14c0c4b6dd1555fa71e6",
                "sha256": "57e81e1c4f86520286d4ec10d5e7258d591d59604b9239638cf1b2626bb90765"
            },
            "downloads": -1,
            "filename": "resotoshell-3.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5999393b6eda14c0c4b6dd1555fa71e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 20802,
            "upload_time": "2024-02-20T18:31:03",
            "upload_time_iso_8601": "2024-02-20T18:31:03.805988Z",
            "url": "https://files.pythonhosted.org/packages/06/56/dac5b3c2b0d80128ec2fa9830289d4be745f7130a8cba2f180669e44ca76/resotoshell-3.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2db464777a529ba0307a1e460e31493e02668cc6d6a0a34e9e76b67575766073",
                "md5": "0e8e63640655811fe45a5d6bca3761c1",
                "sha256": "f20fa56e72ae04fc0783a62c8f0de2d0eb9c951d9dacd8028a03fd876b57101f"
            },
            "downloads": -1,
            "filename": "resotoshell-3.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0e8e63640655811fe45a5d6bca3761c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 24600,
            "upload_time": "2024-02-20T18:31:05",
            "upload_time_iso_8601": "2024-02-20T18:31:05.795459Z",
            "url": "https://files.pythonhosted.org/packages/2d/b4/64777a529ba0307a1e460e31493e02668cc6d6a0a34e9e76b67575766073/resotoshell-3.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-20 18:31:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "someengineering",
    "github_project": "resoto",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "resotoshell"
}
        
Elapsed time: 0.43075s