Package: command-reminder
command-reminderCommand reminder is a tool for saving and sharing your mostly used fish shell commands. It allows quickly add
commands to a local database, which can then be persisted/shared via Github.Prerequisitespython >= 3.9Installation>pipinstallcommand-reminderQuickstartCreate a Github repo which will then serve as your commands' database. Use this repo to init a new project.>crinit--repogit@github.com:mygithubuser/my-command-reminder-repository.gitIt will create a~/.command-reminderdirectory, where all your commands will exist. You can change that directory by
settingCOMMAND_REMINDER_DIRvariable.Addcr init | sourceto the~/.config/fish/config.fishfile. Every time you start the fish shell,
it will load both default and saved fish functions.Record a command.>crrecord--name'lsof_listening_ports'--command'lsof -nP -iTCP:$PORT | grep LISTEN'Remember to use'except"whenever a command contains$sign, otherwise the environment variable will be resolved.
It saves a command to the local database. You can use tags too:>crrecord--name'show_process_rss_memory'--command'ps o pid,rss -p 23159'--tags'#memory #process'The record command creates a fish function too (available at shell after runningcr init | source). It allows to quickly get
autosuggestions about available commands just by entering few first command's letters and typingTab. Currently, it only
prints the command.List all available commands.> cr listor> cr list --prettylsof_listening_ports:lsof-nP-iTCP:$PORT|grepLISTEN
show_process_rss_memory:psopid,rss-p23159git_pull:gitpull--rebaseNarrow down the results to the specific tag.>crlist--tags'#memory'Load a command to the shell. It would be very inconvenient to copy and paste the listed command. Command reminder
comes with a useful shortcut, which loads commands to the fish history - they are available just by typingarrow up.>crlist|grepps|hThehshortcut is a function which name is derived from "history". It loads the command to the fish history. Remember to
add it to a fish viacr init | source. Press thearrow upand you can execute a found result as a usual command.Push recorded commands to the remote repository.>crpushYou can pull external repositories too. Let's say you're working with a team of a few people and have
a common set of commands, useful in your working environment. More experienced team members can share their
commands to the new ones.>crpull-rgit@github.com:somegithubuser/some-external-commands-repository.gitThepullcommand adds given repository to the configuration file:~/.command-reminder/repositories/main/config.yaml,
which is then saved in the Github repo together with the recorded commands. On any machine with access to your Github repo (and external too),
you just init a new project and provide the proper URL. You will have downloaded your own commands as well as the external ones.
To refresh the commands from external repositories use:>crpull-update_allThe main help menu is available via:cr --help. Each subcommand supports help as well, e.g.cr init --help.Repository structure~/.command-reminder/
    repositories/
        main/
            commands.json
            fish/
            config.yaml
        external/
            ext1/
                commands.json
                fish/
            ext2/
                commands.json
                fish/Themaindirectory is a place where all your commands are kept.Configuration fileconfig.yamlcontains data to restore your commands anywhere command-reminder is installed:repositories:
  external:
    - url: ...
    - url: ...commands.jsonkeeps recorded commandsfishdirectory keeps fish functions for commands. It is added to your fish search path (viacr init | source),
so all commands are available as a function with fish autosuggestions. For now, the fish functions just print the respective command.Theexternaldirectory contains external repositories' commands.DevelopmentInstall deps>pipenvinstall--dev
>source.venv/bin/activate.fishTest>toxPublish>pythonsetup.pysdist
>twinecheckdist/*
>twineuploaddist/*Installation from local setup.py>pipinstall.QA:1. I've got problems with pushing changes to remote repository:The push command usegitshell command underneath. You can just go to the main directory and push it manually.