Pre-flight Checks
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.
Pre-flight Checks
Problem Description
When running Engram in a directory that is not a git repository but contains multiple child git repositories, Engram hits the
ErrAmbiguousProjectcase and blocks memory saves. Currently, the only workarounds are runninggit initon the parent directory (which can cause submodule hell if the user isn't careful) or manually creating.engram/config.jsonwith 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.jsonwith 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 initon aggregator folders, which is dangerous if they later run git commands recursively or try to push the parent.