Skip to content
Ilya Sher edited this page Aug 15, 2021 · 2 revisions

Commands History Design

Requirements

Two types of history:

Commands history

Commands history, similar to todays history but each entry will consist of the following fields:

  • Timestamp
  • Command
    • Including aliases expansion, because they might have changed
  • Output (stdout, stderr)
  • Input (stdin) ?
  • Exit code
  • Comment - can be provided when running the command, editable after that
  • Context:
    • Target host / group
      • Working directory
      • Values of used variables

Host history

Host history - all changes on given host.

  • History entry will consist of:
    • Timestamp
    • Script or basic command (create/update/chmod file, etc)
    • Script that changed the object (I guess only files for now)
    • Host that was running the script
    • User that was running the script
    • Session (name) under which the script was running
    • Relevant global variables
    • Consider putting in git all modified files
  • Host history will be kept on both the shell host and the target host

Open issues

Design

TODO: Overall description

Components

TODO: List of components. For each: description of the role, API, etc.