Skip to content

alebmorais/med_auto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Med Auto - Cross-Platform Snippet System

A synchronized, cross-platform text snippet system using Espanso, Syncthing, and File Browser for seamless snippet management across Windows, Mac, and Raspberry Pi.

πŸ“‹ Overview

This project provides a complete configuration for a multi-platform snippet expansion system with centralized storage and synchronization. The system consists of:

  • Espanso: Universal text expander for Windows and macOS
  • Syncthing: Decentralized file synchronization
  • File Browser: Web-based file management interface (Raspberry Pi)
  • Organized Snippet Library: Pre-configured snippets organized by category

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Windows   β”‚      β”‚    macOS    β”‚      β”‚  Raspberry Pi   β”‚
β”‚             β”‚      β”‚             β”‚      β”‚                 β”‚
β”‚  Espanso    │◄────►│  Espanso    │◄────►│  File Browser   β”‚
β”‚  Syncthing  β”‚      β”‚  Syncthing  β”‚      β”‚  Syncthing      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                    β”‚                      β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    Synchronized espanso/
                     Configuration Folder

πŸ“ Directory Structure

med_auto/
β”œβ”€β”€ espanso/
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── default.yml          # Main Espanso configuration
β”‚   └── match/                   # Snippet definitions
β”‚       β”œβ”€β”€ atendimento/         # Portuguese customer service phrases
β”‚       β”‚   β”œβ”€β”€ inicio.yml
β”‚       β”‚   β”œβ”€β”€ finalizacao.yml
β”‚       β”‚   └── README.md
β”‚       β”œβ”€β”€ medical/             # Medical terminology snippets
β”‚       β”‚   β”œβ”€β”€ common.yml
β”‚       β”‚   └── procedures.yml
β”‚       β”œβ”€β”€ personal/            # Personal information snippets
β”‚       β”‚   └── common.yml
β”‚       β”œβ”€β”€ productivity/        # Productivity templates
β”‚       β”‚   └── common.yml
β”‚       └── development/         # Development/coding snippets
β”‚           └── common.yml
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ quick-start.md           # Quick start guide
β”‚   β”œβ”€β”€ setup-windows.md         # Windows installation guide
β”‚   β”œβ”€β”€ setup-macos.md           # macOS installation guide
β”‚   β”œβ”€β”€ setup-raspberry-pi.md   # Raspberry Pi setup guide
β”‚   β”œβ”€β”€ syncthing-setup.md      # Syncthing configuration guide
β”‚   └── customization-guide.md  # Snippet customization
└── README.md

πŸš€ Quick Start

Prerequisites

  • Windows/macOS: Espanso + Syncthing
  • Raspberry Pi: Syncthing + File Browser + web server

Installation Steps

  1. Install Espanso on your computers (Windows/macOS)
  2. Install Syncthing on all devices
  3. Clone this repository to each device
  4. Configure Syncthing to sync the espanso/ folder
  5. Set up Espanso to use the synced configuration
  6. Configure File Browser on Raspberry Pi (optional)

For detailed installation instructions, see the platform-specific guides in the docs/ folder.

πŸ“ Snippet Categories

Atendimento (match/atendimento/)

  • Portuguese customer service phrases
  • Opening greetings (morning, afternoon, evening)
  • Closing messages and farewells
  • Standard customer interaction phrases

Medical (match/medical/)

  • Common medical abbreviations (BP, HR, Dx, Tx, etc.)
  • Medical templates (vital signs, assessments)
  • Standard medical phrases

Personal (match/personal/)

  • Contact information templates
  • Email signatures
  • Date/time insertions
  • Common greetings

Productivity (match/productivity/)

  • Meeting notes templates
  • Task management
  • Email templates
  • Weekly reports

Development (match/development/)

  • Git commands
  • Code comments (TODO, FIXME, etc.)
  • Documentation templates
  • Debugging helpers

πŸ”§ Usage

Snippets are triggered by typing the trigger keyword. All triggers start with : by default.

Examples:

  • :bp β†’ "Blood Pressure"
  • :date β†’ "2025-11-05"
  • :cumprimento-manha β†’ "Bom dia, tudo bem? Qual seria a solicitaΓ§Γ£o, por gentileza?"
  • :despedida β†’ "Disponha! Bom plantΓ£o!"
  • :meeting β†’ Full meeting notes template
  • :gitcommit β†’ Git commit command

Searchable Menus

Create dropdown menus for related snippets:

  • :dia β†’ Choose from morning/afternoon/evening greetings
  • :atend β†’ Pick customer service responses
  • :med β†’ Select medical abbreviations

Learn more: Espanso Searchable Menus Guide

πŸ“– Documentation

Setup Guides

Customization & Features

Configuration

πŸ”’ Security & Privacy

  • All synchronization happens on your local network
  • No cloud services required
  • Full control over your data
  • Encrypted sync with Syncthing (optional)

Security Best Practices

Important: When deploying this system, especially on Raspberry Pi or shared networks, follow these security guidelines:

Network Binding

  • Default to localhost: Services should bind to 127.0.0.1 (localhost) by default for security
  • Network exposure: Only change to 0.0.0.0 if you need network access, and ensure:
    • Strong passwords are set immediately
    • Firewall rules restrict access to trusted devices/networks
    • Consider using a reverse proxy with TLS for remote access

API Key Management

  • Never hardcode API keys in scripts or cron jobs
  • Store API keys in secure files with restricted permissions (chmod 600)
  • Use environment variables or secure credential files
  • Example secure storage:
    mkdir -p ~/.config/med_auto
    chmod 700 ~/.config/med_auto
    echo "your-api-key" > ~/.config/med_auto/syncthing_api
    chmod 600 ~/.config/med_auto/syncthing_api

Network Access

  • Local-only by default: Access web UIs via http://localhost:port when possible
  • Remote access: For secure remote access:
    • Use SSH tunneling: ssh -L 8384:localhost:8384 user@raspberry-pi
    • Set up a reverse proxy (nginx/Caddy) with TLS certificates
    • Use a VPN for secure network access
    • Configure firewall rules to restrict access

Verification Commands

Check that services are bound correctly:

# Linux/macOS - verify listening ports and addresses
ss -tuln | grep :8384
netstat -tuln | grep :8384

# Should show 127.0.0.1:8384 for localhost-only
# Shows 0.0.0.0:8384 if exposed to network (review if intentional)

For detailed security configurations, refer to the setup guides in docs/.

🀝 Contributing

Feel free to add your own snippet categories or improve existing ones!

  1. Create a new .yml file in the appropriate match/ subdirectory
  2. Follow the existing format
  3. Test your snippets with Espanso
  4. Sync will automatically propagate changes to all devices

πŸ“„ License

MIT License - See LICENSE for details

πŸ”— Resources

About

New Configuration for snippets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors