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 powered by the
content_inspectorcrate (G41). - 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.
- lock
- Advisory file locking for concurrent edit protection (G54). Advisory file locking for concurrent edit protection (G54).
- 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.
- syntax_
check - G72 — Real syntax check via
tree-sitter-language-pack(v0.1.12). G72 — Real syntax check viatree-sitter-language-pack. - wal
- G114 — Write-Ahead Log (WAL) sidecar for crash recovery (v0.1.12). G114 — Write-Ahead Log (WAL) sidecar for crash-safe atomic writes.
- xattr_
restore - Extended attribute (xattr) save and restore for atomic writes (G39). Extended attribute (xattr) preservation for atomic writes.
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.