termdump

Build Status

Dump your (pseudo)terminal session and replay it. You can use it to bootstrap daily work.

Usage

Usage: termdump [options] [session]
    -i, --init                       initialize configure interactively
    -e, --edit [session]             edit session
    -d, --delete [session]           delete session
    -s, --save [session]             save session
        --stdout                     print dump result to stdout while saving a session
        --exclude                    exclude current pty while saving a session
    -l, --list                       list all sessions
    -v, --version                    print version

initialize configure

$ termdump -i

dump a session

$ termdump -s mydailywork
Enter a new session name:
# or `termdump -s mydailywork --exclude`
# if you want to exclude the pty running this command

load a session

$ termdump mydailywork

or

$ termdump
order:  session name    ctime               atime
[0]:        scutmall    2015-07-01 17:07:37 2015-07-25 11:59:42
[1]:        mydailywork 2015-07-19 11:05:52 2015-07-25 11:22:03
[2]:        termdump    2015-06-30 10:58:20 2015-07-25 11:21:46
Select one session to load:1

edit a session

$ termdump -e mydailywork

or

$ termdump -e
order:  session name    ctime               atime
[0]:        scutmall    2015-07-01 17:07:37 2015-07-25 11:59:42
[1]:        mydailywork 2015-07-19 11:05:52 2015-07-25 11:22:03
[2]:        termdump    2015-06-30 10:58:20 2015-07-25 11:21:46
Select one session to edit:1

delete a session

$ termdump -d mydailywork

or

$ termdump -d
order:  session name    ctime               atime
[0]:        scutmall    2015-07-01 17:07:37 2015-07-25 11:59:42
[1]:        mydailywork 2015-07-19 11:05:52 2015-07-25 11:22:03
[2]:        termdump    2015-06-30 10:58:20 2015-07-25 11:21:46
Select one session to delete:1

list all session

$ termdump -l
# equal to run `termdump`

Read more in session syntax and examples and configure.

Supported terminal

  • [x] gnome-terminal
  • [x] guake
  • [x] konsole
  • [x] terminator
  • [x] tilda
  • [x] urxvt
  • [ ] xfce4-terminal
  • [x] xterm
  • [ ] yakuake

If you want to support Terminal X, you can write a terminal file under https://github.com/spacewander/termdump/tree/master/lib/termdump/terminal and then send me a pr. Currently there is not a plan to support terminals in OS X platform, since I don't have OS X to test with. If you want to implement one, you may need to use cliclick instead of xdotool.

Requirements

Current requirements are ps and xdotool. We use ps to get the result of terminal session, and xdotool to emulate typing.

ps has been shipped with your OS probably. You can install xdotool via this guide.

Video

TODO