Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sharbov/open-cli
Generate client based on OpenAPI Specification and wrap it in a command line interface.
https://github.com/sharbov/open-cli
cli client-side open-api swagger
Last synced: 4 days ago
JSON representation
Generate client based on OpenAPI Specification and wrap it in a command line interface.
- Host: GitHub
- URL: https://github.com/sharbov/open-cli
- Owner: sharbov
- License: mit
- Created: 2018-05-11T10:21:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-27T16:23:55.000Z (over 5 years ago)
- Last Synced: 2024-09-25T15:39:38.505Z (8 days ago)
- Topics: cli, client-side, open-api, swagger
- Language: Python
- Size: 107 KB
- Stars: 52
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenCLI
A CLI for every service which exposes a OpenAPI (Swagger) specification endpoint.
From the OpenAPI Specification project:
> The goal of The OpenAPI Specification is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.
## Demo
![Alt Text](https://github.com/sharbov/open-cli/blob/master/demo.gif)
## Docker
To start a CLI session run:
docker run -it sharbov/open-cli
e.g:
docker run -it sharbov/open-cli http://petstore.swagger.io/v2/swagger.json
## Python
### Installation
To install OpenCLI, simply:
pip install opencli
### Usage
To start a CLI session run:
open-cli
e.g:
open-cli http://petstore.swagger.io/v2/swagger.json
For more options run:
open-cli -h
Credits
-------
This project relies on Yelps [bravado](https://github.com/Yelp/bravado) project & on Jonathan Slenders [python-prompt-toolkit](https://github.com/jonathanslenders/python-prompt-toolkit).