A modern web interface for browsing and searching your massCode snippets with syntax highlighting, themes, and copy-to-clipboard functionality.
- πΈ Screenshot
- π Live Demo
- π‘ Motivation
β οΈ Affiliation & Disclaimer- β¨ Features
- π Quick Start
- π§ Development
- π€ Contributing
- π License
- π Star History
Browse your massCode snippets with a clean, modern web interface featuring syntax highlighting, (regex-)search, dark-/light-mode and tabbed code fragments.
Check out the live demo at https://demo.take-code.dev/
I love massCode - it's an amazing code snippet manager that helps me organize and access my code snippets efficiently. However, sometimes I work on devices where I can't install the desktop client (like company laptops, shared computers, or restricted environments). To still have access to my snippets, I created takeCode - a lightweight web interface that works with massCode's database files.
This project is not affiliated with massCode in any way. I'm just a happy user of massCode and a developer with passion who wanted to extend the functionality for my own use cases. This project works with massCode's db.json
database files, but besides that, there are no other touchpoints or official connections with the massCode project or its developers.
- π Search & Filter: Quickly find snippets by name, description, or content
- π¨ Themes: Light, dark, and auto themes with smooth transitions
- π Copy to Clipboard: One-click copying of code blocks with visual feedback
- π³ Tree Navigation: Browse snippets organized in folders
- π± Responsive Design: Works on desktop and mobile devices
- π³ Docker Ready: Easy deployment with Docker Compose
takeCode works by reading your existing massCode db.json
file. Here's how to locate it:
- macOS:
~/Library/Application Support/masscode/db.json
- Windows:
%APPDATA%\masscode\db.json
(usuallyC:\Users\<username>\AppData\Roaming\masscode\db.json
) - Linux:
~/.config/masscode/db.json
For more details, check the massCode documentation on data storage.
You can also use takeCode with databases stored on network drives or shared locations. Simply mount the network drive and point the volume mapping to the shared db.json
file path.
-
Download the docker-compose.yml:
wget https://raw.githubusercontent.com/codebude/takecode/main/docker-compose.yml
-
Edit the volume mapping: Open
docker-compose.yml
and update the volume path to point to your local massCodedb.json
file:volumes: - /path/to/your/masscode/db.json:/data/db.json:ro
-
Run the application:
docker-compose up -d
-
Open your browser:
http://localhost:8080
The docker-compose.yml
includes a volume mount that maps your local db.json
file to the container:
volumes:
- ./db.json:/data/db.json:ro
Important: Update the left side (./db.json
) to the actual path of your massCode database file. The volume is read-only to prevent accidental modifications to your data.
takeCode supports environment variables for customization:
Controls how many search matches are highlighted per snippet.
- Default:
3
- Range:
-1
to9007199254740991
(JavaScript'sNumber.MAX_SAFE_INTEGER
) - Special value:
-1
means highlight all matches (no limit)
Examples:
# Highlight only the first 5 matches per snippet
environment:
- SEARCH_HIGHLIGHT_LIMIT=5
# Highlight all matches (no limit)
environment:
- SEARCH_HIGHLIGHT_LIMIT=-1
# Use default (3 matches)
# No environment variable needed
# Using GitHub Container Registry
docker run -d -p 8080:80 -v /path/to/your/db.json:/data/db.json:ro ghcr.io/codebude/takecode:latest
# Or using Docker Hub
docker run -d -p 8080:80 -v /path/to/your/db.json:/data/db.json:ro codebude/takecode:latest
If you want to contribute or modify the styles:
-
Install dependencies:
npm install
-
Build CSS and run dev server:
npm run dev
- Build production CSS and update version:
npm run build
Found a bug or have a feature request? Feel free to:
- Open an issue
- Create a pull request
- β Star the repository if you find it useful!
This project is licensed under the MIT License - see the LICENSE file for details.
Try takeCode today and supercharge your snippet management! π