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