kugiri
Marker-based block editing CLI for maintaining sections in text files.
Installation
Quick Install
Install the latest release:
|
Or run without installation:
# Pass arguments to kugiri (use -s -- to pass arguments)
|
Install Specific Version
VERSION="v0.2.1"
|
Secure Installation with Verification
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"
| \
(tmpfile=; ; \
&& \
; )
VERSION="v0.2.1"
SCRIPT="install.sh" # or "run.sh"
DOWNLOAD_URL="https://github.com/actionutils/kugiri/releases/download/"
| \
(tmpfile=; ; \
&& \
; )
| \
(tmpfile=; ; \
&& \
; )
VERSION="v0.2.1"
| \
(tmpfile=; ; \
&& \
; )
Install from crates.io
If you have Rust and Cargo installed:
Usage
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 marker
Commands
Insert
Add a new section before or after an existing marker:
# Insert after a marker
# Insert before a marker with content from stdin
|
Update
Replace the content of an existing section:
# Update section from file
# Update from stdin
|
Remove
Remove a section and its markers:
Extract
Print the content of a section (without markers):
Trim
Remove all KUGIRI markers from a file:
Wrap
Wrap content with KUGIRI markers:
# Wrap stdin content
|
# Wrap content from a file
Options
-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
Examples
Managing a CHANGELOG
# First release
|
# Subsequent releases
|
Updating generated documentation
# Generate and update help section
|
# Extract for separate file
License
MIT