사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/alekzonder/tariboy-store --skill cli-text시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
CLI Text
Keep text as data through every parser. Check the receiving command's help; use only documented arguments and input modes.
| Available interface | Pass text with |
|---|---|
| Structured tool or process argv API | A string field or one argv element, without a shell |
| CLI file/stdin input | A tool-written file or quoted heredoc; e.g. gh pr create --body-file PATH |
| Shell and positional/flag value only | Quoted heredoc into a variable, then one quoted argument |
Use the owning skill's storage rules first (Markdown, one-line status, context scope). This skill handles transport, not authorization or formatting policy. Use -- for leading-hyphen positional text only if the CLI documents it. Shell quoting does not disable option parsing.
Bash text argument
Choose a delimiter absent from every complete payload line; place both delimiter lines at column 1. Never interpolate payload into an unquoted heredoc.
CLI_TEXT=$(cat <<'CLI_TEXT_84_END'
O'Reilly: `literal` $(literal) $HOME \path — Привет
CLI_TEXT_84_END
)
note-cli set "$CLI_TEXT"Command substitution removes ALL trailing newlines. This recipe is suitable only when that matches the requested text. If exact trailing newlines matter, use file/stdin when supported, or append a sentinel inside the substitution and remove only that sentinel afterward. Empty text is one argument: "". NUL cannot be represented in argv or Bash variables; use documented binary file/stdin input or report that the interface cannot carry it.
Codex JavaScript → Bash
This complete snippet assumes body is an existing string and note-cli set accepts one text argument. It preserves empty text and exact trailing newlines. It needs no Node APIs, encoder or filesystem in the JavaScript isolate.
if (body.includes("\0")) throw new Error("CLI argv cannot contain NUL");
let delimiter = "CLI_TEXT_END";
const lines = body.split("\n");
while (lines.includes(delimiter)) delimiter += "_";
const cmd = "CLI_TEXT=$(cat <<'" + delimiter + "'\n" + body +
"\n" + delimiter + "\nprintf .\n)\n" +
'CLI_TEXT=${CLI_TEXT%.}\nCLI_TEXT=${CLI_TEXT%?}\n' +
'note-cli set "$CLI_TEXT"';
const result = await tools.exec_command({cmd});
if (result.exit_code !== 0) throw new Error("Text write did not finish successfully");The sentinel preserves the heredoc's trailing newlines; the second removal removes exactly the ONE newline added before the closing delimiter. Wait for any running tool process before checking its exit status. After a successful write, use the documented read API when available and compare saved text with the intended value (allow only documented storage normalization). Verify before retrying an uncertain write to avoid duplicate comments or messages.
Common mistakes
JSON.stringify serializes JSON; it does not quote for a shell. Backticks and $() still execute inside shell double quotes. Never use eval, rebuild a command from text, or hand-roll Base64 to repair quoting. Treat generated, user, and log text alike. Check each actual parser boundary, including remote shells; avoid an extra shell when a direct argv API exists.





