Skip to content

Latest commit

Β 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”ͺ Knife - Offline Developer Tool Suite

A fast, privacy-focused, offline-first Swiss Army Knife desktop app for software engineers. Built with Electron, Vite, React, TypeScript, Monaco Editor, and Tailwind CSS.

Knife Developer Suite Banner Vite React TypeScript License


⚑ Overview

Knife aggregates daily developer utilities into a unified, desktop-native interface. Operating 100% offline with zero external network runtime requirements, Knife ensures your code snippets, JWT tokens, environment strings, and database schemas remain strictly private on your local machine.


πŸš€ Key Features & Tool Suite

1. ⚑ Code & Markup Studio (JSON / HTML / YAML / XML)

  • Zero-Latency Monaco Editor: Built-in VS Code editor engine with syntax highlighting, line numbers, error diagnostics, and customizable indentation (2, 4, or 8 spaces).
  • Format & Minify: Instant formatting and minification for JSON, HTML, YAML, and XML documents.
  • Bi-Directional Converter: One-click conversions between JSON ↔ HTML ↔ YAML ↔ XML.
  • JSONPath Finder: Interactive path evaluator (e.g. $.settings.theme or features[0]) returning parsed node results.

2. πŸ“Š Data & SQL Converter

  • JSON to CSV: Converts arrays of JSON objects into RFC 4180 compliant CSV format.
  • JSON to Excel: Formats JSON data into tab-separated values (.tsv) ready for instant copy-pasting or export to Microsoft Excel & Apple Numbers.
  • JSON to SQL: Auto-detects column data types (INTEGER, REAL, BOOLEAN, TEXT) and generates:
    • CREATE TABLE DDL schema statements.
    • Properly escaped INSERT INTO table (columns...) VALUES (...) DML queries.
  • SQL to JSON: Parses INSERT INTO ... VALUES (...) statements and converts SQL dumps into structured JSON arrays of objects.
  • CSV to JSON: Reverse conversion converting raw CSV strings into typed JSON objects.

3. πŸ“ Markdown Studio & Previewer

  • Monaco Markdown Editor: Zero-latency Markdown editing with live syntax highlighting and code block formatting.
  • Real-Time Rendered HTML: Styled live preview with dark-mode typography, blockquotes, code syntax, tables, and task list checkboxes.
  • View Modes: Switch between Split View, Live Preview, and Editor Only.
  • Quick Formatting Bar & Export: Insert headings, bold/italic, blockquotes, code blocks, task lists; export .md or .html files directly.

3. πŸ” Security & Cryptography Lab

  • Standard Hashes: Multi-hash calculation for MD5, SHA-1, SHA-256, and SHA-512.
  • Bcrypt Hash Generator: Custom salt rounds selection (cost factor 4–14) with Web Crypto random byte generation.
  • Bcrypt Match Verifier: Test plain-text passwords against any $2a$ / $2b$ Bcrypt hash with live pass/fail match feedback.
  • Base64 & URL Encoders: UTF-8 Base64 encoding/decoding and URL component encoding/decoding.

4. πŸ”‘ JWT & ID Inspector

  • JWT Inspector: Real-time breakdown of Header and Payload (Claims) in Monaco JSON view.
  • Expiration Detector: Live token status calculator displaying active status or exact expiration date/time.
  • Batch ID Generator: Generate UUID v4, ULID, and NanoID in customizable batch quantities (1 to 100) with uppercase and hyphen options.

5. πŸ” Interactive Regex Lab

  • Monaco Match Overlay: Live match highlighting decorations rendered directly inside Monaco Editor.
  • Regex Flags: Toggle g, i, m, s, and u flags dynamically.
  • Capture Groups Table: Detailed breakdown of match indices and sub-capture groups.
  • Preset Library: Built-in regex templates for Email, IPv4, URL, ISO Date, HEX Colors, and Strong Passwords.

