olai shows a directory of your notes in a browser. Here you make that directory, serve it, write one line into it, and let git record the change.
1. Make the directory
mkdir -p ~/notes
git -C ~/notes init
olai web refuses a path that does not exist, so make the directory first,
and make it a git repository.2
2. Serve it
nix run github:juspay/olai -- web ~/notes
The command prints one line for each thing the server does. The line that says
serving carries the web address to open in a browser.3
3. Write a line
Press Cmd + K (Ctrl + K if you are not on a Mac) to open the palette,
the box for searching commands. Pick Capture to the Inbox, type a line
after the + and press Enter. olai saves your line as a row, one line of an
outline, in the file _olai/Inbox.olai.4
Open that file from the sidebar, the list of files down the left, and keep typing.5 The page follows the files on disk: edit one in another program and the page shows your change at once, with no reload.
4. Let git record it
The header shows the Commit readout, which says what is waiting to be recorded. Click it, then click Commit.6
git -C ~/notes log --oneline
Your line is now a git commit over plain text files that you own.7
Where to go next
| You want to | Page |
|---|---|
| a fixed port, a different network interface, or the log | Serve a directory with olai web |
| olai up after a reboot, or behind a proxy | Keep olai running in the background |
| choose which plugins run | Switch olai's plugins on and off |
| ask an agent for a plugin of your own | Ask an agent for a plugin of your own |
| talk to an agent about these notes | Talking to an agent |
| point an agent in a terminal at this server | Point an agent at a running olai |
| the file format underneath | The outline file format |
Footnotes
-
nix is the package manager that fetches and runs olai for you in step 2. Everything olai needs beyond nix and a terminal is downloaded for you. ↩
-
git records versions of the files in a directory. Running
git initin~/notesmakes that directory a git repository, which gives git somewhere to record the changes you make. ↩ -
The server reads the directory and every folder under it, and prints one line per event on stdout. The address is on the
servingline because olai asks the operating system for a free port number by default (--port 0), so the number can differ each time you start it. ↩ -
The inbox is the file
_olai/Inbox.olai, where every captured line lands. A captured line arrives with today’s date on it and the mark To do, which says it is work you owe. ↩ -
An outline is a file of rows, and a row can hold rows under it. While you type in an outline,
Enterstarts the next row,Tabindents a row so it sits under the row above it, andShift+Tabmoves it back out. Typing an outline is the rest of the keys. ↩ -
Clicking the Commit readout opens the commit panel, which is where the Commit button sits. A directory starts with its commit policy set to
manual, so olai records nothing until you ask it to. Switch olai's plugins on and off is where you turn automatic commits on, and Git: how olai records what it writes is what the commit panel does. ↩ -
An olai outline is a plain text file holding one record per line. The outline file format is the format itself. ↩