Skip to content

About

Deno fresh project to generate passwords

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Synthima Password Generator

Generate cryptographically random passwords using crypto.getRandomValues.

The hosted app is linked from this repo's About section.

Built on top of the JSR library Synthima.


Features

  • Cryptographically random output via crypto.getRandomValues
  • 47 built-in character set presets (Latin, Cyrillic, Greek, Arabic, CJK, and more)
  • Simple mode: toggle the four common sets (uppercase, lowercase, numbers, symbols)
  • Advanced mode: add any preset or hand-type custom character sets with per-requirement min/max
  • Shareable URLs — the full configuration is encoded in the URL and updates live

Shareable URLs

Every configuration is encoded in the URL so you can share or bookmark specific setups.

Format: ?length=N&r=<preset>&r=<preset>:<min>&r=<preset>:<min>:<max>

  • length — password length (default: 12)
  • r — one requirement per param; value is a preset key, optionally followed by :min and :max
  • Omit :min when it's 1 (the default); omit :max when there's no upper limit
  • Unknown preset keys are treated as raw character strings

Example links

Description Query
Strong password (16 chars) uppercase + lowercase + numbers + symbols — /?length=16&r=uppercase&r=lowercase&r=numbers&r=special
6-digit PIN numbers only — /?length=6&r=numbers
Letters only uppercase + lowercase, no numbers or symbols — /?length=12&r=uppercase&r=lowercase
Numbers-heavy at least 4 digits — /?length=16&r=uppercase&r=lowercase&r=numbers:4&r=special
Constrained symbols max 2 special chars — /?length=16&r=uppercase&r=lowercase&r=numbers&r=special:1:2
Greek + numbers exotic mix — /?length=20&r=greek&r=numbers
Russian + symbols Cyrillic with special chars — /?length=24&r=russian&r=numbers&r=special

Preset keys

Key Characters
uppercase A–Z
lowercase a–z
numbers 0–9
special !@#$%^&*
german-upper / german-lower Base Latin + ÄÖÜ / äöüß
french-upper / french-lower Base Latin + French diacritics
spanish Base Latin + ñÑ¿¡
nordic-upper / nordic-lower Base Latin + ÅÆØÐÞ / åæøðþ
central-eu-upper / central-eu-lower Base Latin + Central European
romanian-upper / romanian-lower Base Latin + ĂÂÎȘȚ / ăâîșț
turkish-upper / turkish-lower Base Latin + ÇĞİŞÖÜ / çğışöü
portuguese-upper / portuguese-lower Base Latin + Portuguese diacritics
latin-extended Full Latin Extended block
extended-special £€¥₹ ± × ÷ ≠ ≈ ∞ … and more
currency £ € ¥ ₹ ₽ ₩ ₪ ₿ ¢
math ± × ÷ ≠ ≈ ∞ ∑ ∏ √ ∫ ∂
arrows ← → ↑ ↓ ↔ ↗ ↘ ↙ ↖ ⇒ ⇐ ⇑ ⇓
typographic « » „ " " ' ' … † ‡ § ¶ •
superscripts / subscripts ⁰¹²³… / ₀₁₂₃…
russian Full Russian Cyrillic
ukrainian Full Ukrainian Cyrillic
bulgarian Full Bulgarian Cyrillic
serbian-cyrillic Full Serbian Cyrillic
greek Full Greek alphabet
arabic-letters Arabic consonants
arabic-indic Arabic-Indic digits ٠١٢…
arabic-punct ، ؛ ؟
hebrew-letters Hebrew alphabet
hindi-consonants / hindi-vowels Devanagari consonants / vowels
cjk 3500 common CJK characters
hiragana Japanese Hiragana
katakana Japanese Katakana
korean-consonants / korean-vowels Korean Jamo
georgian Georgian Mkhedruli
armenian Armenian alphabet
thai-consonants / thai-vowels Thai consonants / vowels

REST API

Generate passwords programmatically via GET /api/generate.

Path: /api/generate on the hosted app (or http://localhost:5173 in dev)

Parameters

Param Default Description
length 12 Password length (integer ≥ 1)
r — Charset requirement — repeatable; same format as URL params above
count 1 Number of passwords to return (integer 1–100)
format json json → JSON array, csv → one password per line

Examples

# One password, default settings
curl "https://<host>/api/generate"
# ["M#0DpNE7c45&"]

# 5 strong passwords, 16 chars
curl "https://<host>/api/generate?length=16&r=uppercase&r=lowercase&r=numbers&r=special&count=5"

# 10 PINs as plain text (one per line)
curl "https://<host>/api/generate?length=6&r=numbers&count=10&format=csv"

Errors

Invalid parameters return 400 with a JSON error body:

{ "error": "count must be between 1 and 100" }
{ "error": "format must be json or csv" }
{ "error": "length must be between 1 and 256" }

MCP server

The generator is also available as a Model Context Protocol server, so MCP clients (Claude Desktop, Claude Code, etc.) can generate passwords directly. It exposes two tools:

Tool Arguments Returns
generate_password length (1–256, default 12), count (1–100, default 1), requirements (optional array — see below) The generated password(s), one per line
list_charset_presets none Every preset as { key, name, size, sample }

Each requirements item is either a preset key or a literal charSet, with optional min/max occurrence counts. With no requirements, passwords use a strong default mix of uppercase, lowercase, numbers, and special characters.

// example generate_password arguments
{
  "length": 20,
  "count": 3,
  "requirements": [
    { "preset": "uppercase", "min": 2 },
    { "preset": "numbers", "min": 2 },
    { "charSet": "!@#$", "max": 4 }
  ]
}

Remote endpoint (hosted)

Streamable HTTP at POST /mcp — no install required, just add the URL:

claude mcp add --transport http password-gen https://<host>/mcp

In Claude Desktop / Claude.ai: Settings → Connectors → Add custom connector and paste https://<host>/mcp.

Local (stdio)

Runs on your machine over stdio — nothing leaves the process. Requires Deno v2+ and a checkout of this repo:

claude mcp add password-gen -- deno run -A /absolute/path/to/synthima-web/mcp/stdio.ts

Or configure it directly in your client:

{
  "mcpServers": {
    "password-gen": {
      "command": "deno",
      "args": ["run", "-A", "mcp/stdio.ts"],
      "cwd": "/absolute/path/to/synthima-web"
    }
  }
}

Both transports are thin wrappers over the same generator core as the web app and REST API.

Protocol revision

Both transports speak the 2026-07-28 revision, which is stateless: no initialize handshake and no session id, so every request stands alone and the server holds nothing between calls — long-lived subscription streams are refused outright, since nothing here is subscribable.

Only that revision is served. Clients speaking the older 2025-era protocol are turned away at connect rather than silently downgraded, so make sure yours is recent enough.


Setup

Prerequisites: Deno v2+

# Clone the repo
git clone https://github.com/JakeAve/synthima-web.git
cd synthima-web

# Install git hooks (runs fmt, lint, type-check, and tests on push)
deno task install:githooks

# Start the dev server
deno task dev

The app will be available at http://localhost:5173/.

Available tasks

Command What it does
deno task dev Start Vite dev server with HMR
deno task build Build for production into _fresh/
deno task start Serve the production build
deno task check Run formatter check, lint, and type-check
deno task test Run the unit tests (lib/, routes/)
deno task test:e2e Build, then run the stdio + HTTP end-to-end tests

Tech stack

About

Deno fresh project to generate passwords

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages