| Crates.io | kugiri |
| lib.rs | kugiri |
| version | 0.2.3 |
| created_at | 2025-09-23 13:08:26.258248+00 |
| updated_at | 2025-09-27 07:29:51.121735+00 |
| description | Marker-based block editing CLI |
| homepage | |
| repository | https://github.com/actionutils/kugiri |
| max_upload_size | |
| id | 1851413 |
| size | 132,616 |
Marker-based block editing CLI for maintaining sections in text files.
Install the latest release:
curl -sSfL https://github.com/actionutils/kugiri/releases/latest/download/install.sh | sh
Or run without installation:
# Pass arguments to kugiri (use -s -- to pass arguments)
curl -sSfL https://github.com/actionutils/kugiri/releases/latest/download/run.sh | sh -s -- update --help
VERSION="v0.2.3"
curl -sSfL https://github.com/actionutils/kugiri/releases/download/${VERSION}/install.sh | sh
For enhanced security, verify the installation scripts before executing them.
SCRIPT="install.sh" # or "run.sh"
DOWNLOAD_URL="https://github.com/actionutils/kugiri/releases/latest/download"
curl -sL "${DOWNLOAD_URL}/${SCRIPT}" | \
(tmpfile=$(mktemp); cat > "$tmpfile"; \
cosign verify-blob \
--certificate-identity-regexp '^https://github.com/actionutils/trusted-go-releaser/.github/workflows/trusted-release-workflow.yml@.*$' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
--certificate "${DOWNLOAD_URL}/${SCRIPT}.pem" \
--signature "${DOWNLOAD_URL}/${SCRIPT}.sig" \
"$tmpfile" && \
sh "$tmpfile"; rm -f "$tmpfile")
VERSION="v0.2.3"
SCRIPT="install.sh" # or "run.sh"
DOWNLOAD_URL="https://github.com/actionutils/kugiri/releases/download/${VERSION}"
curl -sL "${DOWNLOAD_URL}/${SCRIPT}" | \
(tmpfile=$(mktemp); cat > "$tmpfile"; \
cosign verify-blob \
--certificate-identity-regexp '^https://github.com/actionutils/trusted-go-releaser/.github/workflows/trusted-release-workflow.yml@.*$' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
--certificate "${DOWNLOAD_URL}/${SCRIPT}.pem" \
--signature "${DOWNLOAD_URL}/${SCRIPT}.sig" \
"$tmpfile" && \
sh "$tmpfile"; rm -f "$tmpfile")
curl -sL "https://github.com/actionutils/kugiri/releases/latest/download/install.sh" | \
(tmpfile=$(mktemp); cat > "$tmpfile"; \
gh attestation verify --repo=actionutils/kugiri \
--signer-workflow='actionutils/trusted-go-releaser/.github/workflows/trusted-release-workflow.yml' \
"$tmpfile" && \
sh "$tmpfile"; rm -f "$tmpfile")
VERSION="v0.2.3"
curl -sL "https://github.com/actionutils/kugiri/releases/download/${VERSION}/install.sh" | \
(tmpfile=$(mktemp); cat > "$tmpfile"; \
gh attestation verify --repo=actionutils/kugiri \
--signer-workflow='actionutils/trusted-go-releaser/.github/workflows/trusted-release-workflow.yml' \
"$tmpfile" && \
sh "$tmpfile"; rm -f "$tmpfile")
If you have Rust and Cargo installed:
cargo install kugiri
kugiri uses markers to identify sections in files:
<!-- KUGIRI-BEGIN: {id} --> - Start of a section<!-- KUGIRI-END: {id} --> - End of a section<!-- KUGIRI-INSERT: {id} --> - Insertion point markerAdd a new section before or after an existing marker:
# Insert after a marker
kugiri insert CHANGELOG.md --id v1.0.0 --after HEADER --body-file release.md -w
# Insert before a marker with content from stdin
echo "New content" | kugiri insert README.md --id section1 --before footer
Replace the content of an existing section:
# Update section from file
kugiri update README.md --id help-section --body-file help.txt -w
# Update from stdin
generate-help | kugiri update README.md --id help-section -w
Remove a section and its markers:
kugiri remove README.md --id deprecated-section -w
Print the content of a section (without markers):
kugiri extract README.md --id help-section > help.txt
Remove all KUGIRI markers from a file:
kugiri trim README.md > clean.md
Wrap content with KUGIRI markers:
# Wrap stdin content
echo "Some content" | kugiri wrap --id section-name
# Wrap content from a file
kugiri wrap --id section-name --body-file content.txt
-w, --write: Write changes in-place (default: output to stdout)--body-file <PATH|->: Content source file (default: - for stdin)--before <ID>: Insert before this marker ID--after <ID>: Insert after this marker ID--id <ID>: Section identifier# First release
echo "## v1.0.0 - Initial release" | kugiri insert CHANGELOG.md \
--id v1.0.0 --after HEADER -w
# Subsequent releases
echo "## v1.1.0 - Bug fixes" | kugiri insert CHANGELOG.md \
--id v1.1.0 --after v1.0.0 -w
# Generate and update help section
./generate-help.sh | kugiri update README.md --id CLI-HELP -w
# Extract for separate file
kugiri extract README.md --id CLI-HELP > docs/cli.md
MIT