Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mx7b7/codesnip-wpf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

128 Commits

Repository files navigation

CodeSnip

CodeSnip is a personal snippet manager built with .NET 8 / C# / WPF using a MVVM architecture.

Organize, search, and format your code snippets — fast, local, and without internet dependency.

.NET 8 Platform License: MIT Status

⬇️Download

GitHub Release


Slideshow GIF


✨ Features

  • Local storage using SQLite database — all snippets are stored privately on your device.
  • Snippet organization:
    • Hierarchy: Language → Category → Snippet (TreeView)
    • Filter by name or tags
    • Instant search
  • AvalonEdit integration:
    • Syntax highlighting (light/dark mode)
    • Code folding
    • Live editing of .xshd syntax definition files inside the app (colors and font styles)
    • Toggle single-line and multi-line comments
  • Compiler Explorer (Godbolt) integration:
    • Compile snippets without installing compilers locally
    • Support for 30+ languages
    • Add and edit available compilers
    • Select compiler and flags
    • View stdout/stderr output
    • View assembly output with syntax highlighting for supported languages

      Note: Some compilers may generate a very large amount of assembly code even from a small number of source lines.

    • Generate shareable shortlinks to Compiler Explorer
  • UI/UX:
    • Modern Metro interface
    • Flyout panels for additional windows (settings, editors, actions, etc.)
    • Automatic loading of theme and syntax definitions
  • Export & Sharing:
    • "Copy As": Copy selected code as Markdown, HTML, BBCode, Base64 or a JSON string.
    • Export to File: Save snippets as HTML or in their original language format.

📚 Libraries


🧹 Code Formatters

CodeSnip uses the following code formatters:

  • black – Python code formatting
  • clang-format – Format C, C++, C#, Java, and more
  • csharpier – C# code formatting
  • dfmt – D code formatting
  • rustfmt – Rust code formatting
  • ruff – Python code formatting

Note:
Ensure both Python and black are installed to use black.
To use ruff, manually download the ruff executable and place it in the Tools directory.


⚙️ Build

The project source code is located in the src directory. To build and run CodeSnip, you'll need the .NET 8 SDK or later.

For Development

  1. Clone the repository:

    git clone https://github.com/mx7b7/codesnip-wpf.git
  2. Navigate to the project's root directory:

    cd codesnip-wpf
  3. Build the project from the root directory:

    • For Debug build:

      dotnet build src/CodeSnip -c Debug
    • For Release build:

      dotnet build src/CodeSnip -c Release
  4. Run the application from your IDE (like Visual Studio or VS Code) or using the CLI:

    dotnet run --project src/CodeSnip

    On first launch, the application will automatically create the database in the executable's directory, load languages, and import initial categories/snippets.

Creating a Self-Contained Release Package

A convenient batch script is included in the root directory to create a portable, self-contained, single-file executable for Windows (x64).

  1. Make sure you are in the root directory of the project.
  2. Run the build.bat script:
    .\build.bat
  3. The script will build the project from the src folder and create a release folder in the root directory, containing the CodeSnip.exe file and all necessary components. You can copy this release folder anywhere.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

CodeSnip is a personal snippet manager built with .NET / C# / WPF using a MVVM architecture.

Topics

Resources

License

Stars

Watchers

Forks

AltStyle によって変換されたページ (->オリジナル) /