Skip to content
CairnDownloadGitHub

The Cairn Field Guide

Your commands, scripts and snippets, with the reason you saved them. Found in seconds. Fully offline.

Version 0.1 for Windows 10 and 11

Hikers stack small piles of stones, called cairns, to mark the trail for the next person who passes. Cairn does the same for you: every command you save is a stone on a path you've already walked, so the next time you need it, you just follow the markers.
  • Start-Service postgresql-x64-18Start the local PostgreSQL service when the app can’t connect to the database.
  • Postgres won’t start: port 5432 in useAnother instance is holding port 5432. Find the process and stop it.
CommandPowerShell
Start-Service postgresql-x64-18

Why I saved this

Start the local PostgreSQL service when the app can’t connect to the database.

Try it: type the way you'd remember something, like git history or port in use, and use ↑ ↓.

1

Before you start

What Cairn is

Cairn is a small window that appears when you press AltSpace. You type what you're looking for, the way you remember it ("start the database"), and Cairn finds the exact command you saved months ago (Start-Service postgresql-x64-18). Press Enter and it's on your clipboard.

You can keep five kinds of things in it:

Commandgit log --oneline --graph -20
Scripta backup-dev-db.ps1 you run before migrations
Codea React hook, a SQL query you always rewrite
Note"Postgres won't start: port 5432 is in use, here's the fix"
Idea"Import my PowerShell aliases into Cairn"

The one habit that makes Cairn work

Every entry has a field called Why: one sentence saying why you saved it.

Write the why the way you'll search for it later. Not "pg command", but "Start the local database when the app can't connect."

Cairn searches the why as seriously as the command itself. That's how "start database" finds Start-Service postgresql-x64-18.

What you need

  • Windows 10 or 11.
  • Microsoft Edge WebView2. It's already installed on up-to-date Windows 10 and 11, so you almost certainly have it.
  • No account, no internet connection, no sign-up. Ever.
2

Install Cairn

  1. Run the installer you were given: cairn_0.1.0_x64-setup.exe (or the .msi).
  2. If Windows SmartScreen says "Windows protected your PC", click More info, then Run anyway. This early version isn't code-signed yet, so Windows doesn't recognise the publisher.
  3. Follow the installer's steps. Cairn starts when it finishes.

You'll know Cairn is running when you see its icon in the system tray (bottom-right of the taskbar; it may be hidden behind the ^ arrow). Hover over it: the tooltip says Cairn and shows its shortcut.

Start Cairn with Windows (optional)

Cairn doesn't start automatically yet (a setting for that is coming). Until then:

  1. Press WinR, type shell:startup, press Enter. A folder opens.
  2. Right-click inside it, choose New → Shortcut, and point it to Cairn (usually in C:\Program Files\cairn\ or %LOCALAPPDATA%\cairn\).

From the next restart, Cairn is ready in the tray as soon as Windows is.

3

Your first minute

Do thisWhat happens
Press AltSpaceCairn appears in the middle of the screen.
Type startResults appear as you type.
Press ↓ a few timesThe selection moves; the right side shows details.
Press EnterThe entry is copied, and Cairn gets out of the way.
Press CtrlV anywhereThere it is.

To make Cairn go away without doing anything, press Esc, or just click somewhere else.

Cairn never really closes when you hide it. It waits in the tray, so the next AltSpace is instant, and it remembers what you were typing.

The window, top to bottom

  1. 1Title bar. Drag it to move the window. The yellow button hides Cairn, the red one quits it.
  2. 2Search box, with the number of results and how long the search took.
  3. 3Filter chips for each kind, with their counts.
  4. 4Results. With an empty search: your favorites and recent entries.
  5. 5Details pane: the full content, the why, tags and usage.
  6. 6Footer with the main action and the action panel.
4

Finding things

Just type

Type what you remember, in any words. Cairn looks in the title, the content, the why and the tags all at once, and puts the best match on top.

  • Words are matched as you type: datab already finds database.
  • Every word should appear somewhere. If no entry has all of them, Cairn shows the entries that match some of them instead, best first. So "start the database please" still finds your Postgres command.
  • Accents don't matter: cafe finds café.

Fewer, more distinctive words work best. postgres start beats how do I start the postgres thing.

With an empty search box

You see Favorites and recent: your favorites first, then what you used most recently, then everything else, newest first. Most of the time, what you need is already in the top three.

Shortcuts inside the search box

TypeMeaningExample
> at the startCommands only (the Commands chip switches on)>docker
#tag anywhereOnly entries with this exact tag. Add several to require all of them.#postgres #docker exec
? at the startReserved for asking questions (coming later); for now it's ordinary search? restart api

