RepoPilotOpen in app →

cxasm/notepad--

一个支持windows/linux/mac的文本编辑器,目标是做中国人自己的编辑器,来自中国。

Mixed

Single-maintainer risk — review before adopting

worst of 4 axes
Use as dependencyConcerns

copyleft license (GPL-3.0) — review compatibility; no tests detected…

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 4w ago
  • 4 active contributors
  • GPL-3.0 licensed
Show 5 more →
  • Small team — 4 contributors active in recent commits
  • Single-maintainer risk — top contributor 89% of recent commits
  • GPL-3.0 is copyleft — check downstream compatibility
  • No CI workflows detected
  • No test directory detected
What would change the summary?
  • Use as dependency ConcernsMixed if: relicense under MIT/Apache-2.0 (rare for established libs)

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Forkable" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/cxasm/notepad--?axis=fork)](https://repopilot.app/r/cxasm/notepad--)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/cxasm/notepad-- on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: cxasm/notepad--

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/cxasm/notepad-- shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Single-maintainer risk — review before adopting

  • Last commit 4w ago
  • 4 active contributors
  • GPL-3.0 licensed
  • ⚠ Small team — 4 contributors active in recent commits
  • ⚠ Single-maintainer risk — top contributor 89% of recent commits
  • ⚠ GPL-3.0 is copyleft — check downstream compatibility
  • ⚠ No CI workflows detected
  • ⚠ No test directory detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live cxasm/notepad-- repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/cxasm/notepad--.

What it runs against: a local clone of cxasm/notepad-- — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in cxasm/notepad-- | Confirms the artifact applies here, not a fork | | 2 | License is still GPL-3.0 | Catches relicense before you depend on it | | 3 | Default branch main exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 56 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>cxasm/notepad--</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of cxasm/notepad--. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/cxasm/notepad--.git
#   cd notepad--
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of cxasm/notepad-- and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "cxasm/notepad--(\\.git)?\\b" \\
  && ok "origin remote is cxasm/notepad--" \\
  || miss "origin remote is not cxasm/notepad-- (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(GPL-3\\.0)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"GPL-3\\.0\"" package.json 2>/dev/null) \\
  && ok "license is GPL-3.0" \\
  || miss "license drift — was GPL-3.0 at generation time"

# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
  && ok "default branch main exists" \\
  || miss "default branch main no longer exists"

# 4. Critical files exist
test -f "CMakeLists.txt" \\
  && ok "CMakeLists.txt" \\
  || miss "missing critical file: CMakeLists.txt"
test -f "src/RealCompare.pro" \\
  && ok "src/RealCompare.pro" \\
  || miss "missing critical file: src/RealCompare.pro"
test -f "src/MediatorDisplay.h" \\
  && ok "src/MediatorDisplay.h" \\
  || miss "missing critical file: src/MediatorDisplay.h"
test -f "src/MediatorFileTree.h" \\
  && ok "src/MediatorFileTree.h" \\
  || miss "missing critical file: src/MediatorFileTree.h"
test -f "src/Encode.h" \\
  && ok "src/Encode.h" \\
  || miss "missing critical file: src/Encode.h"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 56 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~26d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/cxasm/notepad--"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

Notepad-- is a lightweight, cross-platform text editor (Windows/Linux/macOS) written in C++ and Qt, designed as a Chinese domestic alternative to Notepad++. It supports syntax highlighting, file tree navigation, text comparison modes, character encoding detection, and runs natively on UOS (a Chinese domestic Linux distribution), macOS, and Windows without requiring Wine or emulation. Monolithic Qt/C++ application: src/ contains the main editor implementation split into mediator/display components (MediatorDisplay.cpp/h, MediatorFileTree.cpp/h), UI tree widgets (RcTreeWidget.cpp, QTreeWidgetSortItem.cpp), file encoding handling (Encode.cpp/h), and text comparison logic (CmpareMode.cpp, RealCompare.cpp). Build system uses both CMake (CMakeLists.txt root) and Qt qmake (.pro files) with platform-specific packaging configs in cmake/ (NSIS, DEB).

👥Who it's for

