Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/restcli/restcli
A rest-cli for intellij http-request. ---> https://blog.jetbrains.com/idea/2022/12/http-client-cli-run-requests-and-tests-on-ci/
https://github.com/restcli/restcli
command-line http-client intellij-idea jfex kotlin rest-client
Last synced: about 1 month ago
JSON representation
A rest-cli for intellij http-request. ---> https://blog.jetbrains.com/idea/2022/12/http-client-cli-run-requests-and-tests-on-ci/
- Host: GitHub
- URL: https://github.com/restcli/restcli
- Owner: restcli
- License: mit
- Archived: true
- Created: 2020-07-01T14:11:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-20T02:07:39.000Z (almost 2 years ago)
- Last Synced: 2024-09-22T08:31:51.067Z (about 2 months ago)
- Topics: command-line, http-client, intellij-idea, jfex, kotlin, rest-client
- Language: Kotlin
- Homepage: https://restcli.github.io
- Size: 22.5 MB
- Stars: 277
- Watchers: 6
- Forks: 37
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Jetbrains released a new cli client.
Please check it.
This repository will no longer active development.
Thank you for trying & feedback.
I learn so much from all you guys here.
Blog: [http-client-cli-run-requests-and-tests-on-ci](https://blog.jetbrains.com/idea/2022/12/http-client-cli-run-requests-and-tests-on-ci/)
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)
restcli
A missing commandline application for execute IntelliJ HTTP Client file.
Key Features •
How To Use •
Download •
Credits •
License •
Producthunt![screenshot](images/restcli_screenshots.png)
## Key Features
* Written in Kotlin 🤩
* Execute Intellij HTTP request files
* Running test script including:
- Embedded script inside HTTP request file
- Include external javascript test file
* Loading and inject environment variables from
- http-client.env.json
- http-client.private.env.json
* Cross-platform 💻🖥️
- Windows, macOS, and Linux ready.
* Beautiful request log 🤑🤑🤑
- Request & response detail
- Test result table
* Easy to custom via command-line arguments 😎
- Custom logging request
- Inject environment name
* Generate test report - JUnit format. 🥰🥰🥰
* Support setNextRequest. So you can custom flexible the test flow. ✨✨✨##### Demo
![demo-rest-cli](images/demo-rest-cli.gif)**1. Show detail request/response including test result**
**2. Test result table**
**3. Generate JUnit test report (XML) that can be viewed by other tools such as xunit-viewer**
## How To Use
The fastest way to get rest cli is to download the jar from [releases tab](https://github.com/restcli/restcli/releases)
```
Usage: rest-cli [-hkV] [-d=] [-D=]
[-e=] [-l=] [-t=]
[-G=]... [-P=]... FILES...
IntelliJ RestCli
FILES... Path to one ore more http script files.
-d, --env-dir=
Directory where config files are (default: current directory)
(http-client.env.json/http-client.private.env.json).
-D, --decorator=
Decorator for private env variables
Valid values: NOOP, THREE_STAR, FULL_STAR, MIDDLE_STAR
-e, --env=
Name of the environment in config file
(http-client.env.json/http-client.private.env.json).
-G, --global-env=
Public environment variables
-h, --help Show this help message and exit.
-k, --insecure Disable ssl validation
-l, --log-level=
Config log level while the executor running.
Valid values: NONE, BASIC, HEADERS, BODY
-P, --private-env=
Private environment variables
-t, --timeout=
Number of milliseconds for request timeout, default=3000
-V, --version Print version information and exit.
```#### Example
```bash
# Move to the folder that contains your http files.
$ cd requests$ tree
├── get-requests.http
├── http-client.env.json
├── http-client.private.env.json
├── post-requests.http
├── request-form-data.json
├── requests-with-authorization.http
├── requests-with-tests.http
└── test_script.js$ java -jar /path/to/restcli.jar -e "test" get-requests.http
```Note: This application required you to install `java` on your machine.
## Download
You can [download](https://github.com/restcli/restcli/releases) the latest version of restcli for Windows, macOS, and Linux.
## Credits
This software uses the following open-source packages:
- [Jflex](https://jflex.de/) - a lexical analyzer generator (also known as scanner generator) for Java.
- [PicoCli](https://picocli.info/) - a mighty tiny command line interface
- [okhttp](https://github.com/square/okhttp) - the way modern applications network. It’s how we exchange data & media. Doing HTTP efficiently makes your stuff load faster and saves bandwidth.
- [picnic](https://github.com/JakeWharton/picnic) - A Kotlin DSL and Java/Kotlin builder API for constructing HTML-like tables that can be rendered to text.
- [mordant](https://github.com/ajalt/mordant) - Full-featured text styling for Kotlin command-line applications.Thanks Jetbrains for a [free license](https://www.jetbrains.com/community/opensource/#support)
## Support
If you need help, please don't hesitate to [file an issue](https://github.com/restcli/restcli/issues/new).
## Sponsoring
This application is free and can be used for free, open-source, and commercial applications. `restcli` is under the MIT License (MIT). So hit the magic ⭐ button; I appreciate it!!! 🙏
## 🤝 Contributing
I appreciate your support and feedback!Please file issues if you find bugs and have feature requests. If you can send small PRs to improve or fix bugs, that would be awesome too.
For larger PRs, please ping [@quangson91](https://twitter.com/quangson91) to discuss first.
## 📝 License
MIT License
```
Copyright (c) 2020 Duong Quang SonPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the software, and to permit persons to whom the software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
---Made with ❤ by quangson91
> [restcli.github.io](https://restcli.github.io/) ·
> GitHub [@quangson91](https://github.com/quangson91) ·
> Twitter [@quangson91](https://twitter.com/quangson91)## Reference
- [restcli-node](https://github.com/J4YF7O/restcli-node) Node docker image with rest-cli command installed.
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Martin Qvistgård
📓
Robert Jack Will
🤔
gsobczyk
💻
Vlad
📓
Nicolas Peters
💻
xargon180
💻
Hannes U.
💻
sbenoistmics
💻
Kwangsu Kim
💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!