Cliki is a simple interface to use a local Git repository as your personal wiki. It allows you to view individual Markdown-formatted pages, edit those pages and automatically commit your changes into the repository, delete pages, show a log and blame a file line-wise.
Cliki relies on well-established tools like git, pandoc and less, although it is highly customizable: You may use your own toolchain that suits your needs. Since cliki is free software, you may also change the original program to your liking.
Clone this repository somewhere on your computer. You may then move the cliki script file to a location inside your $PATH variable:
# mv cliki /usr/local/bin
- You must have Git installed.
- By default, cliki uses pandoc as its typesetter, so you should have pandoc installed. You may also change the typesetter to your liking (see section "Configuration").
- You'll need a viewer program. The default is less, which is installed on most systems.
- You'll need an editor. Either set the $EDITOR environment variable to an editor your like, or change cliki's configuration (see "Configuration").
If you run cliki, it will test if a default configuration file exists at $HOME/.config/cliki.conf. If not, it will create this file and fill it with some documentation of the values you can set. You may either change that file or create a new configuration file and have cliki load it by using the -c command-line option.
Cliki will read its configuration in the following order:
- The default configuration file ($HOME/.config/cliki.conf)
- The command line (see "Usage")
- The configuration file given by the -c command-line option.
Synopsis: cliki [OPTION] OPERATION [PAGE]
-c FILE | read configuration values from FILE. These values override values in the default configuration file (~/.config/cliki.conf) as well as those given on the command line! |
-l DIR | use DIR as the wiki's location (default: current directory) |
-s PROGRAM | use PROGRAM as the page viewer (default: less) |
-t PROGRAM | use PROGRAM as the page typesetter (default: pandoc) |
-e PROGRAM | use PROGRAM as the page editor (default: \$EDITOR) |
-n | when editing a page, don't commit the changes into Git |
-h | display this help and exit |
-v | output version information and exit |
A PAGE's filename is built by cliki by prepending the wiki's location that was given in the configuration file or via the -l option, then appending the .md suffix that specifies Markdown syntax.
s, show PAGE | typeset PAGE and view it |
e, edit PAGE | edit PAGE with the specified editor, then commit the changes into the Git repository (unless option -n was specified) |
d, delete PAGE | delete PAGE from the repository |
l, log [PAGE] | show either the complete commit log or, when PAGE is given, the commits containing that particular page |
b, blame PAGE | do a 'git blame' for a page file |
Create a new wiki and a page called "Frontpage" in it:
git init
cliki edit Frontpage
You may then view the contents of the Frontpage:
cliki s Frontpage
Change the Frontpage file, but don't automatically commit the changes:
cliki -n e Frontpage