actpkg.dev
Components

library/sed

v0.1.0 Signed

Stream editor (sed) for filtering and transforming text

by @library updated 2026-08-12 1.6 MB 0

Install

$ act pull actpkg.dev/library/sed

Capabilities

Elevated host access

Requests: Filesystem read/write.

  • wasi:filesystem Filesystem read/write

    ** (rw)

Risk Low Medium High

Tools · 2

act:tools interface — expand a tool for its input schema.

  • sed

    Transform text with a sed script (text in, text out). By default the script is compiled in sandbox mode, which rejects the e, r and w commands.

    ParameterTypeDescription
    debugbooleanAnnotate program execution (`--debug`).
    input*stringText to transform.
    posixbooleanDisable GNU extensions (`--posix`).
    quietbooleanSuppress automatic printing of the pattern space (`-n`).
    script*stringThe sed program, e.g. `s/foo/bar/g`. Separate multiple commands with `;` or newlines.
    sandboxbooleanReject the `e` (shell), `r` (read file) and `w` (write file) commands when the script is compiled, before any input is read. Defaults to true; set false only when the script legitimately needs file I/O.
    separatebooleanConsider each input file separately rather than as one stream (`-s`).
    null_databooleanSeparate lines by NUL bytes instead of newlines (`-z`).
    line_lengthintegerLine-wrap length for the `l` command (`-l`).
    character_modeCharModeWhether data is interpreted as UTF-8 characters or raw bytes.
    extended_regexpbooleanUse extended regular expressions (`-E`).

    Returns content.

  • sed_files

    Run a sed script over files on disk, either returning the transformed text or editing the files in place. Each file is processed independently (sed -s).

    ParameterTypeDescription
    debugbooleanAnnotate program execution (`--debug`).
    paths*string[]Paths of the files to process. Must be non-empty.
    posixbooleanDisable GNU extensions (`--posix`).
    quietbooleanSuppress automatic printing of the pattern space (`-n`).
    script*stringThe sed program, e.g. `s/foo/bar/g`.
    sandboxbooleanReject the `e` (shell), `r` (read file) and `w` (write file) commands when the script is compiled, before any input is read. Defaults to true; set false only when the script legitimately needs file I/O.
    in_placebooleanEdit the files in place instead of returning the transformed text.
    separatebooleanConsider each input file separately rather than as one stream (`-s`).
    null_databooleanSeparate lines by NUL bytes instead of newlines (`-z`).
    line_lengthintegerLine-wrap length for the `l` command (`-l`).
    character_modeCharModeWhether data is interpreted as UTF-8 characters or raw bytes.
    extended_regexpbooleanUse extended regular expressions (`-E`).
    in_place_suffixstring | nullBackup suffix to keep the original under when editing in place (e.g. `.bak`). Implies `in_place`.

    Returns content.

Readme

No README provided.