#tag is exact: #docker won't match an entry tagged dockerfile. Plain words (without #) also look inside tags, but loosely.

Filter chips

Under the search box: All, Commands, Scripts, Code, Notes and Ideas, each with its number of matches.

  • Press Tab for the next chip, ShiftTab for the previous one. It wraps around.
  • Or click a chip. You can keep typing right away.

If a chip says "Nothing of this type matches", look at the other chips' numbers: your entry is probably in another kind.

Moving around

KeyAction
↑ ↓Move through the results
CtrlDHide or show the details pane (more room for the list)
EscClear the search; press again to hide Cairn
5

Using what you found

Select an entry, then choose what to do with it.

Enter Copy

Copies the entry to the clipboard and hides Cairn. The search box is empty again next time.

CtrlEnter Paste straight into your app

Cairn remembers which window you were in when you pressed AltSpace. CtrlEnter copies the entry, switches back to that window and pastes it for you, at the cursor.

  • If that window was closed meanwhile, Cairn stays open and says "Copied; paste with Ctrl+V". The content is on your clipboard; paste it wherever you like.
  • Apps running as administrator don't accept keystrokes from normal apps (a Windows security rule). Cairn switches to them, but nothing is typed. Just press CtrlV yourself: the content is already on the clipboard.

CtrlR Run it in a terminal

For commands and scripts only. Cairn opens Windows Terminal (or a classic console window) in your home folder and runs the entry there. The window stays open so you can read the output.

  • Press CtrlR twice. The first press asks "Press Ctrl+R again to run in PowerShell". Running something can't be undone, and Ctrl+R is also "reload" in browsers, so Cairn makes sure you meant it.
  • Shells: PowerShell (also used when no shell is set) and cmd. Entries marked bash, zsh and others can't be run yet; Cairn tells you so.
  • Entries with {{placeholders}} can't be run yet either (see Placeholders).
6

Saving new entries

Press CtrlN in Cairn. The editor opens, with the kind already set to the chip you were on (Commands if you were on All).

