{"id":15674588,"url":"https://github.com/ecyrbe/apix-rust","last_synced_at":"2025-05-06T23:23:45.672Z","repository":{"id":45185814,"uuid":"420196974","full_name":"ecyrbe/apix-rust","owner":"ecyrbe","description":"Apix is a modern HTTP client for the command line.","archived":false,"fork":false,"pushed_at":"2022-01-23T13:57:27.000Z","size":344,"stargazers_count":17,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T03:51:43.853Z","etag":null,"topics":["api","curl","http","http-client","httpie","postman","rest","rest-api","wget"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ecyrbe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["ecyrbe"],"custom":["https://www.paypal.me/ecyrbe"]}},"created_at":"2021-10-22T18:04:17.000Z","updated_at":"2024-10-28T22:10:29.000Z","dependencies_parsed_at":"2022-08-28T09:32:26.409Z","dependency_job_id":null,"html_url":"https://github.com/ecyrbe/apix-rust","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecyrbe%2Fapix-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecyrbe%2Fapix-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecyrbe%2Fapix-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecyrbe%2Fapix-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecyrbe","download_url":"https://codeload.github.com/ecyrbe/apix-rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252784155,"owners_count":21803615,"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":["api","curl","http","http-client","httpie","postman","rest","rest-api","wget"],"created_at":"2024-10-03T15:47:30.995Z","updated_at":"2025-05-06T23:23:45.642Z","avatar_url":"https://github.com/ecyrbe.png","language":"Rust","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ecyrbe/apix-rust\"\u003e\n    \u003cimg align=\"center\" src=\"https://raw.githubusercontent.com/ecyrbe/apix-rust/main/docs/logo.svg\" width=\"512px\" alt=\"Apix logo\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   APIX is a modern HTTP client for the command line.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/rust-2021-3584e4?logo=rust\" alt=\"langue rust\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/workflow/status/ecyrbe/apix-rust/Rust/main\" alt=\"build status\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/code-size/ecyrbe/apix-rust?color=ffa348\"\u0026 alt=\"code size\"\u003e\n  \u003ca href=\"https://github.com/ecyrbe/apix-rust/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/ecyrbe/apix-rust?color=ed333b\" alt=\"MIT license\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n```yaml\n🚨 WARNING: 🚧 Apix is still in alpha/proof of concept state! 🚧\n```\n\nApix brings ideas from tools like `Git`,`Kubernetes`, `Helm` ,`Httpie`.\nIndeed it's is not just a simple HTTP client, Apix is :  \n- **Pretty** as it uses [Bat](https://github.com/sharkdp/bat) to pretty print requests and responses\n```bash\n\u003e apix get https://apix.io/json\n{\n  \"id\": 0,\n  \"test\": \"hello\"\n}\n```\n- **Beatifull** as it uses [Indicatif](https://docs.rs/indicatif/latest/indicatif/index.html) to show modern command line progress bars when uploading or downloading files\n```bash\n\u003e apix get https://apix.io/test.mp4\nDownloading File test.mp4\n🕘 [00:00:28] [████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 14.98MiB/298.06MiB (549.87KiB/s, 8m)\n```\n- **Friendly** to use as it uses [Dialoguer](https://docs.rs/dialoguer/latest/dialoguer/index.html) for interactive prompt to guide you when creating requests or executing them\n```bash\n\u003e apix exec -f request.yaml\n✔ todoId · 1\n? email (\"ecyrbe@gmail.com\") › bad\\gmail.com\n✘ Invalid input:\ncause 0: \"bad\\gmail.com\" is not a \"email\"\n```\n- **Powerfull** as it uses [Tera](https://tera.netlify.app/) template engine to allow your requests to do complex things if you want them to (see [examples](/examples))\n- **Easy** to use in the command line as it uses [Clap](https://docs.rs/clap/latest/clap/) autocompletion\n- **Reusable** as it stores your requests in your file system in a readable format for later use (yaml)\n- **Helping you not forget** as it stores the response of the requests so you can consult them at any time\n- **Helping you test APIs** as it allows you to create request stories (chain requests, use results of a request to make another one)\n- **Team player** as it allows you to naturally share your request collections with git\n\nComing soon:  \n- **Secure** as it handles secrets stored in hashi corp vault\n- **Enterprise friend** as it allows you to import OpenAPI definition files into apix requests files\n\n## help\n\n```bash\napix 0.3.0\n\n\nUSAGE:\n    apix [OPTIONS] \u003cSUBCOMMAND\u003e\n\nOPTIONS:\n    -h, --help       Print help information\n    -v, --verbose    print full request and response\n    -V, --version    Print version information\n\nSUBCOMMANDS:\n    completions    generate shell completions\n    config         configuration settings\n    ctl            apix control interface for handling multiple APIs\n    delete         delete an http resource\n    exec           execute a request from the current API context\n    get            get an http resource\n    head           get an http resource header\n    help           Print this message or the help of the given subcommand(s)\n    history        show history of requests sent (require project)\n    init           initialise a new API context in the current directory by using git\n    patch          patch an http resource\n    post           post to an http resource\n    put            put to an http resource\n```\n\n## make simple http requests\n\nEven if Apix allows you to use advanced mode by coupling it to a git repository and interpret openapi declarations (swagger), you also can use Apix as a replacement for curl, wget, httpie ...  \n  \nApix will colorize the output according to http **content-type** header information.  \n  \nBy default Apix will assume you are doing an API request using json.\n\n```bash\n\u003e apix get https://jsonplaceholder.typicode.com/todos?_limit=1\nor\n\u003e apix get https://jsonplaceholder.typicode.com/todos --query _limit:1\n\n[\n  {\n    \"userId\": 1,\n    \"id\": 1,\n    \"title\": \"delectus aut autem\",\n    \"completed\": false\n  }\n]\n```\nyou can also ask for verbose mode where apix will show you the full sended http request and response :\n```bash\n\u003e apix get -v https://jsonplaceholder.typicode.com/todos -q_limit:1\nGET /todos?_limit=3 HTTP/1.1\nhost: jsonplaceholder.typicode.com\nuser-agent: apix/0.1.0\naccept: application/json\naccept-encoding: gzip\ncontent-type: application/json\n\nHTTP/1.1 200 OK\ndate: Sun, 21 Nov 2021 17:29:22 GMT\ncontent-type: application/json; charset=utf-8\ntransfer-encoding: chunked\nconnection: keep-alive\naccess-control-allow-credentials: true\ncache-control: max-age=43200\npragma: no-cache\nexpires: -1\netag: W/\"136-fTr038fftlG9yIOWHGimupdrQDg\"\n\n[\n  {\n    \"userId\": 1,\n    \"id\": 1,\n    \"title\": \"delectus aut autem\",\n    \"completed\": false\n  }\n]\n```\n\n## Context\n\nApix handle contexts gracefully. Contexts are named resources to handle:\n- API bindings (based on openAPI)\n- Session authentification\n- Session cookies\n- variables bindings that can be used with templates\n\n### Create a new context\n\n```bash\napix ctl init MyContext\n```\n\n### Switching to another context\n\n```bash\napix ctl switch OtherContext\n```\n\n### List all contexts\n\n```bash\napix ctl get contexts\n```\n\n### Delete a context\n\n```bash\napix ctl delete MyContext\n```\n\n## apix commands\n\n### apix get\n\n```bash\napix-get \n\nget an http resource\n\nUSAGE:\n    apix get [OPTIONS] \u003curl\u003e\n\nARGS:\n    \u003curl\u003e    url to request, can be a 'Tera' template\n\nOPTIONS:\n    -b, --body \u003cbody\u003e        set body to send with request, can be a 'Tera' template\n    -c, --cookie \u003ccookie\u003e    set cookie name:value to send with request\n    -e, --env \u003cvariable\u003e     set variable name:value for 'Tera' template rendering\n    -f, --file \u003cfile\u003e        set body from file to send with request, can be a 'Tera' template\n    -h, --help               Print help information\n    -H, --header \u003cheader\u003e    set header name:value to send with request\n    -i, --insecure           allow insecure connections when using https\n    -q, --query \u003cquery\u003e      set query name:value to send with request\n    -v, --verbose            print full request and response\n```\n## Proxy\n\nApix uses system proxy by default. System proxy is taken from `HTTP_PROXY` and `HTTPS_PROXY` environment variables.\nYou can ovverride system proxy manually, either with request annotations on manifest files or on the command line.\nApix support `HTTP`, `HTTPS` and `SOCKS5` proxies.\n\nHere are the options available for configuring the proxy on the command line :\n```bash\n  -x, --proxy \u003curl\u003e             set proxy to use for request\n  --proxy-login \u003clogin\u003e         set proxy login to use for request\n  --proxy-password \u003cpassword\u003e   set proxy password to use for request\n```\nHere are the options available for configuting the proxy on manifests\n```yaml\nmetadata:\n  annotations:\n    apix.io/proxy-url: \u003curl\u003e\n    apix.io/proxy-login: \u003clogin\u003e\n    apix.io/proxy-password: \u003cpaswword\u003e\n```\n_example URL for proxies_:\n | HTTP                  | HTTPS                  | SOCKS5                  |\n | --------------------- | ---------------------- | ----------------------- |\n | http://localhost:3128 | https://localhost:3128 | socks5://localhost:1080 |\n\n\n# Persistance\n\n|   type   | persist mode | gitignore |               description               |\n| :------: | :----------: | :-------: | :-------------------------------------: |\n|  config  |     file     |    no     |             from cli config             |\n| requests |     file     |    no     |\n|  params  |     file     |    yes    |        auto saved from dialoguer        |\n| results  |     file     |    yes    |       auto saved after execution        |\n| cookies  |     file     |    yes    | auto saved after execution, auto reused |\n| storage  |     file     |    yes    |       saved from request response       |\n| secrets  |     web      |    N/A    |          from hashi corp vault          |\n","funding_links":["https://github.com/sponsors/ecyrbe","https://www.paypal.me/ecyrbe"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecyrbe%2Fapix-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecyrbe%2Fapix-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecyrbe%2Fapix-rust/lists"}