| 1 | # cielago |
| 2 | |
| 3 | A vim-style TUI for building and sending HTTP requests, organized into |
| 4 | collections you can import straight from an OpenAPI spec. |
| 5 | |
| 6 | ## Features |
| 7 | |
| 8 | - **OpenAPI 3.x import** — turn a spec (file or URL) into a collection with |
| 9 | requests, params, example bodies, servers, and docs prefilled. |
| 10 | - **Ad-hoc collections** — no spec needed; paste a full URL and it's split into |
| 11 | server, path, and query params for you. |
| 12 | - **Vim-style TUI** — three panes (requests / editor / response), `j`/`k` |
| 13 | navigation, `:` command line, `/` incremental search. |
| 14 | - **Variables** — `{{name}}` from the collection, plus dynamic ones like |
| 15 | `{{uuid}}`, `{{timestamp}}`, `{{randomInt(1,100)}}`. |
| 16 | - **OAuth2 client credentials** — per collection, tokens cached in memory only. |
| 17 | - **Server switcher** — swap base URLs so requests stay portable across envs. |
| 18 | - **Syntax highlighting** — JSON and XML in both request bodies and responses. |
| 19 | - **Plain JSON storage** — collections live in `~/.config/cielago/collections/`. |
| 20 | |
| 21 | ## Installation |
| 22 | |
| 23 | ```sh |
| 24 | cargo install --path . |
| 25 | ``` |
| 26 | |
| 27 | Or build without installing: |
| 28 | |
| 29 | ```sh |
| 30 | cargo build --release |
| 31 | ./target/release/cielago --help |
| 32 | ``` |
| 33 | |
| 34 | ## Usage |
| 35 | |
| 36 | ```sh |
| 37 | cielago # open the last-used collection in the TUI |
| 38 | cielago open [name] # open a specific collection |
| 39 | cielago import <spec|url> # import an OpenAPI 3.x spec |
| 40 | cielago new <name> [--server u] # create an empty collection and open it |
| 41 | cielago list [-l] # list collections (-l adds counts + paths) |
| 42 | cielago info <name> # servers, counts, auth, groups |
| 43 | cielago edit <name> # edit the collection JSON in $EDITOR |
| 44 | cielago rename <name> <new> # rename a collection and its file |
| 45 | cielago delete <name> [-f] # delete a collection |
| 46 | cielago path <name> # print the collection's JSON path |
| 47 | ``` |
| 48 | |
| 49 | `<name>` matches loosely — `Some API`, `some api`, and `some-api` all resolve to |
| 50 | the same collection. |
| 51 | |
| 52 | ### Keys |
| 53 | |
| 54 | | Key | Action | |
| 55 | |---|---| |
| 56 | | `1`/`2`/`3`, `Tab` | Focus sidebar / editor / response | |
| 57 | | `z` | Maximize focused pane | |
| 58 | | `[` / `]` | Previous / next editor tab | |
| 59 | | `Enter` | Send request | |
| 60 | | `/` | Search requests | |
| 61 | | `E` / `A` | Servers / OAuth config | |
| 62 | | `:` | Command line (`:w`, `:q`, `:new`, `:open`, …) | |
| 63 | | `?` | Help | |
| 64 | |
| 65 | Sidebar: `n`/`r`/`d`/`y` new/rename/delete/duplicate, `t` cycle label source. |
| 66 | Tables: `space` toggle row, `i` edit, `a` add, `d` delete, `m` cycle method, |
| 67 | `p` edit URL. Body/response: `i` edit inline, `e` open in `$EDITOR`, |
| 68 | `j`/`k`/`d`/`u`/`g`/`G` scroll. |
| 69 | |
| 70 | Press `?` in the TUI for the full list. |
| 71 | |
| 72 | ## Development |
| 73 | |
| 74 | ```sh |
| 75 | cargo build |
| 76 | cargo test |
| 77 | cargo clippy --all-targets |
| 78 | cargo fmt |
| 79 | ``` |
| 80 | |
| 81 | ## License |
| 82 | |
| 83 | [MIT](LICENSE) |