#postman #tui #api-client #api #insomnia

app atac

Arguably a Terminal API Client. Feature-full, free, open-source, offline and account-less.

10 releases (4 breaking)

0.15.1 May 3, 2024
0.15.0 May 1, 2024
0.14.0 Apr 23, 2024
0.13.0 Apr 18, 2024
0.11.3 Apr 15, 2024

#97 in Web programming

Download history 634/week @ 2024-04-15 231/week @ 2024-04-22 374/week @ 2024-04-29 50/week @ 2024-05-06

1,289 downloads per month

MIT and GPL-3.0-only

4.5MB
7K SLoC

ATAC βš”πŸ“©

Rust License: MIT GitHub Release

Demo Animation

Table Of Contents

Description

ATAC is Arguably a Terminal API Client. It is based on well-known clients such as Postman, Insomnia, or even Bruno, but inside your terminal without any specific graphical environment needed.

The philosophy of ATAC is to be free, account-less, and offline for now and forever.

How to install

Packaging status

crates.io package

Install with cargo

[!IMPORTANT] First, make sure your rust version is at least 1.76

Simply use:

cargo install atac
Arch package

Install from Arch

You can use pacman to install:

pacman -S atac

Install with Homebrew

Simply use:

brew tap julien-cpsn/atac
brew install atac
Fedora copr Release

Install from Fedora copr

Simply use:

dnf enable joxcat/atac
dnf install atac
GitHub Release

Binary

The binaries from the latest release can be found here

[!IMPORTANT] Remember to run it from a terminal. For example, you can add the binary into your PATH. You won't be able to run it like other graphical applications since it needs CLI arguments.

[!TIP] Note for macOS users. After downloading the binary you may need to run the command sudo xattr -rd com.apple.quarantine ~/bin/atac (modify to reflect the path where atac is located).

Compile by yourself

[!IMPORTANT] First, make sure your rust version is at least 1.76

Simply clone the repository and use:

cargo run
cargo run -- -h

[!TIP] Build the latest release

cargo build --release

Features

Current

Features ATAC Postman Insomnia
Manage collections & requests βœ… βœ… βœ…
HTTP Client βœ… βœ… βœ…
Methods βœ… βœ… βœ…
- GET βœ… βœ… βœ…
- POST βœ… βœ… βœ…
- PUT βœ… βœ… βœ…
- PATCH βœ… βœ… βœ…
- DELETE βœ… βœ… βœ…
- HEAD βœ… βœ… βœ…
- OPTIONS βœ… βœ… βœ…
Authentication Partial βœ… βœ…
- Basic auth βœ… βœ… βœ…
- Bearer token βœ… βœ… βœ…
- JWT, Digest, OAuth1-2, AWS ❌ πŸ”œ βœ… βœ…
Headers βœ… βœ… βœ…
Body βœ… βœ… βœ…
- Multipart form βœ… βœ… βœ…
- URL Encoded form βœ… βœ… βœ…
- File βœ… βœ… βœ…
- Plain text βœ… βœ… βœ…
- JSON, XML, HTML, Javascript βœ… βœ… βœ…
Full response βœ… βœ… βœ…
- Status code βœ… βœ… βœ…
- Cookies βœ… βœ… βœ…
- Headers βœ… βœ… βœ…
- Duration βœ… βœ… βœ…
Scripting βœ… Partial ❌
- Pre-request script βœ… ❌ ❌
- Post-request script βœ… βœ… ❌
Asynchronous requests βœ… βœ… βœ…
Per-request settings βœ… βœ… βœ…
- Use proxy βœ… βœ… βœ…
- Allow redirects βœ… βœ… βœ…
- Store cookies βœ… βœ… βœ…
Export to other languages ❌ πŸ”œ βœ… ❌
WebSocket Client ❌ πŸ”œ βœ… βœ…
GraphQL ❌ πŸ”œ βœ… βœ…
gRPC ❌ πŸ”œ βœ… βœ…
MQTT ❌ πŸ”œ βœ… ❌
Free βœ… Depends Depends
Lightweight, fast and efficient βœ… ❌ ❌
Data storage Your own committable, readable and versioned files (JSON or YAML) Tied to your account Tied to your account
Offline βœ… ❌ ❌
Real-time collaboration ❌ (not planned) βœ… βœ…
Environment files and variables βœ… (committable, readable and versioned) βœ… βœ…
View options βœ… βœ… βœ…
Global configuration file βœ… βœ… βœ…
- HTTP/HTTPS Proxy βœ… βœ… βœ…
- Disable CORS βœ… ❌ ❌
- Toggle syntax highlighting βœ… ❌ ❌
Postman v2.1.0 import βœ… βœ… βœ…
OpenAPI import ❌ πŸ”œ βœ… βœ…

