Feature Request: Add /replicate Command to Generate Current Aider Session
Issue
Summary
When working with aider, users may occasionally need to restart or upgrade the tool while retaining the current session context, including environment variables, CLI flags, and any in-chat modifications. This proposal suggests adding a /replicate command that outputs the full aider command needed to replicate the current session.
Proposed Enhancement: /replicate Command
The /replicate command would generate a full aider command, including all flags, environment variables, and any in-chat changes made during the session. This would allow users to easily restart the session or troubleshoot issues by revealing all active configuration options, including those set through environment variables or config files.
Example Workflow
Let's say a user starts a session with the following command:
aider --cache-prompts \
--read CONVENTIONS.md \
--read config.yaml \
--file mycode.py
During the session, they also run the following in-chat commands:
-
/read my_other_config.yaml -
/model chatgpt-4o-latest
Before the session even started, the following was set in the aider config file:
-
--lint-cmd "python: pyright" -
--auto-lint
Now, if aider encounters an issue, or if the user wants to upgrade or restart aider, the /replicate command would generate the full command to replicate the session, including in-chat modifications and configuration file settings.
This looks clear and concise. Let me know if you need further changes!
Expected Output
aider --cache-prompts --lint-cmd "python: pyright" \
--auto-lint \
--read CONVENTIONS.md \
--read config.yaml \
--read my_other_config.yaml \
--model chatgpt-4o-latest \
--file mycode.py
Benefits
- Session Continuity: Users can easily restart a session with the same settings, making it easier to recover from bugs or after updates.
- Troubleshooting: The full command would include environment variables or configurations not directly visible in the initial CLI flags, aiding in debugging.
- Ease of Use: No need to manually remember or re-enter session flags and configurations.
Additional Consideration: Integration with /info
If a new in-chat command, such as /info, is added to display details about the current session (a feature request I’ve seen submitted before), the /replicate command could also output the /info details directly above the replicated command. This would allow users to see all the relevant session details before generating the full command to resume the session, making troubleshooting and recovery more efficient.
Alternative Command Names
Here are some other possible names for this feature that might be worth considering:
-
/session -
/restore-session -
/generate-command -
/snapshot -
/resume
Version and model info
No response