Using clidocs

Running the program
# Opens the default snippets directory (~\clidocs_snippets)clidocs
# Opens the current directory as the snippets rootclidocs .
# Opens a specific directoryclidocs C:\Users\You\my-snippetsclidocs .\docs\snippetsCommands
| Command | Description |
|---|---|
clidocs | Start with the splash screen (default snippets directory or browse for another) |
clidocs . | Open the current directory as the snippets root |
clidocs <path> | Open a specific directory, skipping the splash screen |
clidocs --help | Interactive help with one tab per topic (-h, help) |
clidocs --version | Print the installed version (-v, version) |
clidocs --install | Install or update from the latest GitHub release |
clidocs --uninstall | Remove clidocs from the computer |
Interface
Start screen
This is the start screen of the program, shown when you run the clidocs command without arguments. Use Up / Down to choose between opening the default snippets directory or browsing for another directory, Enter to confirm and Ctrl+C to quit.

Main screen
This is the main screen of the program, shown after you choose a directory. It is empty on first use: press n in the Folders panel to create your first folder. The bar at the bottom lists the shortcuts of the active panel.
The screen is split into three panels. Tab moves between them and the active panel has a blue border.
| Panel | What it does |
|---|---|
| Folders | Lists the folders and subfolders of the snippets directory. Folders with subfolders show a > marker; favorites show a star. |
| Files | Lists the files of the selected folder with the language tag and the age of each file. |
| Preview | Shows the selected file with syntax highlighting, or rendered Markdown (tables, lists, TODO colors and icons). |

Panels and shortcuts
Global shortcuts
| Key | Action |
|---|---|
Tab | Next panel |
s | Jump to the Folders panel |
g | Sync snippets with Git |
G | Edit the Git configuration |
: | Open the command console |
q / Ctrl+C | Quit |
Folders panel
Shows the folders of the snippets directory. Moving the cursor updates the Files and Preview panels. Enter on a folder with subfolders enters parent-view: the first row is ~/ (the files of the folder itself) followed by one row per subfolder. Left goes back one level.

| Key | Action |
|---|---|
Up / k, Down / j | Move the cursor |
Enter / Right / l | Open the folder (enters parent-view if it has subfolders) |
Left / h | Go back one level |
n | New folder |
N | New subfolder inside the selected folder |
r | Rename the selected folder |
d | Delete the selected folder (confirmation required) |
D | Multi-delete mode: Space selects, D confirms, Esc cancels |
/ | Search folders recursively |
f | Favorite / unfavorite the selected folder |
F | Open the favorites list |
H | Return to the original snippets directory |
o | Show information about the snippets directory |
Files panel
Shows the files of the selected folder. The title shows how many snippets there are. Each row has the language tag, the file name and the folder with the file age.

| Key | Action |
|---|---|
Up / k, Down / j | Move the cursor (the Preview updates live) |
Enter / e | Open the file in Neovim |
n | New file |
r | Rename the selected file |
d | Delete the selected file (confirmation required) |
m | Move the file to another folder |
c | Import a file from anywhere with the file picker |
/ | Filter files by name (supports globs such as *.go) |
Preview panel (snippet)
Shows the content of the selected file. Code is highlighted with the GitHub Dark theme and Markdown is rendered with styled headings, lists and tables.

| Key | Action |
|---|---|
Up / k, Down / j | Scroll |
c | Copy the whole file to the clipboard |
e | Edit the file in Neovim |
o | Open the file location in Windows Explorer |
z | Toggle zoom (preview fills the screen) |
L | Toggle line numbers |
/ | Search a word in the file; Enter finds matches, then n / N jump between them |
How to use
Create folders and subfolders
- Focus the Folders panel.
- Press
n, type the name and pressEnterto create a folder. - Select a folder and press
Nto create a subfolder inside it. Esccancels.

To create a subfolder, select the parent folder and press N. The dialog shows which folder the new subfolder will be created in (Inside: Folder1/). Folders that contain subfolders show a > marker in the list.

