← 返回命令列表

Linux command

atac 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Launch the TUI

atac

Specify a custom application directory

atac -d [path/to/directory]

Send a one-shot GET request

atac try [https://api.example.com/endpoint]

Send a request from a collection

atac request [collection/request_name] send

Send a request using an environment

atac request [collection/request_name] send --env [my_env]

Import a Postman collection

atac import postman [path/to/collection.json]

Import from a cURL command

atac import curl "[curl -X GET https://example.com]"

Generate shell completions

atac completions [bash|zsh|fish]

说明

atac (Arguably a Terminal API Client) is a feature-rich, terminal-based API testing tool written in Rust. It provides a Postman-like experience entirely within the terminal, supporting both an interactive TUI mode and a scriptable CLI mode. The TUI presents a full interface for building and organizing HTTP requests, viewing responses with syntax highlighting, managing collections, and switching between environments. The CLI mode allows sending requests, managing collections, and importing data non-interactively, making it suitable for scripting and automation. atac supports all standard HTTP methods including GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, TRACE, and CONNECT. Authentication options include Basic, Bearer token, Digest, and JWT. Request bodies can be JSON, XML, HTML, plain text, multipart form, URL-encoded form, or file uploads. Full response details are available including status codes, headers, cookies, and timing. Beyond HTTP, atac includes a WebSocket client supporting text, binary, ping, pong, and close messages. A built-in JavaScript runtime enables pre-request and post-request scripting for dynamic request modification and response processing. Collections and environments are stored as human-readable JSON or YAML files, designed to be committed to version control. Environment variables are defined in .env files and referenced in requests using {{variable_name}} syntax. The tool can import from Postman v2.1.0 collections, OpenAPI specifications, and cURL commands, and can export requests to cURL, PHP Guzzle, Node.js Axios, Rust Reqwest, and raw HTTP formats.

参数

-d _directory_, --directory _directory_
Main application directory containing collection files, the atac.toml config file, and the atac.log file
--filter _regex_
Only parse collection files whose names match the given regular expression
--tui
Run the TUI after executing a CLI subcommand
--dry-run
Avoid saving data to collection and environment files
--no-ansi-log
Avoid using ANSI formatting in log file output
-v, --verbose
Increase verbosity level; can be repeated for more detail
collection
Manage collections (list, create, delete, rename)
request
Manage and send requests within a collection
try
One-shot request sender for quick API calls without a saved collection
env
Manage environment files and variables
import
Import collections, requests, or environments from Postman v2.1.0, cURL, or OpenAPI formats
completions
Generate shell completion scripts for bash, zsh, or fish
man
Generate the ATAC man page

FAQ

What is the atac command used for?

atac (Arguably a Terminal API Client) is a feature-rich, terminal-based API testing tool written in Rust. It provides a Postman-like experience entirely within the terminal, supporting both an interactive TUI mode and a scriptable CLI mode. The TUI presents a full interface for building and organizing HTTP requests, viewing responses with syntax highlighting, managing collections, and switching between environments. The CLI mode allows sending requests, managing collections, and importing data non-interactively, making it suitable for scripting and automation. atac supports all standard HTTP methods including GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, TRACE, and CONNECT. Authentication options include Basic, Bearer token, Digest, and JWT. Request bodies can be JSON, XML, HTML, plain text, multipart form, URL-encoded form, or file uploads. Full response details are available including status codes, headers, cookies, and timing. Beyond HTTP, atac includes a WebSocket client supporting text, binary, ping, pong, and close messages. A built-in JavaScript runtime enables pre-request and post-request scripting for dynamic request modification and response processing. Collections and environments are stored as human-readable JSON or YAML files, designed to be committed to version control. Environment variables are defined in .env files and referenced in requests using {{variable_name}} syntax. The tool can import from Postman v2.1.0 collections, OpenAPI specifications, and cURL commands, and can export requests to cURL, PHP Guzzle, Node.js Axios, Rust Reqwest, and raw HTTP formats.

How do I run a basic atac example?

Run `atac` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -d _directory_, --directory _directory_ do in atac?

Main application directory containing collection files, the atac.toml config file, and the atac.log file