FieldTips
ContentThe command, script, code or text. Required for commands, scripts and code. Tab moves to the next field (it doesn't indent).
TitleOptional. Leave it empty and Cairn uses the first line of the content.
TypeCommand, Script, Code, Note, Idea. Use ← → to change it.
Shell or LanguageShown for commands and scripts (powershell, bash, cmd…) and for code (typescript, rust, sql…). Suggestions appear as you type.
WhyThe most important field. One sentence, in the words you'd search with.
TagsType a tag and press Enter (or a comma). Backspace in an empty tag box removes the last one. Existing tags are suggested.
FavoriteSwitch it on to keep the entry at the top of Favorites and recent.
  • CtrlEnter saves. You're back in the search with the new entry selected.
  • Esc cancels. If you've typed anything, Cairn asks first: "Discard changes? Press Esc again".

Your draft is safe. If you click elsewhere or press AltSpace while writing, Cairn hides, but your draft is waiting, untouched, when you come back. Only Esc throws it away.

How tags are tidied up

Cairn cleans tags so the same tag is never saved twice in different spellings:

You typeSaved as
#Dockerdocker
dev opsdev-ops
docker, k8sdocker and k8s (commas separate tags)

Placeholders

Write {{name}} in your content for the parts that change each time, or {{name:default}} with a default value:

docker exec -it {{container}} psql -U {{user:postgres}}

For now, Cairn copies placeholders as they are, so you replace them after pasting. Filling them in from Cairn, with suggestions from the values you used before, is coming soon.

7

Editing, favorites and deleting

To…Do this
Edit an entrySelect it, press CtrlE. Same editor, same rules. Saving without changes changes nothing.
Favorite or unfavoriteCtrlK, then Add to favorites (or Remove from favorites), or the switch in the editor.
DeleteSelect it, press CtrlShiftBackspace twice. The first press warns you in red; moving to another entry cancels.

Backspace is the key just above Enter that erases backwards, not the Delete key.

Deleted entries disappear from Cairn right away. They're kept in your database for now, and a way to restore them is planned.

8

The action panel

Don't want to learn shortcuts? Press CtrlK (or click Actions at the bottom right). A small menu lists everything you can do with the selected entry:

  • Type to filter (fav, del…), ↑ ↓ to move, Enter to run.
  • Esc closes the panel. Every shortcut keeps working while it's open.
  • Each row shows its shortcut, so the panel teaches you as you go.
9

Settings

Open them with Ctrl, (comma), from CtrlK then Settings, or by right-clicking the tray icon and choosing Settings…. Every change applies immediately, and Cairn remembers it.

SettingChoices
ThemeSystem follows Windows and shows which theme it's using right now. Light is warm white, Dark is warm charcoal.
Accent colorMajorelle (violet, the default), Zellige teal, Terracotta or Saffron. It colors the selection, the active chip, buttons and the Cairn mark.
Show detail paneThe right-hand pane with the full content, the why and the tags. CtrlD flips the same switch from the search.

From the keyboard: the arrows move between choices (← → along a row, ↑ ↓ to the row above or below), and Enter applies the one you're on. Settings opens on your current theme, so you can start right away.

Press Esc (or click Back to search) to return.

More sections (shortcuts, search, backup…) will appear here as those features arrive.

10

Keyboard cheat sheet

Anywhere in Windows

AltSpace
Open or hide Cairn

In the editor

CtrlEnter
Save
Esc
Cancel (twice if you changed something)
Tab
Next field
↑ ↓
Move the selection
Tab ShiftTab
Next or previous chip
Enter
Copy and hide
CtrlEnter
Paste into the window you came from
CtrlR×2
Run in a terminal
CtrlN
New entry
CtrlE
Edit the selected entry
CtrlShift⌫×2
Delete the selected entry
CtrlK
Action panel
CtrlD
Show or hide the details pane
Ctrl,
Settings
Esc
Close panel, then clear search, then hide
AltF4
Hide (Cairn keeps running)

Hide or quit?

You want to…Use
Hide Cairn (it stays ready)Esc, click elsewhere, AltF4, the yellow button, or AltSpace
Quit Cairn completelyThe red button, the tray icon's Quit Cairn, or CtrlK then Quit Cairn
Bring it backAltSpace, or left-click the tray icon
11

Your data and privacy

Cairn never connects to the internet. No account, no sync, no analytics, no telemetry. Even its fonts are built in.

Everything you save lives in one file on your computer:

%LOCALAPPDATA%\com.ayoubedahlouli.cairn\cairn.db

Paste that into the File Explorer address bar to open the folder.

Backing up

Built-in backup and export are coming. Until then:

  1. Quit Cairn (tray icon, then Quit Cairn), so the file isn't in use.
  2. Copy cairn.db somewhere safe. If you see cairn.db-wal and cairn.db-shm next to it, copy them too.

To restore, quit Cairn and put the file back in the same folder.

Appearance

By default Cairn follows your Windows light or dark setting (Settings → Personalization → Colors). To choose yourself, open Cairn's own Settings.

12

Troubleshooting

Alt + Space doesn't open Cairn

Another app (often PowerToys Run) may already use AltSpace. Cairn then falls back to CtrlShiftSpace. Hover over the tray icon: the tooltip always shows the shortcut that works, or says there is none (then use the tray icon itself).

Ctrl + Shift + Backspace doesn't delete
  • Press it twice: the first press only shows the red warning.
  • Make sure it's Backspace (above Enter), not Delete.
  • On some keyboards set up with several languages, Ctrl + Shift switches the keyboard layout and eats the shortcut. Check Settings → Time & language → Typing → Advanced keyboard settings → Input language hot keys.
Ctrl + Enter copied but didn't paste
  • The target app may be running as administrator. Press CtrlV yourself; the content is on the clipboard.
  • If you see "Copied; paste with Ctrl+V", the window you came from was closed, or Windows wouldn't bring it forward. Paste manually.
Ctrl + R says "Run supports PowerShell and cmd for now"

The entry's shell is something else (bash, zsh…). Edit it with CtrlE and set the shell to powershell or cmd if it's really a Windows command, or copy it and run it yourself.

I can't find something I know I saved
  • Try fewer words, or a single distinctive one.
  • Check the chip: you may be filtering on Scripts while it's a Command. Press Tab until All is selected.
  • Remember that #tag is exact; try the word without #.
  • Next time, give it a better why. It's the part you'll remember.
I opened Cairn twice

No problem: Cairn only ever runs once. Starting it again just brings the existing window forward.

13

What's coming next

Cairn is young. Here's what's on the trail ahead:

  • Typo tolerancepostgers will still find postgres.
  • Smarter rankingWhat you use often and recently rises to the top.
  • Search by meaningFind entries by idea, even with completely different words, using a model that runs on your own computer.
  • Fill parameters{{container}} gets a small form, with values you used before suggested. CtrlP.
  • Quick captureAltShiftS saves whatever is on your clipboard, in two seconds.
  • Shell history importCairn notices commands you keep typing in PowerShell or bash, and offers to keep them.
  • Local AI helpersA suggested why, automatic tags, and questions about your own entries (?). All on your machine.
  • More settingsDensity, start with Windows, your own shortcut, backup and export.

Leave a stone for your future self.

AltSpace, and you're back on the trail.