Rename a folder
- Select the folder in the Folders panel.
- Press
r. A dialog shows the current name (Current: Folder1/) and an input pre-filled for the new name. - Type the new name and press
Enterto confirm, orEscto cancel.

Favorite a folder
- Select the folder in the Folders panel.
- Press
f. A star appears next to the folder name. - Press
fagain on the same folder to remove the star. - Press
F(capital) to open the favorites list.

In the favorites list use Up / Down to navigate, Enter to go to the folder, o to open it in Explorer, f to remove it from the favorites and Esc to close.

Delete folders
Select it and press d. A dialog asks for confirmation and warns that the folder and all its contents will be deleted and that this cannot be undone. Press Enter or y to delete, or Esc or n to cancel.

Press D to enter multi-delete mode, move with Up / Down, press Space to select or deselect each folder, press D again to confirm and Esc to cancel. The selected folders are highlighted in red. A dialog shows how many folders will be deleted and warns that this cannot be undone. Press Enter or y to delete, or Esc or n to cancel.

Create files inside a folder
- Select a folder and focus the Files panel with
Tab. - Press
n. - Type the file name (without extension) and press
EnterorTab. - Type the extension (for example
go,py,md) and pressEnter. The file is created and opened in Neovim.

Edit files
Press Enter or e on a file (Files panel) or e (Preview panel) to open it in Neovim. Save with :w, quit with :q, or both with :wq. When you return to clidocs the preview is refreshed. In the console, the nvim command shows a Neovim quick reference.

Snippet panel after saving
After you save and quit Neovim (:wq), clidocs shows the result right away. The Files panel lists the snippet with its language tag, folder and age, and the Preview panel (the snippet panel) shows the saved content: Markdown is rendered with styled text and links, and code files are syntax highlighted. From here you can scroll, search (/), copy (c), edit again (e) or open the folder (o).

Rename a file
- Select the file in the Files panel.
- Press
r. A dialog shows the current name (Current: File1.md) and an input pre-filled with it, extension included. - Type the new name and press
Enterto confirm, orEscto cancel.

Move a file
- Select the file in the Files panel.
- Press
m. A dialog shows the file name and the list of folders and subfolders you can move it to. - Use
Up/Downto choose the destination folder. The last entry,Browse external folder..., lets you pick a folder outside the snippets directory. - Press
Enterto move the file, orEscto cancel.

Import a file
- Select the folder that will receive the files and focus the Files panel.
- Press
c. clidocs opens the Windows file picker (the Windows file explorer window) and shows the messageOpening file picker.... - In the picker, select one or more files and confirm. They are copied into the current folder (
Folder1in the example).

Delete files
- Select the file in the Files panel.
- Press
d. A dialog asksAre you sure you want to delete:and shows the file name. - Press
Enteroryto delete, orEscornto cancel.

The / key starts a search in every panel. What it searches depends on which panel is focused.
Folder search
Available when the Folders panel is focused.
- Press
/. A search dialog opens and lists the folders, including subfolders. - Type part of a folder name. The list is filtered while you type.
- Use
Up/Downto choose a result and pressEnterto jump to that folder. - Press
Escto close the search without changing anything.

File search
Available when the Files panel is focused.
- Press
/. A search bar replaces the panel title. - Type part of a file name. The file list is filtered while you type and globs such as
*.goare supported. - Use
Up/Downto move through the results. The Preview panel updates live. - Press
Enterto keep the selection, orEscto cancel and restore the full list.

Preview search
Available when the Preview panel is focused and a file is loaded. It searches words inside the file content.
- Press
/. A search bar appears. - Type the word or phrase, including the letter
n, and pressEnter. Every match is shown in bold green inside the text. In code files the lines with matches are also marked: the current one with an orange arrow and the others with a green dot. - After the first
Enter, pressnto jump to the next match andNto jump to the previous one. - Press
Escto close the search.

Git sync
Press g to sync the snippets directory with a Git repository. The first time, a dialog asks for the remote; G edits the configuration later. Git must be installed.
Console
Press : on the main screen to open the console (Cmdline). Type a command and press Enter. Esc closes the console, and from inside a command screen Esc goes back to the console. Unknown commands show Unknown command and a hint to type cmd.