6. βš–οΈ Monaco Visual Diff

  • Visual Diff Engine: Side-by-side split view and inline code comparison using Monaco Diff Editor.
  • Line Statistics: Real-time line addition (+) and deletion (-) counters.

7. 🎨 Color Studio & WCAG Auditor

  • Color Pick & Convert: Convert colors across HEX, RGB, HSL, and OKLCH.
  • WCAG 2.1 Contrast Audit: Automatic contrast ratio calculation against light (#FFFFFF) and dark (#0B0F19) backgrounds with AA and AAA pass/fail compliance ratings.

8. ⏱️ Timestamp & Cron Lab

  • Unix Epoch Converter: Converts Unix epoch timestamps (seconds & milliseconds) to system local time, UTC, ISO 8601, and relative time offsets (e.g. "In 3 hours").
  • Cron Visualizer: Parses 5-part cron syntax with human readable descriptions and next 5 scheduled execution dates.

9. πŸ’» Native Desktop Features

  • System Tray Docking: System tray icon with quick action context menu.
  • Global Floating HUD (Cmd+Shift+D): Global hotkey to toggle Knife into a floating overlay window over any active desktop app.
  • Command Palette (Cmd+K): Searchable overlay modal for rapid keyboard navigation.
  • Local Persistence: User preferences and active tab states saved locally offline.

⌨️ Global Shortcuts

Shortcut Description
Cmd + Shift + D (or Ctrl + Shift + D) Toggle Floating HUD Window over any active desktop app
Cmd + K (or Ctrl + K) Open Quick Action Command Palette
Escape Dismiss Command Palette or Modal Overlays

πŸ’» Tech Stack


πŸ› οΈ Getting Started

Prerequisites

  • Node.js: v18.0.0 or higher
  • npm: v9.0.0 or higher

Installation

# 1. Clone repository
git clone https://github.com/mickela/knife.git
cd knife

# 2. Install dependencies
npm install

# 3. Start development environment
npm run dev

Building Production App

# Build desktop production bundle
npm run build

πŸ“‚ Project Structure

knife/
β”œβ”€β”€ electron/
β”‚   β”œβ”€β”€ main.ts             # Main process (Window, System Tray, Global Shortcuts, IPC)
β”‚   └── preload.ts          # ContextBridge exposing native APIs
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.html          # Entry HTML
β”‚   β”œβ”€β”€ main.tsx           # React DOM root
β”‚   β”œβ”€β”€ App.tsx            # Main workspace & tool switcher
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ layout/         # Sidebar, Header, CommandPalette
β”‚   β”‚   β”œβ”€β”€ common/         # MonacoCodeEditor, MonacoDiffEditor, CopyButton
β”‚   β”‚   └── tools/          # Individual tool implementations
β”‚   β”‚       β”œβ”€β”€ JsonYamlStudio.tsx
β”‚   β”‚       β”œβ”€β”€ DataSqlStudio.tsx
β”‚   β”‚       β”œβ”€β”€ HashBcryptEncoder.tsx
β”‚   β”‚       β”œβ”€β”€ JwtIdInspector.tsx
β”‚   β”‚       β”œβ”€β”€ RegexTester.tsx
β”‚   β”‚       β”œβ”€β”€ DiffChecker.tsx
β”‚   β”‚       β”œβ”€β”€ ColorStudio.tsx
β”‚   β”‚       └── TimestampCron.tsx
β”‚   β”œβ”€β”€ types/             # TypeScript definitions
β”‚   └── utils/             # Web Crypto fallback & utilities
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.ts
└── tailwind.config.js

πŸ”’ Privacy & Security

Knife is built with strict privacy principles:

  • 100% Offline: No network requests are made during runtime.
  • Zero Telemetry: No tracking, analytics, or external logging scripts.
  • Local State: All persistent configuration data stays inside your system's user data directory (knife-store.json).

πŸ“„ License

This project is open source and available under the MIT License.

About

Offline-first Electron developer tool suite with Monaco Editor, Cryptography, Regex Tester & Floating HUD

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages