Skip to main content

Crate atomwrite

Crate atomwrite 

Source
Expand description

Atomic file operations CLI library for LLM agents.

Modules§

atomic
Atomic file write pipeline. Atomic file write pipeline: tempfile, fsync, rename, fsync directory.
binary_detect
Binary content detection heuristics. Binary content detection via null-byte heuristic.
checksum
BLAKE3 checksum computation. BLAKE3 checksum computation for files and byte slices.
cli
CLI definition and argument parsing. CLI argument parser and subcommand dispatch definitions.
cli_args
Subcommand argument structs. Subcommand argument structs and value enums for clap.
commands
Subcommand handler implementations. Subcommand handler implementations for all atomwrite operations.
constants
Named constants for buffer sizes, thresholds, and identifiers. Named constants for buffer sizes, thresholds, and identifiers.
error
Domain-specific error types. Domain-specific error types with exit codes and error classification.
file_io
Smart file reading with memmap2 for large files. Smart file reading with automatic memmap2 for large files.
lang_utils
Shared language utilities for AST commands. Shared language utilities for AST commands (scope, transform).
line_endings
Line ending detection and normalization. Line ending detection and normalization.
ndjson_types
NDJSON output type definitions. NDJSON output type definitions with schemars JSON Schema support.
output
NDJSON output writer utilities. NDJSON writer utilities for stdout with broken-pipe handling.
path_safety
Workspace path jail validation. Workspace path jail validation and symlink safety checks.
platform
Platform-specific fsync helpers. Platform-specific fsync, durability, and console initialization primitives.
signal
Graceful shutdown signal handling. Signal handling for graceful shutdown on SIGINT and SIGTERM.

Functions§

emit_schema_by_name
Emit the JSON Schema for a subcommand by name, without requiring parsed args.
run
Dispatch the parsed CLI to the appropriate subcommand handler.