{"id":15196258,"url":"https://github.com/rhaqim/restcli","last_synced_at":"2026-02-24T07:14:51.112Z","repository":{"id":256191989,"uuid":"853980837","full_name":"Rhaqim/restcli","owner":"Rhaqim","description":"A command line interface written in RUST for generating endpoints that can be tested with CURL, Postman or VS Code's rest-client extension. The tool allows you to select one or more files that contain the applications routes. At the moment the tool works with Gin Gonic in Golang and Flask in Python","archived":false,"fork":false,"pushed_at":"2024-09-17T21:48:23.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T08:13:55.247Z","etag":null,"topics":["cli","curl","postman","rest","rest-client","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rhaqim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-08T04:22:27.000Z","updated_at":"2024-12-30T22:30:24.000Z","dependencies_parsed_at":"2024-11-13T11:31:55.927Z","dependency_job_id":"20e0c25f-31b8-4128-b48c-5e462a8970c5","html_url":"https://github.com/Rhaqim/restcli","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"3263f67af57f1baddddfa183e43a3c6fd47b0f3c"},"previous_names":["rhaqim/restcli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rhaqim%2Frestcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rhaqim%2Frestcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rhaqim%2Frestcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rhaqim%2Frestcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rhaqim","download_url":"https://codeload.github.com/Rhaqim/restcli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241476458,"owners_count":19968916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","curl","postman","rest","rest-client","rust"],"created_at":"2024-09-28T00:01:31.466Z","updated_at":"2025-10-29T12:13:15.923Z","avatar_url":"https://github.com/Rhaqim.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rest CLI endpoint Generator\n\nThis is a simple CLI tool to generate REST API endpoints from defined routes in Python, Rust, Golang and JavaScript files.\n\n## Features\n\n- Generate REST API endpoints for Postman collection, VSCode REST Client, and curl (HTTPie).\n- Generate REST API endpoints for Python, Rust, Golang, and JavaScript.\n\n## Installation\n\nTo install the CLI tool, you can use the following command:\n\n```bash\ncargo install --path .\n```\n\n## Flags\n\n- `--help` - Display help information.\n- `-p`, `--postman` - Generate Postman collection.\n- `r`, `--rest-client` - Generate VSCode REST Client.\n- `-c`, `--curl` - Generate curl commands.\n- `url` - The base URL for the REST API. Default is `http://localhost`.\n- `port` - The port number for the REST API. Default is `8080`.\n- `a`, `--append` - Append the generated REST API endpoints to an existing file.\n- `-o`, `--output` - The output file for the generated REST API endpoints. Default is `requests`.\n\n## Supported Languages and Frameworks\n\n- Python (Flask)\n- Rust (Actix Web)\n- Golang (Gin)\n- JavaScript (Express)\n\n## Example\n\nHere is an example of a Python file with defined routes:\n\n```python\nfrom flask import Flask, request, jsonify\n\napp = Flask(__name__)\n\n@app.route('/api/v1/hello', methods=['GET'])\ndef hello():\n    return jsonify({'message': 'Hello, World!'})\n\n@app.route('/api/v1/greet', methods=['POST'])\ndef greet():\n    data = request.get_json()\n    name = data.get('name')\n    return jsonify({'message': f'Hello, {name}!'})\n\nif __name__ == '__main__':\n    app.run(port=8080)\n```\n\nYou can generate REST API endpoints for this Python file using the following command:\n\n- Single File\n\n```bash\nrest-cli -p -r -c --url http://localhost --port 8080 app.py\n```\n\n- Multiple Files\n\n```bash\nrest-cli -p -r -c --url http://localhost --port 8080 app1.py app2.py app3.py\n```\n\nThis will generate the following files:\n\n- `requests.postman_collection.json` - Postman collection.\n- `requests.http` - VSCode REST Client.\n- `requests.sh` - curl commands.\n\nYou can import the Postman collection into Postman, open the VSCode REST Client file in VSCode, and run the curl commands in your terminal.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhaqim%2Frestcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhaqim%2Frestcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhaqim%2Frestcli/lists"}