Hand-coding tools for classic ciphers — as an app, an API, and a library.
Encode and decode messages with Enigma, Morse, Polybius, Vigenère, Bacon, and more. Built for cryptography enthusiasts, learners, and developers who want to embed ciphers into their own projects.
SCode is a monorepo with four pieces that share one core:
| Piece | What it is | Who it's for |
|---|---|---|
web/ |
A React app for encoding/decoding in the browser. | Anyone curious about ciphers. |
npm/ |
@zyther/scode-core — the cipher engine as a TypeScript library. |
Developers embedding ciphers in JS/TS projects. |
api/ |
A Next.js HTTP API wrapping the core. | Apps in any language that need ciphers over HTTP. |
cli/ |
@zyther/scode-cli — the scd command-line tool. |
Terminal users, shell scripts, CI pipelines. |
Every cipher runs entirely client-side in the web app, and statelessly in the API. No accounts, no tracking, no data stored between requests.
- Web app → scode.zyther.dev
- API playground → api.scode.zyther.dev/docs
- Install the library →
npm install @zyther/scode-core - Install the CLI →
npm install -g @zyther/scode-cli
curl -X POST https://api.scode.zyther.dev/api/encode \
-H "Content-Type: application/json" \
-d '{"message": "hello world", "pattern": "¬"}'import { encode, decode, format_str } from "@zyther/scode-core"
const { encrypted, config, pattern } = encode({
message: format_str("hello world"),
pattern: "¬", // Morse
})
const { message } = decode({ encrypted, pattern, config })
// → "HELLOWORLD"scd encode "hello world" --pattern "¬"
# → -.-. .... . .-.. .-.. ---What makes SCode different from "just another cipher library": ciphers compose.
A pattern is a string of cipher symbols applied in sequence. Chain them to layer encryption:
encode({ message: "meet me at dawn", pattern: "?|" })
// ││
// Enigma ────────┘│
// Vigenère ───────┘Patterns are applied right-to-left (last symbol = innermost encoding), so
decoding reverses the order automatically. The response includes a config
string with whatever parameters are needed to decode — pass it back verbatim.
| Symbol | Cipher | Symbol | Cipher | |
|---|---|---|---|---|
$ |
SCSimply (key) | | |
Vigenère | |
¢ |
SCSimply (key_m) | § |
Frama | |
@ |
SCSimply (a_num) | ₢ |
Bacon | |
¬ |
Morse | & |
Mutation — reciprocity | |
£ |
Binary | ~ |
Mutation — decalation | |
# |
Polybius | : |
Order — reverse | |
* |
Navajo | ° |
Order — random | |
? |
Enigma |
Symbols @, *, # are restricted — they only work at the end of a pattern.
scode/
├── web/ React app (Vite + Tailwind)
├── npm/ @zyther/scode-core — the cipher engine
├── api/ Next.js HTTP wrapper around the core
├── cli/ @zyther/scode-cli — the `scd` command
└── ...
The core is the source of truth for every cipher. The web app and the API both consume it — no duplicated logic.
| Web | Core | API | CLI | |
|---|---|---|---|---|
| Framework | React 18 + Vite | TypeScript | Next.js 15 | commander |
| Styling | Tailwind | — | Tailwind | picocolors |
| Validation | — | — | Zod | — |
| Build | Vite | tsup | Next | tsup |
| Docs | — | — | Scalar (OpenAPI) | --help |
Contributions are welcome — new ciphers, docs, bug reports, anything.
- Fork the repo
- Create a branch (
git checkout -b feat/my-cipher) - Commit your changes (
git commit -m 'feat: add X cipher') - Push (
git push origin feat/my-cipher) - Open a Pull Request
Please follow Conventional Commits.
MIT © Zyther Dev
Built with ♥ for cryptography.