aws / aws/amazon-q-developer-cli
Feature Request: Add `on_quit` Hook for Amazon Q CLI to Enable Post-Session Processing
- Lingua principale
- Rust
- Stelle
- 2k
- Fork
- 439
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I'd like to request an `on_quit` hook for Amazon Q CLI that would execute user-defined scripts when a session ends. This would enable automated post-session workflows such as saving chat logs and running processing scripts.
**Use Case:**
As an Amazon Q CLI user, I want to automatically:
- Save my chat logs to a specified location when I end a session
- Run custom processing scripts on those logs (e.g., for analysis, formatting, or integration with other tools)
- Execute cleanup or notification tasks when I exit Amazon Q
**Proposed Implementation:**
1. Add support for an `on_quit` hook in the Amazon Q CLI configuration file
2. Allow users to specify a script or command to run when the session ends (via `/quit` command or other termination methods)
3. Pass relevant session data (like chat history) to the script as parameters or environment variables
Example Configuration:
```json
{
"hooks": {
"on_quit": {
"command": "/path/to/my/script.sh",
"args": ["--save-path", "/path/to/logs/"],
"env": {
"Q_SESSION_ID": "$SESSION_ID"
}
}
}
}
```
**Benefits:**
- Enables automated workflows and integrations with other tools
- Improves productivity by eliminating manual steps after each session
- Allows for custom data retention and analysis of chat interactions
- Supports more sophisticated use cases for power users and developers, such as prompt or profile performance analysis
**Priority**: _Medium_
**Additional Notes:**
This feature would be particularly valuable for users who integrate Amazon Q into their development workflows and want to maintain records of their interactions or perform automated actions based on session content.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Non vengono indicati file, test o punti di ingresso. Inizia tracciando la gestione della configurazione della CLI e i percorsi di terminazione della sessione, inclusi `/quit` e le altre uscite. Il lavoro è completato quando un comando `on_quit` può ricevere i dati della sessione e gli argomenti o le variabili d’ambiente configurati, con una copertura dei workflow post-sessione richiesti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust, shell
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100