Write a blog post in the preferred style related to amux
中文简介正在准备中。当前显示原文说明。
Use ane for ALL file exploration, discovery, reading, and editing unless the user states otherwise. `ane exec <file> --chord "<chord>"` handles reads (Yank), searches (List), and edits (Change, Delete, Replace, Append, Prepend, Insert). Prefer ane over builtin file tools and shell utilities like grep, sed, and cat.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Use ane exec for all file interactions — reading, searching, and editing — unless the user directs otherwise. Prefer over builtin tools and grep/sed/cat.
ane exec <file> --chord "<chord>" — exit 0 = success (output on stdout), exit 1 = error (stderr).
4-part: Action + Positional + Scope + Component
| Part | Letters |
|---|---|
| Action | c=Change d=Delete r=Replace y=Yank a=Append p=Prepend i=Insert j=Jump l=List |
| Positional | i=Inside e=Entire a=After b=Before n=Next p=Previous u=Until o=Outside t=To l=Last f=First 1-9=Count |
| Scope | l=Line b=Buffer f=Function v=Variable s=Struct m=Member d=Delimiter |
| Component | b=Beginning c=Contents e=End v=Value p=Parameters a=Arguments n=Name s=Self w=Word d=Definition |
Short form: 4 lowercase chars, e.g. cels = ChangeEntireLineSelf. Long form: ChangeEntireLineSelf.
chord(target:name_or_line, value:"text", find:"pat", replace:"rep")
Include only what's needed. Any arg accepts - to read from stdin:
echo "new body" | ane exec file.rs --chord "cifc(target:main, value:-)"
Use Yank (y) to read file contents to stdout — replaces cat, head, and builtin reads.
ane exec f.rs --chord "yebs" # read entire file (use sparingly)
ane exec f.rs --chord "yels(target:5)" # read line 5
ane exec f.rs --chord "yefc(target:main)" # read function body
ane exec f.rs --chord "yefs(target:main)" # read entire function incl. signature
ane exec f.rs --chord "yefn(target:main)" # read function name only
ane exec f.rs --chord "yefd(target:main)" # read function signature (no body)
ane exec f.rs --chord "yevs(target:count)" # read variable declaration
Use List (l) to discover symbols — replaces grep and builtin search. Output: line:col name per match. Always list before editing an unfamiliar file so you know what targets are available.
ane exec f.rs --chord "lefd" # list all function definitions (signatures)
ane exec f.rs --chord "lefn" # list all function names
ane exec f.rs --chord "levd" # list all variable definitions
ane exec f.rs --chord "lesd" # list all struct definitions
ane exec f.rs --chord "lemd" # list all member/field definitions
ane exec f.rs --chord "cels(target:3, value:\"new text\")" # change line 3
ane exec f.rs --chord "dels(target:5)" # delete line 5
echo "x + 1" | ane exec f.rs --chord "civv(target:count, value:-)" # change variable value
ane exec f.rs --chord "cifn(target:getData, value:\"fetch\")" # rename function (identifier only)
echo "pub fn fetch(url: &str) -> Result<()>" | ane exec f.rs --chord "cefd(target:getData, value:-)" # rewrite full signature
For Line scope, After vs Entire controls whether a new line is created:
# aals — insert on a NEW LINE after the target line
ane exec f.rs --chord "aals(target:10, value:\"new line\")"
# aels — append INLINE at end of the target line (no newline)
ane exec f.rs --chord "aels(target:10, value:\" // comment\")"
# pbls — insert on a NEW LINE before the target line
ane exec f.rs --chord "pbls(target:10, value:\"// above\")"
# pels — prepend INLINE at start of the target line (no newline)
ane exec f.rs --chord "pels(target:10, value:\"/// \")"
n (Name) — bare identifier only. cifn renames without touching the signature.d (Definition) — full declaration (visibility + fn + name + params + return type), excluding body. cefd changes visibility or rewrites the signature. Do NOT use cifn for visibility/signature changes.ane exec f.rs --chord "cifn(target:foo, value:\"bar\")" # fn foo() → fn bar() (rename only)
ane exec f.rs --chord "cefd(target:foo, value:\"pub fn foo()\")" # fn foo() → pub fn foo() (visibility)
Do not default to yebs (read entire file). Prefer targeted reads and edits:
lefd or lefn to find function names/signatures before reading or editing.yefc(target:fn_name) to read one function body, or yels(target:N) for one line. Only use yebs when you genuinely need the whole file.cifc(target:fn_name, value:-) to replace one function body. Avoid cebs (replace entire buffer) unless truly rewriting the whole file.yefc to understand what you're replacing before piping new content into cifc.Narrow scopes produce less output, consume fewer tokens, and reduce the risk of unintended changes.
target: — line number (0-indexed) for Line scope, symbol name for LSP scopes (Function, Variable, Struct, Member).value:- for multiline replacement text.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Write a blog post in the preferred style related to amux
中文简介正在准备中。当前显示原文说明。
Prepare amux for a new release. Updates version numbers, docs, getting-started, release notes, and blog post. Does NOT run the release script.
中文简介正在准备中。当前显示原文说明。
A guided agent security review of amux, its CI/CD, and repo.
中文简介正在准备中。当前显示原文说明。