TODO v1.0.0

  • To add

    • Create a repo wiki
    • Document the whole code
    • Command line usage (send requests, add new requests)
    • Request body syntax highlighting
    • Export a request to other code formats (raw, curl, PHP, JS, Rust, ...)
    • OpenAPI & Insomnia import
  • To improve

  • To fix

    • Query parameters bug

TODO v2.0.0

  • To add
    • WebSocket requests
    • Maybe GraphQL requests
    • Maybe MQTT requests
    • Maybe gRPC requests

Ideas (will think about it later)

  • Base URL property on collections

Documentation

[!NOTE] Documentation will soon be published in the wiki section

Others

Vim key-bindings

You can read more about it here: https://github.com/Julien-cpsn/ATAC/releases/tag/v0.14.0

NeoVim integration

Thanks to @NachoNievaG you can have an ATAC floating window inside your nvim https://github.com/NachoNievaG/atac.nvim

Technical precisions

Tested on

  • Console Host
    • Windows 11 (Pro)
    • WSL2 Debian
    • Windows 10 (Pro)
    • Windows 8.1 (N)
  • Ubuntu Desktop Terminal
    • Ubuntu 17.10
    • Pop!_OS 20.04
  • (Arch, Manjaro) KDE Konsole
  • (Arch, NixOS) Kitty
  • Linux Mint
  • (OpenSuse) Alacritty
  • (Chrome OS) Crostini

(List from here)

Dependencies

Library Version Reason
reqwest & reqwest cookie store 0.11.27 & 0.6.0 Send requests
ratatui 0.26.2 Terminal UI framework
crossterm 0.27.0 Terminal Backend
crokey 0.6.4 Used to parse, use key bindings files and some utilities
tui-big-text 0.4.2 Display big texts. Only used for displaying ATAC in the homepage.
tui-tree-widget 0.19.0 Display tree-like lists. Used for displaying the collections.
tui-textarea 0.5.0 Text area that handle a lot of features. Used for editing request body.
throbber-widgets-tui 0.4.1 Display loading UI elements. Used when request is pending.
ratatui-image 1.0.0 Display response images.
image 0.24.9 Decode images.
syntect 5.2.0 Syntax highlighting
serde (serde_json, serde-yaml) 1.0.197 (1.0.144, 0.9.34) Serialize & Deserialize application data into files
jsonxf 0.1.1 Pretty print JSON
toml 0.8.11 Serialize & Deserialize application config files
boa_engine 0.18.0 Create Javascript runtimes. Used for pre and post request scripts
My fork of postman_collection 0.2.1 Deserialize Postman collection files
clap 4.5.0 Command Line Argument Parser
arboard 3.3.2 Copy response body to clipboard
tokio 1.0.0 Handle asynchronous requests
parking_lot 0.12.2 Smaller, faster and more flexible implementation of RwLock and Mutex. Used everywhere.
strum 0.26.2 Enum facilities
lazy_static 1.4.0 Allows for more flexible constants. Mainly used for accessing CLI arguments everywhere
nestify 0.3.3 Used to nest struct definitions
snailquote 0.3.1 Unescape string
indexmap 2.2.6 Ordered hashmap. Used in environments to preserve files' values order
base64 0.22.0 Encode auth.
regex 1.10.3 Regex. Using for parsing requests URL

Binary size

The binary file size goes from ~4.5 MB to ~7 MB depending on the platform. I try to keep it as small as possible.

Contributors

Maintainers

Packagers

Star history

Star History Chart

License

The MIT license for this project can be seen here

Dependencies

~49–68MB
~1M SLoC