ClipDexter is a powerful desktop application built with Jetpack Compose that transforms your clipboard into a programmable text processing powerhouse. Write Python scripts to manipulate clipboard content instantly - perfect for developers, content creators, and power users who need quick text transformations.
Copy β Process β Paste - That's it! Copy any text to your clipboard, run a Python script on it, and get the processed result instantly copied back to your clipboard. No more switching between applications or manually processing text.
- 20 Pre-built Python Scripts for common text processing tasks
- Custom Script Editor - Write, edit, and save your own Python scripts
- Instant Execution - Run Python code directly on clipboard content
- Persistent Storage - All your custom scripts saved locally
- Convert to Uppercase - Transform text to uppercase
- Convert to Lowercase - Transform text to lowercase
- Capitalize Each Word - Capitalize first letter of each word
- Trim Extra Whitespace - Remove extra spaces and normalize whitespace
- Remove All Line Breaks - Convert multi-line text to single line
- Convert Tabs to Spaces - Replace tab characters with spaces
- Extract First URL - Find the first URL in text
- Extract All URLs - Find all URLs in text
- Extract All Email Addresses - Find all email addresses
- Extract All Numbers - Find all numbers (integers and decimals)
- Convert CSV to JSON - Transform CSV data to JSON format
- Pretty-print JSON - Format JSON with proper indentation
- Minify JSON - Remove all whitespace from JSON
- Encode to Base64 - Encode text to base64
- Decode from Base64 - Decode base64 text
- Count Words and Characters - Provide character, word, and line counts
- Remove All HTML Tags - Strip HTML tags from text
- Escape for HTML - Escape special characters for HTML
- Sort Lines Alphabetically - Sort lines in alphabetical order
- Deduplicate Lines - Remove duplicate lines while preserving order
- Material 3 Design - Beautiful and intuitive interface
- Real-time Script Editor - Edit Python code with syntax highlighting
- Instant Feedback - See results immediately after execution
- Responsive Layout - Adapts to different screen sizes
- Java 11+ - Required for Kotlin Multiplatform
- Python 3 - Required for executing Python scripts
- Gradle - Build system (included in project)
-
Clone the repository:
git clone <repository-url> cd ClipDexter
-
Run the application:
./gradlew run
-
First-time setup:
- The application will automatically create the data store on first run
- Initial scripts will be loaded into
~/.clipdexter/utilities.json
- Copy text to clipboard that you want to process
- Open ClipDexter and browse the list of scripts
- Click "Run" on any script to process your clipboard content
- Result is automatically copied back to your clipboard
- Click "Edit" on any script in the list
- Modify the Python code in the editor
- Click "Save Changes" to update the script
- Changes are persisted to the data store
π Complete Python Scripting Guide - Learn how to write effective Python scripts for clipboard processing, including:
- Using the
$clipvariable to access clipboard content - Common patterns and best practices
- Data processing examples
- Error handling techniques
- Advanced scripting techniques
composeApp/src/jvmMain/kotlin/dev/pinaki/clipdexter/
βββ App.kt # Main application entry point
βββ PyUtilitiesRepository.kt # Repository for managing Python scripts
βββ PythonExecutor.kt # Python script execution engine
βββ ClipboardUtil.kt # Clipboard operations
βββ di/
β βββ AppModule.kt # Dependency injection setup
βββ navigation/
β βββ Navigation.kt # Screen navigation
βββ services/
β βββ PythonUtilitiesDataStore.kt # Data persistence layer
βββ ui/screens/
β βββ ListScreen.kt # Scripts list view
β βββ DetailScreen.kt # Python script editor
βββ viewmodels/
βββ UtilitiesViewModel.kt # UI state management
- Jetpack Compose - Modern declarative UI framework
- Kotlin Multiplatform - Cross-platform development
- Python Integration - Execute Python scripts on clipboard data
- Koin - Dependency injection
- Kotlinx Serialization - JSON serialization
- Kotlinx Coroutines - Asynchronous programming
- Edit
PyUtilitiesRepository.kt - Add script to
getInitialUtilities()map - Provide unique ID and Python code
- Update
getUtilityName()method with display name
# Build for macOS
./gradlew packageDmg
# Build for Windows
./gradlew packageMsi
# Build for Linux
./gradlew packageDeb# Run all tests
./gradlew test
# Run JVM tests only
./gradlew jvmTest
# Run with verbose output
./gradlew test --console=verboseThe application uses python3 command. If your system uses a different command, update PythonExecutor.kt:
val processBuilder = ProcessBuilder("python3", tempFile.absolutePath)To change the data store location, modify PythonUtilitiesDataStore.kt:
private val dataFile = File(System.getProperty("user.home"), ".clipdexter/utilities.json")- Python not found: Ensure Python 3 is installed and accessible via
python3command - Permission errors: Check write permissions for
~/.clipdexter/directory - Build failures: Ensure Java 11+ is installed and JAVA_HOME is set correctly
Run with debug logging:
./gradlew run --debug- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Transform your clipboard into a programmable tool with Python and Jetpack Compose! πβ¨