Skip to content

Add eko init --from <snapshot-id> flag to bootstrap a project from a snapshotΒ #111

Description

@kavix

🎯 Goal

Extend eko init with a --from <snapshot-id> flag that initializes a fresh .eko/ directory and immediately restores the specified snapshot into the current empty directory β€” useful for onboarding onto a shared project checkpoint.

πŸ’‘ Expected Usage

mkdir new-project && cd new-project
eko init --from 8c9d1a2f
# Eko initialized.
# Restored snapshot 8c9d1a2f into current directory.

πŸ› οΈ Implementation Steps

  1. Add --from string flag to cmd/init.go.
  2. After standard eko init logic runs, if --from is set, call internal/snapshot.RestoreSnapshot() with the resolved snapshot path.
  3. Print a combined success message.
  4. Add unit tests in cmd/commands_test.go.

πŸ“– See full details in GOOD_FIRST_ISSUES.md β€” Issue #17
🌟 Great for first-time contributors! Read CONTRIBUTING.md to get started.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions