How pardhuvarmax/emrac works
Emrac is an Arch Linux package-management CLI that coordinates pacman/libalpm, official repositories, the AUR, and local packages. Its main workflow is to find or inspect packages, prepare and preview a transaction, obtain confirmation, then apply the change and record it for verification or rollback. Separate capabilities cover AUR trust and sandboxed builds, system/config protection, and Emrac’s own installation. The README documents these user-facing flows; some internal command-to-core wiring is unsampled, so those links are dashed where not directly evidenced.
Main entry points: sources.rs Package operations · cli.rs Command interface · aur_build.rs AUR build backend · search.rs Search and inspect
Components 24
CLI experience
- Command interface
crates/emrac-cli/src/cli.rs - Search and inspect
crates/emrac-cli/src/commands/search.rs - CLI output
crates/emrac-cli/src/output.rs - Confirmation prompts
crates/emrac-cli/src/prompt.rs
Package transactions
- Package operations
crates/emrac-core/src/sources.rs - Transaction plans
crates/emrac-core/src/plan.rs - pacman and libalpm
crates/emrac-core/src/backend/alpm.rs - Package backends
crates/emrac-core/src/backend/aur.rs - Build recommendation
crates/emrac-core/src/recommend.rs
AUR trust and builds
- AUR trust signals
crates/emrac-core/src/aur_trust.rs - Package auditing
crates/emrac-core/src/audit.rs - Build sandbox
crates/emrac-core/src/sandbox.rs - AUR build backend
crates/emrac-core/src/backend/aur_build.rs
History and recovery
- Transaction history
crates/emrac-core/src/history.rs - Protected ledger
crates/emrac-core/src/ledger.rs - Rollback and restore
crates/emrac-core/src/rollback.rs - Restore snapshots
crates/emrac-core/src/snapshot.rs
System protection
- Health checks
crates/emrac-core/src/doctor.rs - File verification
crates/emrac-core/src/verify.rs - Config file actions
crates/emrac-core/src/pacnew.rs - File policy
crates/emrac-core/src/policy.rs - Arch news
crates/emrac-core/src/arch_news.rs - Self maintenance
crates/emrac-core/src/self_upgrade.rs
Other components
- User
Connections 22
- User → Command interface: runs commands
README.md - Command interface → Search and inspect: dispatches
- Command interface → Package operations: requests operations
- Search and inspect → CLI output: prints results
crates/emrac-cli/src/commands/search.rs - Package operations → Transaction plans: previews changes
crates/emrac-core/src/sources.rs - Package operations → pacman and libalpm: uses package manager
crates/emrac-core/src/sources.rs - Package operations → Package backends: uses backends
crates/emrac-core/src/sources.rs - User → Confirmation prompts: confirms changes
README.md - User → Build recommendation: requests advice
README.md - User → AUR trust signals: inspects package trust
README.md - AUR build backend → Package auditing: audits packages
- AUR build backend → Build sandbox: builds inside
crates/emrac-core/src/backend/aur_build.rs - User → Transaction history: reviews transactions
README.md - User → Rollback and restore: requests rollback
README.md - User → Restore snapshots: saves restore point
README.md - Transaction history → Protected ledger: syncs records
README.md - User → Health checks: checks system
README.md - User → File verification: checks files
README.md - User → Config file actions: manages config files
README.md - User → File policy: configures file policy
README.md - User → Arch news: reads news
README.md - User → Self maintenance: maintains Emrac
README.md