W
wankdanker/clyops
A cross-language option parser that turns your programs/scripts into typed tools for humans, HTTP clients,…
在 GitHub 查看 ↗链接已于 2026-11-12 核查 · HTTP 200 · 打开的是厂商自己的官网
- ★ 数取值
- 3 ★ · wankdanker/clyops · 取自 GitHub 搜索 API · (2026-11-13 20:00:50 核对)
- 来源明细
- 从该仓库的 GitHub 页面直接读取 · 条目类型:开源项目
- 收录与活跃
- 收录于 2026-10-26 · 最近见到 2026-11-14 · 共见到 23 次 · 被 2 个来源列出
- 评分构成
- 综合分 203 · 3 ★ · 2 个来源 · repo
常见问题(答案都来自我们的记录)
它适合谁 / 用来做什么?
我们把它归在这些标签下: 开源项目。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库
wankdanker/clyops;我们收录于 2026-10-26;最近见到 2026-11-14。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。# clyops
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Define your CLI once. Use it from terminals, desktop forms, HTTP and AI agents.
clyops turns the options beside your code into a consistent, machine-readable
contract. Keep the execution logic in your language; use the same tool through
the terminal, the desktop runner, the HTTP API or an MCP client.
Register your options and arguments once at the top of a program, and clyops
handles parsing, validation, help text, config files, environment variables,
a JSON schema of the interface, logging helpers and shell completion for
bash, zsh and fish.
See the animated project homepage or
run the walkthrough: one small deployment-plan tool, from
generated help to an agent call and an HTTP endpoint.
Try the mixed Bash/Python scripts immediately after cloning:
sh
./examples/scripts/plan.py --env production --replicas 3
./examples/scripts/report.py --format table
./examples/scripts/transcode.sh examples/data/tone.wav /tmp/clyops-demo.m4a
No library compilation or pip dependencies are needed. FFmpeg and curl wrappers
preview commands before explicit execution. The browser playground
executes the Python examples in your tab.
The same behavior ships for Bash, JavaScript, TypeScript, Python, Rust, C,
Go, Ruby and Java. Every implementation is checked against one shared specification
and conformance suite, so a tool keeps the same help
output, error messages and completion when you port it from Bash to Rust.
sh
clyopsopt PORT port p 8080 "Server port" Network port # Bash
js
cli.opt('PORT', 'port', 'p', '8080', 'Server port', 'Network', 'port'); // JavaScript / TypeScript
python
cli.opt("PORT", "port", "p", "8080", "Server port", "Network", "port") # Python
rust
cli.opt("PORT", "port", "p", "8080", "Server port").group("Network").rule("port"); // Rust
clyopsopt(cli, "PORT", "port", "8080", .shortname = 'p', .description = "Server port", .group = "Network", .rule = "port"); // C
go
cli.Opt("PORT", "port", "p", "8080", "Server port", "Network", "port") // Go
ruby
cli.opt "PORT", "port", "p", "8080", "Server port", "Network", "port" # Ruby
java
cli.opt("PORT", "port", "p", "8080", "Server port", "Network", "port"); // Java
## A complete program
Bash Python
bash
#!/usr/bin/env bash
source clyops.sh
clyopsdescription "Copy files to a server."
clyopsarg SRC "File to send" "" "file:exists"
clyopsargvariadic EXTRA "More files" "file:exists"
clyopsopt HOST host H localhost "Server" Network hostname
clyopsopt PORT port p 22 "Port" Network port
clyopsopt VERBOSE verbose v flag "Chatty"
clyopsopt CONFIG config c optional "Config file" Config path
clyopsconfig config "send:"
clyopsrun "$@"
info "sending $SRC to $HOST:$PORT"
python
#!/usr/bin/env python3
from clyops import Cli, info
cli = Cli()
cli.setdescription("Copy files to a server.")
cli.arg("SRC", "File to send", "", "file:exists")
cli.argvariadic("EXTRA", "More files", "file:exists")
cli.opt("HOST", "host", "H", "localhost", "Server", "Network", "hostname")
cli.opt("PORT", "port", "p", "22", "Port", "Network", "port")
cli.opt("VERBOSE", "verbose", "v", "flag", "Chatty")
cli.opt("CONFIG", "config", "c", "optional", "Config file", "Config", "path")
cli.setconfig("config", "send:")
args = cli.run()
info(f"sending {args.SRC} to {args.HOST}:{args.PORT}")
clyops turns the options beside your code into a consistent, machine-readable
contract. Keep the execution logic in your language; use the same tool through
the terminal, the desktop runner, the HTTP API or an MCP client.
Register your options and arguments once at the top of a program, and clyops
handles parsing, validation, help text, config files, environment variables,
a JSON schema of the interface, logging helpers and shell completion for
bash, zsh and fish.
See the animated project homepage or
run the walkthrough: one small deployment-plan tool, from
generated help to an agent call and an HTTP endpoint.
Try the mixed Bash/Python scripts immediately after cloning:
sh
./examples/scripts/plan.py --env production --replicas 3
./examples/scripts/report.py --format table
./examples/scripts/transcode.sh examples/data/tone.wav /tmp/clyops-demo.m4a
No library compilation or pip dependencies are needed. FFmpeg and curl wrappers
preview commands before explicit execution. The browser playground
executes the Python examples in your tab.
The same behavior ships for Bash, JavaScript, TypeScript, Python, Rust, C,
Go, Ruby and Java. Every implementation is checked against one shared specification
and conformance suite, so a tool keeps the same help
output, error messages and completion when you port it from Bash to Rust.
sh
clyopsopt PORT port p 8080 "Server port" Network port # Bash
js
cli.opt('PORT', 'port', 'p', '8080', 'Server port', 'Network', 'port'); // JavaScript / TypeScript
python
cli.opt("PORT", "port", "p", "8080", "Server port", "Network", "port") # Python
rust
cli.opt("PORT", "port", "p", "8080", "Server port").group("Network").rule("port"); // Rust
clyopsopt(cli, "PORT", "port", "8080", .shortname = 'p', .description = "Server port", .group = "Network", .rule = "port"); // C
go
cli.Opt("PORT", "port", "p", "8080", "Server port", "Network", "port") // Go
ruby
cli.opt "PORT", "port", "p", "8080", "Server port", "Network", "port" # Ruby
java
cli.opt("PORT", "port", "p", "8080", "Server port", "Network", "port"); // Java
## A complete program
Bash Python
bash
#!/usr/bin/env bash
source clyops.sh
clyopsdescription "Copy files to a server."
clyopsarg SRC "File to send" "" "file:exists"
clyopsargvariadic EXTRA "More files" "file:exists"
clyopsopt HOST host H localhost "Server" Network hostname
clyopsopt PORT port p 22 "Port" Network port
clyopsopt VERBOSE verbose v flag "Chatty"
clyopsopt CONFIG config c optional "Config file" Config path
clyopsconfig config "send:"
clyopsrun "$@"
info "sending $SRC to $HOST:$PORT"
python
#!/usr/bin/env python3
from clyops import Cli, info
cli = Cli()
cli.setdescription("Copy files to a server.")
cli.arg("SRC", "File to send", "", "file:exists")
cli.argvariadic("EXTRA", "More files", "file:exists")
cli.opt("HOST", "host", "H", "localhost", "Server", "Network", "hostname")
cli.opt("PORT", "port", "p", "22", "Port", "Network", "port")
cli.opt("VERBOSE", "verbose", "v", "flag", "Chatty")
cli.opt("CONFIG", "config", "c", "optional", "Config file", "Config", "path")
cli.setconfig("config", "send:")
args = cli.run()
info(f"sending {args.SRC} to {args.HOST}:{args.PORT}")
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[](https://anclum.com/zh/s/wankdanker-clyops/)
- 来源
- github · https://github.com/wankdanker/clyops
- 按领域浏览
- 开源项目
- Traction
- 3 ★
- 收录来源
- 2 个独立来源
- 收录于
- 今天
同类推荐
所属领域与标签
每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。