Expand description
Setup wizard — install seed files (skills/commands/hooks/MCP) to $ATOMCODE_HOME/.
Simplified pipeline: lock → scan → install all seeds → setup-state → report.
Re-exports§
pub use error::SetupError;pub use error::SetupResult;pub use types::*;
Modules§
- error
- Public error type. thiserror because atomcode-core is library code.
- fs_
atomic - Cross-platform atomic file write: tempfile in same dir → fsync → persist → parent dir fsync. POSIX durability + Windows MoveFileEx semantics.
- install
- Transactional installer. install.rs ONLY writes files; reload routing is the caller’s job. Drop defaults to rollback (RAII); commit must take self and forget the txn to prevent the default rollback.
- lock
- Project-level advisory file lock for setup. Dual-rail:
fs2::FileExt::try_lock_exclusive - scan
- Scan a project directory and produce ProjectSignals. Pure filesystem introspection — no external commands (no git/npm/cargo CLI), no LLM.
- seeds
- Embedded seeds: rust-best-practices.md, /review command, etc.
Packed at build time into setup-seeds.tar.zst, extracted at first run to
~/.atomcode/seeds-cache/
/. Subsequent runs hit the cache. - state
- setup-state.json — per-project sentinel + accepted/declined log. Follows sync_marker.rs philosophy: failed parse / unknown future version → None, no error.
- types
- Data types shared by every layer of setup. No logic — only
pubshapes.
Structs§
Functions§
- run
- Simplified pipeline: lock → scan → install all embedded seeds → setup-state → report.