Repository navigation
Commands App and Tools
Commands that are not about one repository's git data: files, config, the memory log, search, scripts, the terminal, the Git Console and the MCP server. How to read the columns, the events and the channels are explained in Commands and Events.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
list_directory |
listDirectory(rootPath, dirPath, repoRoots) |
DirListing |
file | one folder level for the Files panel, the first 5000 in sort order |
read_worktree_file |
readWorktreeFile(repoPath, filePath) |
FileContent |
file | a file's text for the editor |
read_image_data_url |
readImageDataUrl(rootPath, imagePath) |
string |
file | a local image for the Markdown preview as a data: URL, only from inside the workspace folder |
preview_stat |
previewStat(source) |
PreviewStat |
file | whether an image or PDF for a preview exists, its size, and the limit when too big; the bytes come from the gmpreview scheme (see How the Preview Scheme Works) |
file_create |
fileCreate(workspaceRoots, parentDir, name, isDir) |
string |
file | a new file or folder; a name with / creates the missing folders too |
file_rename |
fileRename(workspaceRoots, entryPath, newName) |
string |
file | renames in place; a case-only rename goes through a temporary name |
file_copy |
fileCopy(workspaceRoots, sourcePaths, targetDir) |
string[] |
file | copies files and folders, symlinks as links; a taken name becomes cart copy.ts, cart copy 2.ts
|
file_move |
fileMove(workspaceRoots, sourcePaths, targetDir) |
FileMove[] |
file | moves into a folder (copy then delete across volumes); any conflict refuses the whole move |
file_trash |
fileTrash(workspaceRoots, entryPaths) |
void |
file | Move to Trash with the trash crate (NSFileManager on macOS, no automation prompt) |
files_exist |
filesExist(workspaceRoots, filePaths) |
boolean[] |
file | which absolute paths are files inside a workspace folder (not .git), at most 64; the terminal's clickable paths. Never fails |
The file operations take absolute paths and return them in the same form. Each path must be inside one of workspaceRoots, and never a workspace folder itself or inside .git; symlinks are never followed out of the workspace. FileMove is { from: string, to: string }. The code is in src-tauri/src/file_ops.rs.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
load_config |
loadConfig(configName) |
unknown |
file |
settings or state from ~/.nibtree; null when missing |
save_config |
saveConfig(configName, value) |
void |
file | atomic write of the same |
config_dir |
configDir() |
string |
app | the ~/.nibtree path |
memory_usage |
memoryUsage() |
MemoryUsage |
app | memory of the app and its web view helpers |
clear_cache |
clearCache(stash) |
void |
app | Clear Cache: keeps the terminals in stash running, then restarts the window's web content process (How Clear Cache Works) |
os_info |
osInfo() |
OsInfo |
app | OS name and version for bug reports (sw_vers, os-release, ver) |
memory_log_configure |
memoryLogConfigure(enabled, intervalMs, thresholdMb) |
MemoryLogStatus |
app | starts or stops the debug memory log in ~/.nibtree/logs/memory.log
|
memory_log_event |
memoryLogEvent(label) |
void |
app | a UI event (tab, view, scroll start or stop) for the next log line |
OsInfo is { name: string, version: string | null }.
Each takes the open workspace folders as workspaceRoots. The indexes live in AppState.file_search only while the popup is in use. See How Search Everywhere Works and How Find and Replace Works.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
file_search_open |
fileSearchOpen(workspaceRoots, progress) |
FileSearchProgress |
app | starts or reuses the file index and returns at once; progress goes to the channel |
file_search_query |
fileSearchQuery(workspaceRoots, query, limit) |
FileSearchResults |
app | fuzzy matches against what is indexed so far; never waits |
file_search_close |
fileSearchClose() |
void |
app | the popup closed; the index stays a short while so reopening is instant |
symbol_search_open |
symbolSearchOpen(workspaceRoots, progress) |
SymbolSearchProgress |
app | starts or reuses the symbol index (Classes and Symbols tabs) |
symbol_search_query |
symbolSearchQuery(workspaceRoots, query, scope, limit) |
SymbolSearchResults |
app | matches symbols; scope is classes, all or members
|
text_search |
textSearch(workspaceRoots, searchId, query, options, results) |
void |
file | Find in Files: batches stream to results; a newer searchId stops the old search |
text_search_cancel |
textSearchCancel(searchId) |
void |
app | stops that search |
replace_in_files |
replaceInFiles(workspaceRoots, replaceId, request) |
ReplaceOutcome |
file | replaces the Text tab's matches, or only counts them with request.preview; skips files with unsaved edits |
replace_in_files_cancel |
replaceInFilesCancel(replaceId) |
void |
app | stops it between files |
See How Scripts Work.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
list_project_scripts |
listProjectScripts(folderPaths) |
ScriptSource[] |
file | scripts of every package.json, composer.json, Makefile, deno.json and justfile, rescanned on every call |
list_node_versions |
listNodeVersions() |
NodeInstall[] |
file | Node versions installed by nvm, Herd, fnm, Volta, asdf, mise, nodenv, n and Homebrew, newest first |
run_script |
runScript({ program, args, cwd, nodeBinDir, cols, rows }, output) |
TerminalInfo |
app | starts a script as its own process in a PTY (the Run tab), with the login shell's environment |
Output arrives as raw bytes on output, the end as a terminal-exited event. Script runs use terminal_write, terminal_resize and terminal_close too. See How the Terminal Works.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
terminal_shells |
terminalShells() |
ShellProfile[] |
app | the installed shells (from /etc/shells on macOS and Linux), login shell first |
terminal_spawn |
terminalSpawn({ shellId, cwd, cols, rows }, output) |
TerminalInfo |
app | starts a shell in a pseudo terminal (PTY) |
terminal_write |
terminalWrite(terminalId, data) |
void |
app | queues keystrokes for the terminal's writer thread; synchronous on purpose |
terminal_resize |
terminalResize(terminalId, cols, rows) |
void |
app | resizes the PTY |
terminal_close |
terminalClose(terminalId) |
void |
app | hangs up the shell and its jobs, and kills them after a grace period |
terminal_close_all |
terminalCloseAll() |
void |
app | closes the window's terminals after a reload, except those waiting after Clear Cache |
terminal_memory |
terminalMemory() |
TerminalMemory[] |
app | each terminal's memory (how) |
terminal_unstash |
terminalUnstash() |
TerminalStashData | null |
app | what Clear Cache left for this page: layout, descriptors, screens; once |
terminal_reattach |
terminalReattach(terminalId, output) |
boolean |
app | connects a terminal left running by Clear Cache to the new page, held output first |
See How the Git Console Works.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
git_console_entries |
gitConsoleEntries() |
GitCommandEntry[] |
app | every recorded git command, oldest first; the first call starts the git-command events |
git_console_clear |
gitConsoleClear() |
void |
app | empties the list |
git_console_set_enabled |
gitConsoleSetEnabled(enabled) |
void |
app | the Git Console setting; off records nothing and frees the entries |
Both switches off: nothing listens and no thread runs. See How MCP and CLI Work.
| Command | Wrapper | Returns | Kind | What it does |
|---|---|---|---|---|
mcp_configure |
mcpConfigure(enabled, cliEnabled, port, toolStates) |
McpStatus |
app | starts, restarts or stops the server on 127.0.0.1; toolStates holds only tools switched from their default |
mcp_status |
mcpStatus() |
McpStatus |
app | whether it runs, its port, URL and token, and the command line tool's install state |
mcp_tools |
mcpTools() |
McpToolInfo[] |
app | backend and UI tools with their effective on or off state |
mcp_register_ui_tools |
mcpRegisterUiTools(tools) |
void |
app | the tools the window runs, sent once at start |
mcp_set_workspace |
mcpSetWorkspace(folderPaths) |
void |
app | the folders tools and the gmpreview scheme may touch: the workspace folders open now |
mcp_ui_respond |
mcpUiRespond(requestId, result) |
void |
app | the window's answer to an mcp-ui-request; a late answer is dropped |
mcp_regenerate_token |
mcpRegenerateToken() |
McpStatus |
file | a new secret token in ~/.nibtree/mcp.json
|
mcp_activity |
mcpActivity() |
McpActivity[] |
app | the last 50 calls, newest last |
cli_install |
cliInstall() |
McpStatus |
file | links ~/.local/bin/nibtree to this binary (not on Windows yet) |
cli_uninstall |
cliUninstall() |
McpStatus |
file | removes that link, only when it is ours |
These pages are generated from docs/wiki. To correct something, open a pull request against the source file; edits made here are overwritten.
Using Nibtree
- Getting Started
- Welcome Screen
- Workspaces
- Files Panel
- File Operations
- File Icons
- Rounded Panels
- Editor and Tabs
- Pin Reorder and Wrap Tabs
- Single Tab Title
- Split Editor
- New File and Unsaved Changes
- Unload Hidden Tabs
- Editing Code
- Code Appearance
- Markdown Editor
- Image and PDF Preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and Replace
- Changes and Commits
- Sign In Prompts
- Commit Box Layout
- Repository Actions
- Commit Options
- Ignoring Files
- Diffs
- Inline Diffs
- Staging View
- Revert a Change
- Resolving Conflicts
- Merge Tool
- Blame
- History and Log
- Merge Commits
- Branches and Tags
- Branches Popup
- Remotes
- Stashes
- Shelf
- Git Menu
- Git Dialogs
- Interactive Rebase
- Worktrees
- AI Agents
- AI Tasks
- AI Usage
- Keep Computer Awake
- Submodules
- Git LFS
- GitHub
- Git Console
- Terminal
- Terminal Features
- Scripts
- Navigation
- Menus
- Settings
- Settings Search
- Color Themes
- Settings Terminal and Automation
- Settings Files
- Updates
- Status Bar and Help
- Notifications
- Memory Use
- Clear Cache
- MCP and CLI
- Git Mergetool
- Keyboard Shortcuts
- Keyboard Shortcuts Editor
- Troubleshooting
- Troubleshooting Git
Developers
- Developer Guide
- Architecture
- Project Layout
- Backend
- How Folder Watching Works
- Folder Watching Bugs We Fixed
- How Workspace Files Work
- How the Preview Scheme Works
- Backend Services
- How Terminal Features Work
- Terminal Bugs We Fixed
- Frontend
- How the Rich Markdown Editor Works
- Rich Markdown Bugs We Fixed
- Git Menu Links
- Menu Keys and Routing
- Frontend Modules
- Blame Bugs We Fixed
- Project Color And Title Bar
- One Diff View
- Diff Bugs We Fixed
- Merge Tool Layouts
- Merge Tool Bugs We Fixed
- Color Theme Bugs We Fixed
- How the Connected Diff Works
- Rounded Panels Bugs We Fixed
- Update Bugs We Fixed
- Status Bar Bugs We Fixed
- MCP and CLI Bugs We Fixed
- Repository Actions Bugs We Fixed
- How the Changes Tab Works
- CodeMirror Patterns
- How the Cursor Works
- How Editor Features Work
- How the Path Bar Works
- Commands and Events
- Settings Reference
- Commands Workspace and Changes
- Commands Branches and Remotes
- Commands History and Extras
- Commands App and Tools
- Testing
- Test Suites
- Debugging
- Debugging with MCP
- Measuring Setting Memory
- How Terminal Memory Is Measured
- How Markdown Diagrams Work
- Releases and CI
- Publishing the Wiki
- Versioning and Changelog
- Browser Version Packages
- Browser Release Checks
- Docker Image
- Platforms and Signing
- Windows Support
- Windows Bugs We Fixed
- Windows MCP and CLI
- Docs and Screenshots
- UI Library
- UI Library MCP
- UI Library Bugs
- UI Library Migration
- Contributing
How features work
- Welcome screen
- Workspaces and folders
- Files panel
- File operations
- File icons
- Editor and tabs
- Pin, reorder and wrap tabs
- Single tab title
- Split editor
- New File and unsaved changes
- Unload hidden tabs
- Editing code
- Code appearance
- Markdown editor
- Image and PDF preview
- Search Everywhere
- Recent Files
- Navigation Bar
- Find and replace
- Changes and commits
- Sign-in prompts
- Commit box layout
- Repository actions
- Commit options
- Ignoring files
- Diffs
- Inline diffs
- Staging view
- Revert a change
- Resolving conflicts
- Merge tool
- Blame
- History and log
- Merge commits
- Commit tabs
- Branches and tags
- Branches popup
- Remotes
- Stashes
- Shelf
- Git menu
- Git dialogs
- Interactive rebase
- Worktrees
- AI agents
- AI usage
- Keep computer awake
- AI tasks
- Submodules
- Git LFS
- GitHub account
- Git Console
- Back and Forward
- Integrated terminal
- Scripts tool window
- Menu bar
- Settings
- Search in Settings
- Color themes
- Rounded panels
- Updates and release channels
- Status bar and help links
- Notifications
- Memory readout and memory log
- Clear Cache
- MCP server and command line tool
- git mergetool mode