time
Work hours calculator. Type your start time as HH:MM (for example 08:00) and press Enter. It shows the coffee break, lunch start, lunch end, the normal exit time (8h48 worked) and the maximum exit time (10h worked). Enter goes back to the console.
First, type the start time in the HH:MM field and press Enter to calculate (Esc goes back).

Then the result is shown. In the example, an entry at 07:01 gives the coffee break at 08:01, lunch from 11:01 to 12:01, the normal exit at 16:49 (8h48 worked) and the maximum exit at 18:01 (10h worked).

alive
Keeps the computer awake. While this screen is open, clidocs presses the B key every 2 seconds, so the system does not lock or go idle. The keypress goes to the focused window, so keep clidocs focused while it runs. Esc stops it.
whoami
Shows information about the author as if a terminal command was run. Enter opens the website fantodocs.github.io in the browser, and Esc goes back to the console.

cmd
Shows the list of the commands available in the console, each one with a short description of what it does. It has two tabs: “Console commands” and “Neovim Quick Reference”. Use ←/→ or Tab to switch tabs, 1/2 to jump directly, and ↑/↓ to scroll. Enter or Esc goes back to the console. The keyboard shortcuts of the panels are in the help panel, opened with ? on the main screen.

nvim
Opens the same help as cmd, but directly on the “Neovim Quick Reference” tab. It shows navigation, editing, save and quit, search, commenting and uncommenting several lines, and visual mode. Use ←/→ or Tab to switch to the “Console commands” tab. Enter or Esc goes back to the console.

ls and cd
ls opens a floating panel with a tree view of the directories inside the directory currently open in clidocs (up to 3 levels, hidden folders skipped). Use ↑/↓ to scroll. In the panel, type cd <directory> (for example cd Projects or cd Projects/App) and press Enter: the panel closes and the Folders and Files panels show the chosen directory. Esc goes back to the console. In the console, cd <directory> also works directly, and cd .. goes to the parent directory.

exit
Closes clidocs completely (quit does the same).
Supported languages
Syntax highlighting uses Chroma with the GitHub Dark theme. Each file shows a colored extension badge.
| Extension | Language |
|---|---|
.go | Go |
.py | Python |
.ts | TypeScript |
.js | JavaScript |
.tsx / .jsx | React |
.rs | Rust |
.cs | C# |
.cpp / .cc | C++ |
.c / .h | C |
.java | Java |
.kt | Kotlin |
.swift | Swift |
.sh / .bash | Shell |
.ps1 | PowerShell |
.rb | Ruby |
.php | PHP |
.vue | Vue |
.svelte | Svelte |
.dart | Dart |
.md | Markdown |
.html | HTML |
.css | CSS |
.scss | SCSS |
.json | JSON |
.yaml / .yml | YAML |
.toml | TOML |
.sql | SQL |
.xml | XML |
.lua | Lua |
.tf / .hcl | Terraform |
.r | R |
.ex / .exs | Elixir |
.vim | Vim Script |
.env | Dotenv |
.txt / .conf | Plain text |
Project structure
The project is in transition to Clean Architecture. Because Bubble Tea requires Update/View methods in the same package as the Model, core files stay in the root while auxiliary files were reorganized:
Directoryclidocs/
Directorycmd/
Directoryinstall/ TUI installer
- …
- core application files (*.go)
- console_modals.go
- file_modals.go
- folder_modals.go
- git_modals.go
- other_modals.go
- README.md
Dependencies
| Package | Purpose |
|---|---|
github.com/charmbracelet/bubbletea | TUI framework (Elm architecture) |
github.com/charmbracelet/bubbles | Text input component |
github.com/charmbracelet/lipgloss | Layout and styling |
github.com/charmbracelet/glamour | Markdown rendering (GitHub Dark style) |
github.com/alecthomas/chroma/v2 | Syntax highlighting |
github.com/atotto/clipboard | Clipboard write support |
To install the dependencies:
go mod tidy