Skip to content

feat(cli): add 'engram init' command to resolve ambiguous workspaces without git #511

Description

@carlosmoradev

Pre-flight Checks

  • I have searched existing issues and this is not a duplicate
  • I understand this issue needs status:approved before a PR can be opened

Problem Description

When running Engram in a directory that is not a git repository but contains multiple child git repositories, Engram hits the ErrAmbiguousProject case and blocks memory saves. Currently, the only workarounds are running git init on the parent directory (which can cause submodule hell if the user isn't careful) or manually creating .engram/config.json with a project name (which has high friction).

Proposed Solution

Add an engram init [project_name] command to the CLI.
If the project name is provided, it simply creates .engram/config.json with that name.
If run without arguments, it could interactively prompt: "No git repository detected. What should we name this project?" and write the config file.

This gives users a fast, official "happy path" to initialize Engram in unversioned aggregator workspaces without having to remember the exact JSON schema or rely on Git hacks.

Affected Area

CLI (cmd/engram)

Alternatives Considered

Forcing users to run git init on aggregator folders, which is dangerous if they later run git commands recursively or try to push the parent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions