curlie:The power of curl, the ease of use of httpie.

The power of curl, the ease of use of httpie.

分支2Tags35
文件最后提交记录最后更新时间
1 年前
10 个月前
7 年前
2 年前
7 年前
1 年前
7 年前
6 个月前
7 年前
4 年前
4 年前
1 年前
1 年前
1 年前

Curlie

如果您喜欢 HTTPie 的界面,但又怀念 curl 的功能,那么 curlie 正是您要找的工具。Curlie 是 curl 的前端工具,它融入了 httpie 的易用性,同时不影响功能和性能。所有 curl 选项都通过语法糖暴露出来,输出格式则借鉴了 httpie 的设计。

安装

使用 homebrew

brew install curlie

使用 webi

# macOS / Linux
curl -sS https://webinstall.dev/curlie | bash
# Windows
curl.exe -A "MS" https://webinstall.dev/curlie | powershell

使用 eget

# Ubuntu/Debian
eget rs/curlie -a deb --to=curlie.deb
sudo dpkg -i curlie.deb

使用 macports

sudo port install curlie

使用 pkg

pkg install curlie

使用 go

go install github.com/rs/curlie@latest

使用 scoop

scoop install curlie

使用 mise

mise use -g curlie@latest

或者下载 二进制包

用法

语法:

curlie [CURL_OPTIONS...] [METHOD] URL [ITEM [ITEM]]

简单 GET 请求:

Simple GET request example

自定义方法、请求头和 JSON 数据:

Custom PUT request with headers and JSON data example

在交互模式下运行时,curlie 会对 JSON 输出进行格式化展示。若要强制进行格式化输出,可传递 --pretty 参数。

构建

使用 goreleaser 进行构建,以测试所有平台是否能正确编译。

goreleaser build --clean --snapshot

或者仅适用于您当前的平台。

goreleaser build --clean --snapshot --single-target

与 httpie 的差异

  • curl 类似但与 httpie 不同,头部信息输出到 stderr 而非 stdout
  • 输出不进行缓冲,所有格式化操作实时完成,因此您可以轻松调试流式数据。
  • 使用 --curl 选项可打印执行的 curl 命令。

许可证

所有源代码均根据 MIT 许可证 授权。

项目介绍

curl 的强大,httpie 的易用。【此简介由AI生成】

定制我的领域
253.68 K114访问 GitHub