takeCode
A modern web interface for browsing and searching your massCode snippets with syntax highlighting, themes, and copy-to-clipboard functionality.
π Table of Contents
- πΈ Screenshot
- π Live Demo
- π‘ Motivation
- β οΈ Affiliation & Disclaimer
- β¨ Features
- π Quick Start
- Finding Your massCode Database
- Using Docker Compose
- Manual Docker Run
- π§ Development
- π€ Contributing
- π License
- π Star History
πΈ Screenshot
*Browse your massCode snippets with a clean, modern web interface featuring synβ¦
takeCode
A modern web interface for browsing and searching your massCode snippets with syntax highlighting, themes, and copy-to-clipboard functionality.
π Table of Contents
- πΈ Screenshot
- π Live Demo
- π‘ Motivation
- β οΈ Affiliation & Disclaimer
- β¨ Features
- π Quick Start
- Finding Your massCode Database
- Using Docker Compose
- Manual Docker Run
- π§ Development
- π€ Contributing
- π License
- π Star History
πΈ Screenshot
Browse your massCode snippets with a clean, modern web interface featuring syntax highlighting, (regex-)search, dark-/light-mode and tabbed code fragments.
π Live Demo
Check out the live demo at https://demo.take-code.dev/
π‘ Motivation
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.
β οΈ Affiliation & Disclaimer
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.
β¨ Features
- π 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
π Quick Start
Finding Your massCode Database
takeCode works by reading your existing massCode db.json
file. Hereβs how to locate it:
On Different Operating Systems:
- 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.
Shared/Network Databases
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.
Using Docker Compose (Recommended)
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 massCode db.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
Volume Mapping
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.
Configuration Options
takeCode supports environment variables for customization:
SEARCH_HIGHLIGHT_LIMIT
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
Manual Docker Run
# 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
π§ Development Setup
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
π€ Contributing
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!
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Try takeCode today and supercharge your snippet management! π