pub enum Command {
Show 28 variants
Init {
wizard: bool,
yes: bool,
},
Completions {
shell: CompletionShell,
},
Import {
file: Option<PathBuf>,
},
Add {
cmd: String,
cwd: Option<String>,
exit_code: i64,
},
Search {Show 14 fields
query: Option<String>,
query_opt: Option<String>,
print: bool,
limit: usize,
project: Option<String>,
branch: Option<String>,
exit_code: Option<i64>,
failed: bool,
since: Option<String>,
before: Option<String>,
cwd: Option<String>,
shell: Option<String>,
json: bool,
id_only: bool,
},
Tui {
query: Option<String>,
project: Option<String>,
branch: Option<String>,
cwd: Option<String>,
failed: bool,
},
Bashrc,
Shell {
action: ShellCommand,
},
Migrate,
Stats {
project: Option<String>,
branch: Option<String>,
since: Option<String>,
json: bool,
},
Doctor {
fix: bool,
json: bool,
},
Config {
action: ConfigCommand,
},
Backup {
output: Option<PathBuf>,
json: bool,
},
Restore {
archive: PathBuf,
dry_run: bool,
yes: bool,
},
Export {
format: ExportFormat,
project: Option<String>,
branch: Option<String>,
output: Option<PathBuf>,
gzip: bool,
},
List {
limit: Option<usize>,
project: Option<String>,
branch: Option<String>,
json: bool,
},
Show {
id: i64,
},
Print {
id: i64,
},
Delete {
id: i64,
dry_run: bool,
yes: bool,
},
Prune {
older_than: String,
project: Option<String>,
branch: Option<String>,
dry_run: bool,
yes: bool,
},
Version,
Update {
json: bool,
upgrade: bool,
yes: bool,
require_signature: bool,
},
Upgrade {
dry_run: bool,
yes: bool,
version: Option<String>,
target: Option<String>,
require_signature: bool,
},
Uninstall {
dry_run: bool,
yes: bool,
purge: bool,
},
Project {
action: ProjectCommand,
},
Maintenance {
action: MaintenanceCommand,
},
Session {
action: SessionCommand,
},
Secrets {
action: SecretsCommand,
},
}Variants§
Init
Initialise la configuration et la base de données.
Fields
Completions
Génère un script de complétion shell sur stdout (bash, zsh, fish).
mnemo n’écrit jamais dans vos fichiers shell : redirigez la sortie vers
l’emplacement adéquat (voir docs/UX_ONBOARDING.md).
Fields
shell: CompletionShellShell cible.
Import
Importe l’historique Bash (~/.bash_history par défaut) dans la base.
Add
Ajoute une commande dans la base.
Fields
Search
Ouvre l’interface TUI interactive de recherche.
Fields
Tui
Ouvre la TUI avancée (interface interactive principale).
Fields
Bashrc
Affiche le snippet d’intégration Bash à ajouter dans ~/.bashrc.
Shell
Gère l’intégration shell installée dans ~/.bashrc.
Fields
action: ShellCommandMigrate
Applique les migrations de schéma SQLite en attente.
Stats
Affiche des statistiques d’usage (texte simple).
Fields
Doctor
Diagnostique l’installation locale de mnemo.
Fields
Config
Gère la configuration locale de mnemo.
Fields
action: ConfigCommandBackup
Crée une sauvegarde locale complète (archive .tar.gz).
Fields
Restore
Restaure une sauvegarde (.tar.gz) après vérification.
Fields
Export
Exporte les commandes en JSON ou CSV.
Fields
format: ExportFormatFormat de sortie.
List
Affiche les dernières commandes avec leurs IDs.
Fields
Show
Affiche le détail complet d’une commande par son ID, sans l’exécuter.
mnemo n’exécute jamais une commande de l’historique : show se contente
de lire la base. Si la commande a déjà été redactée, sa forme redactée
stockée est affichée telle quelle.
Imprime uniquement la commande brute sur stdout, sans décor ni exécution.
Aucun label, aucune couleur : la sortie peut être copiée ou redirigée. mnemo n’exécute jamais la commande ; l’utilisateur reste responsable de ce qu’il fait de la sortie.
Delete
Supprime une commande par son ID (après confirmation).
Fields
Prune
Nettoie les commandes plus anciennes qu’une durée donnée.
Fields
Version
Affiche des informations détaillées de version et de build.
Update
Vérifie si une nouvelle version est disponible (sans rien installer).
En terminal interactif, si une mise à jour existe, propose de lancer
mnemo upgrade immédiatement (réponse par défaut : non). En mode non
interactif (CI, script, cron, pipe), reste une simple vérification.
--upgrade enchaîne directement l’installation quand une mise à jour est
disponible ; combiné à --yes, il permet un upgrade automatisé.
--require-signature rend la vérification Sigstore (cosign) obligatoire
lors de l’upgrade enchaîné.
Fields
Upgrade
Télécharge et installe la dernière version stable (remplace le binaire).
Fields
Uninstall
Désinstalle mnemo : binaire + intégration shell. Conserve les données.
Fields
Project
Inspecte le projet courant et les projets connus de l’historique.
Fields
action: ProjectCommandMaintenance
Maintenance de l’historique (nettoyage automatique configurable).
Fields
action: MaintenanceCommandSession
Navigue, consulte et exporte des sessions de travail.
Une session regroupe les commandes partageant un même session_id,
capturé par l’intégration shell (MNEMO_SESSION_ID). Les commandes
importées ou enregistrées sans cet identifiant ne sont pas rattachées à
une session.
Fields
action: SessionCommandSecrets
Analyse et redacte les secrets présents dans l’historique déjà stocké.
scan repère les commandes potentiellement sensibles et les affiche
toujours sous forme redactée. redact les nettoie en place (dry-run par
défaut, sauvegarde obligatoire avant toute écriture). Aucun secret n’est
jamais affiché en clair.
Fields
action: SecretsCommandTrait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more