Chinese software developers and end-users seeking a domestic alternative to Notepad++; system administrators deploying on UOS/Linux/macOS who want a lightweight editor without dependency on Western software; contributors wanting to participate in Chinese open-source software localization efforts.

🌱Maturity & risk

Actively developed and production-ready (v3.5 latest release available on Gitee). The codebase shows substantial C++ implementation (~6.5MB) with multi-platform support and installer packages (NSIS, Inno Setup, DEB). However, GitHub mirror is acknowledged as irregular sync (author in China with intermittent GitHub access), so the Gitee repository is the canonical source.

Single-maintainer project (author cxasm) with occasional GitHub sync delays due to network/location constraints—primary development happens on Gitee, not GitHub. The project has been subject to competitive sabotage (documented in project notes), creating community friction. Dependencies appear to be Qt + standard C++ libraries, but no visible lock files or detailed dependency manifest in the root.

Active areas of work

Active maintenance on Gitee (https://gitee.com/cxasm/notepad--); GitHub repo is a periodic mirror. Recent focus includes cross-platform stability on UOS, macOS, and various Linux distributions. Version 3.5 is latest stable release. No visible open GitHub PRs in this mirror, but development history shows ongoing UI refinement and platform-specific bug fixes.

🚀Get running

Clone from Gitee (recommended): git clone https://gitee.com/cxasm/notepad-- && cd notepad--. For GitHub mirror: git clone https://github.com/cxasm/notepad-- && cd notepad--. Build with CMake: mkdir build && cd build && cmake .. && make (on Linux/macOS) or use Qt Creator to open src/RealCompare.pro. On Windows, use MSVC or MinGW; on macOS ensure Qt framework is installed.

Daily commands: Linux/macOS: cd src && qmake RealCompare.pro && make or cmake .. && make. Windows (MSVC): Open src/RealCompare.pro in Qt Creator, select MSVC kit, build. Alternatively: qmake RealCompare.pro && nmake. The editor launches directly without a dev server—run the compiled binary (e.g., ./RealCompare or RealCompare.exe).

🗺️Map of the codebase

  • CMakeLists.txt — Root build configuration for cross-platform compilation (Windows/Linux/Mac); essential for understanding the entire project's architecture and dependencies.
  • src/RealCompare.pro — Qt project file defining core application structure, modules, and compilation settings; primary entry point for the Qt-based text editor.
  • src/MediatorDisplay.h — Core mediator for managing the display layer and UI interactions; implements the Mediator pattern that coordinates between file tree and editor components.
  • src/MediatorFileTree.h — Handles file system operations and tree widget management; critical for understanding file browsing and project navigation architecture.
  • src/Encode.h — Text encoding/decoding abstraction; essential for multi-platform text file handling and character set support.
  • src/CmpareMode.h — Implements file and directory comparison features; key functionality differentiating this editor from competitors.
  • src/RcTreeWidget.h — Custom tree widget with context menu and file operations; foundational UI component for file explorer integration.

🧩Components & responsibilities

  • MediatorDisplay — Central coordinator for all UI updates, display state, and user interactions with the editor

🛠️How to make changes

Add a New Text Comparison Feature

  1. Define comparison mode interface in CmpareMode.h with new comparison algorithm (src/CmpareMode.h)
  2. Implement comparison logic in CmpareMode.cpp handling both file and directory modes (src/CmpareMode.cpp)
  3. Add UI action and menu item in MediatorDisplay.cpp to trigger comparison (src/MediatorDisplay.cpp)
  4. Integrate display updates through MediatorDisplay to show comparison results (src/MediatorDisplay.h)
  5. Add corresponding toolbar icon in Resources/edit/styleblack/ (src/Resources/edit/styleblack)

Add Support for a New Text Encoding

  1. Add encoding enum and conversion logic in Encode.h (src/Encode.h)
  2. Implement encoding/decoding functions in Encode.cpp using Qt codec framework (src/Encode.cpp)
  3. Register new encoding in MediatorDisplay for file open/save dialogs (src/MediatorDisplay.cpp)
  4. Update CMakeLists.txt if additional Qt modules are needed (CMakeLists.txt)

Extend File Tree with New Context Menu Actions

  1. Define new action handler in RcTreeWidget.h with signal/slot mechanism (src/RcTreeWidget.h)
  2. Implement context menu action in RcTreeWidget.cpp (src/RcTreeWidget.cpp)
  3. Connect action to file system logic in MediatorFileTree.cpp (src/MediatorFileTree.cpp)
  4. Add icon asset for new action in Resources/edit/styleblack/ (src/Resources/edit/styleblack)
  5. Update RealCompare.qrc to register new icon resource (src/RealCompare.qrc)

Add Platform-Specific Behavior

  1. Add platform detection and conditional logic in CMakeLists.txt (CMakeLists.txt)
  2. Implement platform-specific code in MediatorFileTree.cpp or MediatorDisplay.cpp using Q_OS_* macros (src/MediatorFileTree.cpp)
  3. Test on target platform (Windows, Linux, macOS) to verify behavior (src/RealCompare.pro)

🔧Why these technologies

  • Qt Framework — Enables single codebase for Windows/Linux/macOS with native look-and-feel; mature ecosystem for cross-platform desktop applications
  • CMake + qmake dual support — CMake provides modern build system while qmake maintains Qt project compatibility; supports diverse build environments
  • Mediator Pattern (MediatorDisplay, MediatorFileTree) — Decouples UI components from business logic; simplifies complex interactions between file tree, editor, and display
  • Custom Tree Widget (RcTreeWidget) — Provides context menu integration and custom sorting for file explorer; enables right-click operations on files

⚖️Trade-offs already made

  • Dual build system (CMake + qmake)

    • Why: Qt project legacy support and cross-platform testing flexibility
    • Consequence: Increased build configuration maintenance; potential inconsistency between build paths
  • Mediator pattern for UI coordination

    • Why: Reduce coupling between file tree and display components
    • Consequence: Additional abstraction layer adds indirection; increases complexity of tracing interactions
  • Custom encoding detection in Encode class

    • Why: Support multiple text encodings (UTF-8, GBK, etc.) for international users
    • Consequence: Complex encoding logic; potential encoding detection ambiguities in mixed-encoding files

🚫Non-goals (don't propose these)

  • Real-time collaboration or multi-user editing
  • Built-in version control integration (Git UI)
  • Code compilation or debugging (language-specific IDE features)
  • Plugin/extension system for third-party code
  • Cloud synchronization or file hosting integration
  • Advanced project management or workspace features
  • Integrated terminal or command execution

🪤Traps & gotchas

Qt version constraint: build requires Qt 5.x minimum (verified via qmake use). Cross-platform qmake/CMake coexistence: both build systems must stay in sync—modifying one without updating the other causes build divergence. UOS/Chinese locale testing: some features (file dialogs, system integration) require actual UOS environment for validation; Linux/Windows CI may miss platform-specific bugs. No visible .github/workflows CI, so breakage may go undetected on GitHub mirror. Resource compilation: RealCompare.qrc must be recompiled if icons change—qmake handles this, but CMake build may skip it if not configured correctly. Charset handling: Encode.cpp makes assumptions about file endings and BOM detection that may fail on obscure charset combinations.

🏗️Architecture

💡Concepts to learn

  • Qt Framework & Signal-Slot Architecture — Entire UI and event handling relies on Qt's signal-slot mechanism; understanding this is mandatory for modifying any interactive component in Notepad--
  • Character Encoding Detection & Conversion — Notepad-- must auto-detect file charset (UTF-8, GBK, Latin-1, etc.) and handle mixed-encoding scenarios common in Chinese text files; Encode.cpp is the core logic
  • Mediator Pattern (UI Architecture) — MediatorDisplay and MediatorFileTree decouple the editor viewport from the file tree—a common pattern in complex Qt apps to avoid tight coupling between components
  • QMake Build System & Project Files (.pro) — Parallel to CMake, qmake is Qt's native meta-build system; .pro files define source, headers, resources, and platform-specific flags—changes to source layout require .pro updates
  • Resource Compilation (Qt .qrc Format) — Icons, images, and static assets are compiled into the binary via .qrc files (RealCompare.qrc); understanding this is crucial for adding new UI resources
  • Diff Algorithm & Side-by-Side Text Comparison — CmpareMode and RealCompare implement text diffing (likely Myers algorithm or similar); essential for the comparison feature that sets Notepad-- apart from basic editors
  • Domestic Software Supply Chain & UOS Ecosystem — Notepad-- explicitly targets UOS (Chinese domestic OS based on Deepin/Linux); understanding UOS package management (.deb), file dialogs, and locale handling is specific to this project's mission
  • notepad-plus-plus/notepad-plus-plus — Direct competitor and primary inspiration; Notepad++ is Windows-only, whereas Notepad-- extends the concept to Linux/macOS with native builds
  • microsoft/vscode — Alternative lightweight editor mentioned in README as viable replacement; Electron-based, cross-platform, but heavier than Notepad--
  • geany/geany — Lightweight native C++ GTK text editor with cross-platform support; similar architecture and target audience (developers, system admins)
  • deepin-community/deepin-editor — Chinese domestic alternative also targeting UOS/Deepin Linux; native Qt-based, comparable feature scope for Chinese market
  • qt/qt5 — Core dependency and ecosystem; Notepad-- is a Qt application, so understanding Qt signals/slots, qmake, and resource compilation is essential

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Create CMake-based cross-platform CI/CD workflow with platform-specific builds

The repo has CMakeLists.txt and platform-specific cmake configs (deb_package_config.cmake, nsis_package_config.cmake) but no GitHub Actions workflow. Add CI to automatically build and test on Windows, Linux, and macOS to catch platform-specific issues early. This is critical for a cross-platform Qt application claiming Win/Linux/Mac support.

  • [ ] Create .github/workflows/build.yml with matrix strategy for [ubuntu-latest, windows-latest, macos-latest]
  • [ ] Add steps to install Qt dependencies and CMake, then build using CMakeLists.txt
  • [ ] Add steps to run basic smoke tests (launch app with --help or verify binary exists)
  • [ ] Reference existing cmake/deb_package_config.cmake and cmake/nsis_package_config.cmake for packaging in CI
  • [ ] Document build instructions in README.md and README_EN.md with CI badge

Organize image assets and refactor root directory structure

The repo root contains scattered image files (1.png, 2.png, 3.png, 4.png, 20221107_160824.png) alongside pngshow/ folder with organized macOS screenshots. This creates clutter and makes maintenance harder. Consolidate all demo/screenshot images into a single docs/screenshots/ directory with consistent naming, and update README references accordingly.

  • [ ] Create docs/screenshots/ directory structure (e.g., docs/screenshots/windows/, docs/screenshots/macos/, docs/screenshots/linux/)
  • [ ] Move root-level .png files to appropriate subdirectories with descriptive names
  • [ ] Reorganize pngshow/macos/ images into docs/screenshots/macos/ with consistent naming (e.g., macos-ui-01.png)
  • [ ] Update README.md and README_EN.md image references to point to new paths
  • [ ] Delete empty pngshow/ folder and add docs/ to .gitignore if it contains generated content

Add platform-specific build and run instructions to THIRDPARTY.md and README

The repo contains Qt (.pro, .qrc, .rc files) and CMake build configs but lacks clear build instructions for different platforms. Users cannot easily understand how to compile from source on Windows (MinGw), Linux (deb), or macOS. Create a proper BUILD.md or expand THIRDPARTY.md with step-by-step platform-specific instructions referencing the existing cmake configs.

  • [ ] Create docs/BUILD.md with sections for: Prerequisites, Windows (MSVC/MinGw), Linux (Qt/deb), macOS (Qt/clang)
  • [ ] Reference src/RealCompare.pro and CMakeLists.txt in build instructions
  • [ ] Document how to use cmake/nsis_package_config.cmake for Windows packaging
  • [ ] Document how to use cmake/deb_package_config.cmake for Linux packaging
  • [ ] Add troubleshooting section for common Qt/CMake issues on each platform
  • [ ] Link BUILD.md from README.md and README_EN.md

🌿Good first issues

  • Add unit tests for src/Encode.cpp/h charset detection: currently no test suite visible; create a tests/ directory with Qt Test Framework tests covering UTF-8, GBK, Latin-1, and mixed-BOM edge cases.
  • Improve README.md with build instructions for each platform (Windows MSVC/MinGw, macOS with Homebrew Qt, Ubuntu/UOS with APT): currently generic; add exact package names and tested Qt versions per OS.
  • Extract hardcoded UI strings in src/MediatorDisplay.cpp and src/RcTreeWidget.cpp to i18n .ts files: enable translation workflow for non-Chinese locales (e.g., English, Japanese, Korean).

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 144c14a — Update README.md (cxasm)
  • c4ea4f7 — Update README.md (cxasm)
  • 3e7e148 — Update README.md (cxasm)
  • afb6f5d — Update README.md (cxasm)
  • b054fad — Update README.md (cxasm)
  • 3c62fb9 — Update README.md (cxasm)
  • ced75ac — Update README.md (cxasm)
  • 62f5150 — Update README.md (cxasm)
  • d1d895e — Update README.md (cxasm)
  • 4ec858c — 增加文件目录 (爬山虎)

🔒Security observations

The Notepad-- codebase appears to be a legitimate Qt-based text editor for cross-platform use. No critical vulnerabilities were detected in the provided file structure. However, several medium-priority security gaps exist: (1) incomplete dependency documentation prevents vulnerability assessment of third-party libraries, (2) no evidence of dependency version pinning or security auditing, (3) resource files lack visible integrity verification mechanisms, and (4) input validation framework is not documented. The project follows standard C++ development practices but would benefit from implementing dependency scanning, version pinning, and security-focused code reviews before distribution. The README content does not indicate malicious intent; it appears to be a legitimate open-source project responding to competitive criticism. Recommended security score improvements: implement SBOM (Software Bill of Materials), add CI/CD security scanning, and conduct a comprehensive security audit of core file handling and user input processing code.

  • Medium · Missing or Incomplete Dependency Management Documentation — CMakeLists.txt, src/RealCompare.pro, THIRDPARTY.md. The 'Dependencies/Package file content' section is empty, making it impossible to verify if third-party dependencies have known vulnerabilities. The project uses Qt framework and CMake but dependency versions are not clearly documented in the provided materials. Fix: Maintain a comprehensive THIRDPARTY.md or similar file listing all dependencies with pinned versions. Implement dependency scanning tools (e.g., OWASP Dependency-Check) in CI/CD pipeline to detect known vulnerabilities.
  • Medium · Unverified Third-Party Dependencies — src/RealCompare.rc, src/RealCompareToMinGw.rc, CMakeLists.txt. The project includes Qt and various system libraries but there is no evidence of dependency verification, version pinning, or security audit trails. Windows-specific components (RC files, MinGW resources) may introduce platform-specific vulnerabilities. Fix: Implement version pinning for all critical dependencies. Use hash verification for downloaded packages. Conduct periodic security audits of third-party libraries, particularly UI frameworks.
  • Low · Potential Resource File Vulnerabilities — src/RealCompare.qrc, src/RealCompare.rc, src/RealCompareToMinGw.rc. Multiple resource files (.rc, .qrc) are present without visible content verification. These files are used for embedding resources and could potentially be manipulated to include malicious content or sensitive information. Fix: Implement content validation for all resource files. Use checksums or code signing to verify integrity. Scan resource files for embedded secrets or suspicious content.
  • Low · Build Configuration Exposure — src/.qmake.stash, src/RealCompare.pro, CMakeLists.txt. CMake and Qt project files (.pro, .qmake.stash) are present in version control. While not inherently dangerous, these may inadvertently expose build paths, compiler flags, or system configuration details. Fix: Review build configuration files to ensure no sensitive paths or credentials are exposed. Consider adding .qmake.stash to .gitignore if not already present.
  • Low · No Visible Security Headers or Input Validation Framework — src/MediatorFileTree.cpp, src/MediatorFileTree.h, src/RcTreeWidget.cpp. As a Qt-based desktop application, there are no visible security headers or centralized input validation mechanisms documented. File operations (particularly text editing and file tree operations) may be vulnerable to path traversal or similar attacks if not properly validated. Fix: Implement centralized input validation for all file paths and user inputs. Use Qt's built-in path sanitization functions. Perform security code review of file handling operations.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · cxasm/notepad-- — RepoPilot