A surgical string transformation toolkit for the Zed editor, delivered as an LSP-based extension with code-action transforms.
Select text in any file, then trigger code actions to transform it in place:
| Category | Operations |
|---|---|
| Encoding | Base64, Base64URL, URL, HTML, Hex encode/decode, Unicode escape/unescape, JWT decode (header/payload/full) |
| Hashing | MD5, SHA-1, SHA-256, SHA-512, CRC32 |
| Case | UPPER, lower, Title, Sentence, camelCase, PascalCase, snake_case, SCREAMING_SNAKE, kebab-case, dot.case, path/case, CONSTANT_CASE, Toggle |
| JSON | Pretty print, minify, escape, unescape |
| XML | Pretty print, minify |
| CSV | CSV to JSON |
| Whitespace | Trim, collapse, remove blanks/dupes, sort/reverse/shuffle/number lines |
| Escape | Backslash, regex, SQL, shell, CSV |
| Inspect | Character count, byte length, encoding detection |
| Misc | Reverse string |
64 code actions across 10 categories. See CHANGELOG for the full feature list and roadmap for the plan.
- Select text in any file
- Press
Cmd+.(macOS) orCtrl+.(Linux) to open the code actions menu — or right-click the selection - Pick a StringKnife transform — the selected text is replaced in place
Only transforms that produce a different result are shown. For example, "Base64 Decode" won't appear if the selection isn't valid Base64.
- Open Zed
Cmd+Shift+P→ "zed: extensions"- Search for StringKnife and install
Configure StringKnife through Zed's settings.json. All settings are optional — the defaults work out of the box.
| Setting | Type | Default | Description |
|---|---|---|---|
stringknife.enabledCategories |
string[] |
All categories | Which transform categories to show. Valid: encoding, hashing, case, json, xml, csv, whitespace, escape, inspect, misc |
stringknife.maxCodeActions |
number |
50 |
Maximum number of code actions shown in the context menu |
stringknife.smartDetection |
boolean |
true |
When true, decode actions only appear if the selection looks like that encoding. When false, all decode actions are shown unconditionally |
stringknife.hashOutputFormat |
string |
"lowercase" |
Hash digest format: "lowercase" or "uppercase" |
stringknife.jsonIndent |
number |
2 |
Spaces per indent level for JSON Pretty Print |
stringknife.base64LineBreaks |
boolean |
false |
Wrap Base64 output at 76 characters per line (MIME style) |
{
"lsp": {
"stringknife-lsp": {
"initialization_options": {
"enabledCategories": ["encoding", "hashing", "case", "json"],
"maxCodeActions": 20,
"smartDetection": true,
"hashOutputFormat": "uppercase",
"jsonIndent": 4,
"base64LineBreaks": false
}
}
}
}StringKnife works in any file type. The LSP activates for: Rust, TypeScript, JavaScript, Python, Go, Ruby, HTML, CSS, JSON, TOML, YAML, Markdown, Plain Text, C, C++, Java, Kotlin, Swift, Shell Script, SQL, Elixir, and PHP.
See HINTS.md for style conventions and the Adding a New Transform guide.
StringKnife is a three-layer stack — arrows point downward only:
WASM Extension (src/lib.rs) → Zed API surface, starts the LSP binary
LSP Server (stringknife-lsp/) → JSON-RPC dispatch, code action routing
Transform Core (stringknife-core/) → Pure functions: fn(&str) -> Result<String>
The transform layer has zero LSP dependencies, no I/O, and no side effects.
This repository uses ariscan to measure AI-agent readiness at every phase gate. The ARI (Agent Readiness Index) tracks how well the codebase supports autonomous agent contributions across 8 pillars.
| Checkpoint | Phase | Score |
|---|---|---|
| ARI-BASELINE | 0 | 59/100 |
Browse the Knowledge Vault for architecture decisions, session history, and transform registry.