Words on paper. The tool steps back.
Mojian is a native plain-text editor for ordinary folders. Edit files, preview images and PDFs, run persistent terminals, and inspect Git diffs in tiled workspaces. No database, account, webview, or cgo.
Download the latest release · 简体中文 · Build from source
- Ordinary files and folders. A project is a folder on disk. Nothing is imported, indexed, or synced, and edits stay in memory until you save.
- Tabs as workspaces. Each tab contains a split tree of editors, image and PDF viewers, and terminals.
- Persistent terminals. Shells run in a detached session server and reattach when Mojian opens again.
- Built-in Git diffs. Inspect staged, unstaged, and untracked work without leaving the window.
- Remote projects over SSH. Files, Git, and terminals run directly on the configured host.
- Native UI in one Go binary. MyGo draws the interface with Metal on macOS and GTK 3 on Linux. No Electron or JavaScript build.
Download the latest build from Releases.
| Architecture | Download |
|---|---|
| Apple Silicon | mojian-<version>-arm64.dmg |
| Intel | mojian-<version>-amd64.dmg |
Open the disk image and drag Mojian into Applications. Release builds are ad-hoc signed rather than notarized. If macOS blocks the first launch, right-click Mojian in Finder and choose Open.
Mojian requires GTK 3 and a desktop session.
Install the Debian package:
sudo apt install ./mojian_<version>_<arch>.debFor a per-user installation without root, put install.sh and mojian-<version>-linux-<arch>.tar.gz in the same folder, then run:
sh install.shPress Cmd+O on macOS or Ctrl+O on Linux to open a folder. The project chip switches between recent projects, and the server chip switches between Local and configured SSH hosts. Each project keeps its own tabs, panes, and recent files.
From a terminal, pass the project folder or a file:
mojian . # the current folder
mojian ~/git/abc # a project folder
mojian ~/git/abc/README.md # a file, with its folder as the projectThe file opens in the focused pane of the project's saved layout. The app bundle's binary is Mojian.app/Contents/MacOS/Mojian: link it as mojian to use the name in these examples, and run mojian --help for the usage.
A launch from a terminal detaches at once: the prompt returns, and closing the terminal or pressing Ctrl+C no longer ends the window. A launch without a terminal, such as from Finder, stays in place, and errors from a detached window go to app.log in Mojian's data folder.
To run mojian from zsh or bash, Settings › Advanced › Shell command installs an alias in ~/.zshrc or the bash startup file; the same row updates or removes it.
The Open Folder picker lists folders reached through symbolic links, and its Hidden folders switch beside Cancel includes names that start with a dot.
On first launch, Mojian opens ~/Documents/Mojian when no project is selected and leaves a welcome note if the folder is empty.
The Explorer shows the folder as it exists on disk:
- Toggle it with
Cmd+B/Ctrl+B. - Filter the visible tree with its search field.
- Search every project file with Open File,
Cmd+P/Ctrl+P. - Create files and folders directly in the tree.
- Right-click to open, rename, duplicate, copy, cut, copy a path, reveal, or move an entry to trash.
Generated folders such as .git, node_modules, dist, and build stay hidden.
Press Cmd+T / Ctrl+Shift+T to open a tab, as in Ghostty. Split the focused pane right or down with Cmd+D / Shift+Cmd+D (Ctrl+Shift+O / Ctrl+Shift+E on Linux); left and up have no default keys, and can be assigned in Settings › Keyboard. A new pane opens with an inline file search.
Drag a pane by its header onto another pane's edge to move it. Use Option+Cmd / Ctrl+Alt and the arrows to move focus, Shift+Cmd+Enter / Ctrl+Shift+Enter to zoom the focused pane, Cmd+W to close a pane, and Option+Cmd+W / Ctrl+Alt+W to close the tab.
Double-click a tab to rename it, double-click a pane header to zoom it, or right-click a tab for more actions.
Press Ctrl and the backtick key (⌃ + backtick on macOS) to toggle a terminal at the project root. Terminals are panes, so they can be split, moved, zoomed, and closed like any other pane. On macOS and Linux, quitting Mojian leaves their shells alive and reopening attaches them again.
Press Shift+Cmd+S / Ctrl+Shift+S to open an SSH terminal to a host from Settings › Hosts.
Code keeps line numbers and prose wraps. Syntax highlighting covers Python, JavaScript, TypeScript, Go, Rust, C and C++, Swift, Kotlin, Ruby, JSON, YAML, TOML, SQL, HTML, CSS, Markdown, and more.
Markdown panes switch between source and preview from the pane header. Settings › Editor can render new .md files by default. Images, including SVG, open in a contained viewer. PDFs page through every page: drawn with Poppler's pdftoppm when it is installed, else with PDFKit on macOS.
Press Cmd+S / Ctrl+S to write every unsaved note atomically. Unsaved work is also written when the window closes.
Press Ctrl+Shift+G on both platforms to compare the working tree with HEAD. Statuses appear on the left and a two-gutter diff on the right, including staged, unstaged, and untracked work.
Press Shift+Cmd+P / Ctrl+Shift+P to search commands, files, and tabs with fuzzy matching.
Press Cmd+, / Ctrl+, to open the separate Settings window. It includes General, Appearance, Editor, Terminal, Shell, Notifications, Keyboard, Hosts, Git, Advanced, and Updates.
Search finds preferences by name or keyword, and Cmd+F focuses the search field. Mojian follows the system appearance by default; View › Appearance overrides it, and the Appearance page's theme grid picks one of ten color themes (Petal, Mist, Meadow, Dusk, Tide, Apricot, Aurora, Dune, Paper, Plain) for the window, the editor and terminals.
- Add a host in Settings › Hosts.
- Choose Set Up Server on its row. Mojian uploads
mojian-serverandlibghostty-vtto~/.local/share/mojianand checks that the server answers. - Choose the host from the server chip and open a folder.
Setup requires no root access, listening port, or system service.
The Explorer lists files on the host. Files are read when opened, and saves and file operations write straight back. Git also runs on the host. Once opened, a project stays loaded, so switching back restores its tabs and terminals without reading it again.
Each project in the project chip, local or remote, has a trash button on its right. It removes that project from the list and unloads it if it is open, saving first when it is the open project: a local close switches to the next recent project, and a remote one goes back to the last local project. The host's connection is kept after Set Up Server and while any project on it is loaded, so its folder picker opens without connecting again; it is released when the last project on that host is removed, and at quit.
The remote server and its terminals stay alive when Mojian or the SSH connection disconnects. Each terminal remembers the server that owns it. Run mojian-server -stop to end a server explicitly.
Open Settings › Updates to check the latest signed GitHub release:
- Check for Updates reports whether a newer version is available.
- Install Update downloads it and verifies its signature.
- Restart to Update applies a staged update and relaunches Mojian.
Self-updates require a writable installation, such as the macOS app bundle or the per-user Linux archive. A .deb installed in /opt is updated by its package manager instead.
The labels in Mojian follow the platform. These are the default bindings; Settings › Keyboard can rebind, reset, or unbind them. The tab and pane defaults follow Ghostty: ⌘ for files, tabs and tools, ⌘⌥ for moving through panes, and ⌃ for the panels beside them.
| Action | macOS | Linux |
|---|---|---|
| Open project | ⌘O |
Ctrl+O |
| Open file | ⌘P |
Ctrl+P |
| New file | ⌘N |
Ctrl+N |
| New folder | ⇧⌘N |
Ctrl+Shift+N |
| Rename selected entry | F2 |
F2 |
| Move selected entry to Trash | ⌘⌫ |
Ctrl+Backspace |
| Save | ⌘S |
Ctrl+S |
| New tab | ⌘T |
Ctrl+Shift+T |
| Close pane / tab | ⌘W / ⌥⌘W |
Ctrl+Shift+W / Ctrl+Alt+W |
| Next / previous tab | ⇧⌘] / ⇧⌘[ |
Ctrl+Tab / Ctrl+Shift+Tab |
| Show tab 1-9 | ⌘1…⌘9 |
Alt+1…Alt+9 |
| Split right / down | ⌘D / ⇧⌘D |
Ctrl+Shift+O / Ctrl+Shift+E |
| Split left / up | assign in Settings | assign in Settings |
| Focus neighboring pane | ⌥⌘ + arrows |
Ctrl+Alt + arrows |
| Move focused pane | drag, or assign in Settings | drag, or assign in Settings |
| Zoom pane | ⇧⌘↩ |
Ctrl+Shift+Enter |
| Toggle file tree | ⌘B |
Ctrl+B |
| Toggle terminal | ⌃ + backtick |
Ctrl + backtick |
| SSH terminal | ⇧⌘S |
Ctrl+Shift+S |
| Git diff page | ⌃⇧G |
Ctrl+Shift+G |
| Command palette | ⇧⌘P |
Ctrl+Shift+P |
| Settings | ⌘, |
Ctrl+, |
Two Ghostty keys stay with the editor: ⌘[ / ⌘] indent and outdent, and ⌘Enter inserts a line below.
Terminal and SSH shortcuts are available on macOS and Linux only.
Mojian requires Go 1.27.3 or later. MyGo is pinned as a Go tool in go.mod, so the first go tool mygo command downloads the exact version.
git clone https://github.com/ox0pine/mojian.git
cd mojian
go tool mygo dev # live-reloading development app
go test ./... # unit and integration tests
go tool mygo vet . # go vet plus MyGo's UI lifetime checksUse go tool mygo dev -web to open the interface in a browser with files kept in memory.
cmd/harness serves the real window and Settings views to an MCP client
through mygo-mcp, so an agent can
inspect, click, type into and screenshot the interface without a desktop
window:
go run ./cmd/harness # http://127.0.0.1:8080/mcp
go run ./cmd/harness -addr 127.0.0.1:8090Each run seeds a disposable project in the temp directory, and the fixtures never open native windows, start terminals or touch your projects and settings. The endpoint has no authentication, so keep it on loopback.
go tool mygo build -platform darwin/arm64,darwin/amd64
go tool mygo build -platform linux/amd64,linux/arm64Build output lives under build/<os>-<arch>/. macOS produces .app and .dmg; Linux produces .tar.gz and .deb.
After changing the session protocol or cmd/mojian-server, rebuild the embedded remote binaries:
go generate ./internal/remotebinPush a vX.Y.Z tag to run .github/workflows/release.yml. The workflow tests the tree, builds every platform, creates a draft release, uploads the installers and SHA256SUMS, and publishes only after every upload succeeds. See RELEASING.md for the full process.
Each release contains:
- macOS:
mojian-<version>-arm64.dmgandmojian-<version>-amd64.dmg - Linux:
mojian-<version>-linux-{amd64,arm64}.tar.gz, matching.debpackages, andinstall.sh - Signed update archives (
*-darwin-*.tar.gz,*-linux-*.tar.gz) andupdate-<target>.jsonmanifests SHA256SUMS
Mojian uses ink #1F1B16, paper #FBF7EF, and vermilion #D24A2B. Almost everything is ink on paper; only the cursor keeps the vermilion, the one voice the page raises.
- Action icons: Lucide, ISC
- File icons: Material Icon Theme, MIT
- Interface font: JetBrains Mono, OFL
- Wordmark: Literata, SIL OFL
- Terminals: libghostty-vt and creack/pty, MIT
- Window and interaction references: GoRex and Kero
- Native UI: MyGo
MIT. See LICENSE.
