The Toolbox in your terminal and your AI agent
bitanon runs every Toolbox tool from the command line, and bitanon mcp offers them to AI agents as an MCP server. It is the same engine as the web pages, on the same convertlib, hashlib and cipherlib libraries, compiled to a single native binary. It works offline and makes no network requests.
Install
Linux and macOS
curl -fsSL https://raw.githubusercontent.com/bitanon/toolbox/main/install.sh | shWindows (PowerShell)
irm https://raw.githubusercontent.com/bitanon/toolbox/main/install.ps1 | iexThe installer downloads the binary for your system (Linux x64 or arm64, macOS on Apple silicon or Intel, Windows x64) from the latest release, checks it against the release's SHA-256 checksums, and puts it in ~/.local/bin (on Windows, %LOCALAPPDATA%\bitanon\bin, added to your PATH). You can also download a binary yourself, or install from source with the Dart SDK:
dart pub global activate --source git https://github.com/bitanon/toolboxUse it
bitanon hash abc
# ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
bitanon hash --file archive.zip --algorithm sha256,blake2b256
echo -n "hello" | bitanon convert --to base64
bitanon argon2-hash "correct horse battery staple"
bitanon aead-encrypt "secret" --key $(bitanon random --length 32)
bitanon uuid --version 7 --count 3
bitanon totp --secret JBSWY3DPEHPK3PXP
bitanon help # every tool
bitanon help aes # one tool's options- Data comes from the argument,
--file <path>or standard input. Files and standard input are read byte for byte, sobitanon hash < filegives the same answer assha256sum. Set the format flag (for example--from base64) to read them as text instead. --jsonprints the full result as JSON, for scripts.- Exit codes: 0 on success, 1 when a tool fails or a password does not match, 2 for a usage mistake.
MCP server for AI agents
Language models are bad at computing hashes, encodings and keys in their heads. bitanon mcp speaks the Model Context Protocol over standard input and output, so an agent can call the same tested code instead. Every tool is read-only: the server reads no files and makes no network requests.
Claude Desktop, Cursor and other clients
Add it to the client's MCP configuration (claude_desktop_config.json for Claude Desktop), with the path where you put the binary:
{
"mcpServers": {
"bitanon": { "command": "/home/you/.local/bin/bitanon", "args": ["mcp"] }
}
}Claude Code
claude mcp add bitanon -- ~/.local/bin/bitanon mcpToolsbitanon 0.1.0
The same names work as commands and as MCP tools. Options are flags on the command line and arguments over MCP.
hashCompute message digests and checksums: SHA-2, SHA-3, SHAKE, Keccak, BLAKE2, RIPEMD, SM3, SHA-1, MD5, MD4, MD2, CRC, Adler-32 and xxHash.
- --input
- The data to hash.Required.
- --input-format
- How the input is written.Default:
text.Any of the formats below. - --algorithms
- Algorithms to run.Default:
sha256.sha256 · sha512 · sha384 · sha224 · sha512-256 · sha512-224 · sha3-256 · sha3-512 · sha3-384 · sha3-224 · shake128 · shake256 · keccak256 · keccak512 · keccak384 · keccak224 · blake2b512 · blake2b384 · blake2b256 · blake2b160 · blake2s256 · blake2s224 · blake2s160 · blake2s128 · ripemd160 · ripemd128 · ripemd256 · ripemd320 · sm3 · sha1 · md5 · md4 · md2 · crc16 · crc32 · crc64 · adler32 · xxh32 · xxh64 · xxh3 · xxh128 - --output-format
- How the result is written.Default:
hex.Any of the formats below. - --shake-bits
- Output length of SHAKE128 and SHAKE256 in bits (8 to 8192).
hmacCompute an HMAC (RFC 2104) with a cryptographic hash.
- --message
- The message to authenticate.Required.
- --message-format
- How the message is written.Default:
text.Any of the formats below. - --key
- The secret key.Required.
- --key-format
- How the key is written.Default:
text.Any of the formats below. - --algorithm
- The hash function.Default:
sha256.sha256 · sha512 · sha384 · sha224 · sha512-256 · sha512-224 · sha3-256 · sha3-512 · sha3-384 · sha3-224 · keccak256 · keccak512 · keccak384 · keccak224 · blake2b512 · blake2b384 · blake2b256 · blake2b160 · blake2s256 · blake2s224 · blake2s160 · blake2s128 · ripemd160 · ripemd128 · ripemd256 · ripemd320 · sm3 · sha1 · md5 · md4 · md2 - --output-format
- How the result is written.Default:
hex.Any of the formats below.
blake2-macCompute a keyed BLAKE2b or BLAKE2s MAC (RFC 7693).
- --message
- The message to authenticate.Required.
- --message-format
- How the message is written.Default:
text.Any of the formats below. - --key
- The secret key: 1 to 64 bytes for BLAKE2b, 1 to 32 for BLAKE2s.Required.
- --key-format
- How the key is written.Default:
text.Any of the formats below. - --variant
- BLAKE2b or BLAKE2s.Default:
blake2b.blake2b · blake2s - --bits
- Output length in bits. Defaults to the largest (512 or 256).
- --output-format
- How the result is written.Default:
hex.Any of the formats below.
convertConvert data between text, hex, binary, octal, decimal bytes, Base32, Base36, Base45, Base58, Base62, Base64, Base85, Z85 and percent (URL) encoding.
- --input
- The data to convert.Required.
- --from
- How the input is written.Default:
text.Any of the formats below. - --to
- The format to write.Default:
hex.Any of the formats below.
punycodeEncode or decode Punycode (RFC 3492), for one label or a whole internationalized domain name.
- --input
- The label or domain.Required.
- --direction
- Encode or decode.Default:
encode.encode · decode - --domain, --no-domain
- Treat the input as a domain: each non-ASCII label becomes xn--.Default:
false.
argon2-hashHash a password with Argon2 (RFC 9106) and return the encoded hash string.
- --password
- The password.Required.
- --type
- The Argon2 variant.Default:
argon2id.argon2id · argon2i · argon2d - --memory
- Memory in KiB.Default:
19456. - --iterations
- Number of passes.Default:
2. - --parallelism
- Number of lanes.Default:
1. - --length
- Hash length in bytes.Default:
32. - --salt
- The salt. Random 16 bytes when empty.
- --salt-format
- How the salt is written.Default:
text.Any of the formats below.
argon2-verifyCheck a password against an encoded Argon2 hash.
- --password
- The password.Required.
- --encoded
- The encoded hash, starting with $argon2.Required.
bcrypt-hashHash a password with bcrypt and a random salt.
- --password
- The password.Required.
- --cost
- Cost factor, 4 to 16.Default:
10.
bcrypt-verifyCheck a password against a bcrypt hash.
- --password
- The password.Required.
- --encoded
- The bcrypt hash, starting with $2.Required.
scryptDerive a key from a password with scrypt (RFC 7914).
- --password
- The password.Required.
- --salt
- The salt. Random 16 bytes when empty.
- --salt-format
- How the salt is written.Default:
text.Any of the formats below. - --n
- CPU and memory cost, a power of two.Default:
16384. - --r
- Block size.Default:
8. - --p
- Parallelism.Default:
1. - --length
- Key length in bytes.Default:
32.
pbkdf2Derive a key from a password with PBKDF2-HMAC (RFC 8018).
- --password
- The password.Required.
- --salt
- The salt. Random 16 bytes when empty.
- --salt-format
- How the salt is written.Default:
text.Any of the formats below. - --algorithm
- The hash function.Default:
sha256.sha256 · sha512 · sha384 · sha224 · sha512-256 · sha512-224 · sha3-256 · sha3-512 · sha3-384 · sha3-224 · keccak256 · keccak512 · keccak384 · keccak224 · blake2b512 · blake2b384 · blake2b256 · blake2b160 · blake2s256 · blake2s224 · blake2s160 · blake2s128 · ripemd160 · ripemd128 · ripemd256 · ripemd320 · sm3 · sha1 · md5 · md4 · md2 - --iterations
- Number of iterations.Default:
600000. - --length
- Key length in bytes.Default:
32.
aead-encryptEncrypt with AES-GCM, ChaCha20-Poly1305 or XChaCha20-Poly1305. Returns hex ciphertext, tag and nonce.
- --plaintext
- The data to encrypt.Required.
- --plaintext-format
- How the plaintext is written.Default:
text.Any of the formats below. - --key
- The key in hex: 16, 24 or 32 bytes for AES-GCM, 32 otherwise.Required.
- --algorithm
- The cipher.Default:
aes-gcm.aes-gcm · chacha20-poly1305 · xchacha20-poly1305 - --nonce
- The nonce in hex (12 bytes, 24 for XChaCha20). Random when empty. Never reuse a nonce with the same key.
- --aad
- Associated data, authenticated only.
- --aad-format
- How the associated data is written.Default:
text.Any of the formats below.
aead-decryptDecrypt and verify AES-GCM, ChaCha20-Poly1305 or XChaCha20-Poly1305. Fails without output if anything was changed.
- --ciphertext
- The ciphertext in hex.Required.
- --tag
- The 16-byte tag in hex.Required.
- --key
- The key in hex.Required.
- --nonce
- The nonce in hex.Required.
- --algorithm
- The cipher.Default:
aes-gcm.aes-gcm · chacha20-poly1305 · xchacha20-poly1305 - --aad
- Associated data used to encrypt.
- --aad-format
- How the associated data is written.Default:
text.Any of the formats below.
aesEncrypt or decrypt with AES in ECB, CBC, CTR, CFB, CFB8, OFB, CCM, PCBC, IGE or XTS mode. For AES-GCM use aead-encrypt.
- --input
- The data.Required.
- --input-format
- How the input is written.Default:
text.Any of the formats below. - --key
- The key in hex: 16, 24 or 32 bytes (XTS: 32, 48 or 64).Required.
- --mode
- The block cipher mode.Default:
cbc.ecb · cbc · ctr · cfb · cfb8 · ofb · ccm · pcbc · ige · xts - --direction
- Encrypt or decrypt.Default:
encrypt.encrypt · decrypt - --iv
- The IV, nonce (CCM) or tweak (XTS) in hex. Random when encrypting with none.
- --padding
- Padding for ECB, CBC, PCBC and IGE.Default:
pkcs7.pkcs7 · ansi · byte · zero · none - --aad
- Associated data (CCM only).
- --aad-format
- How the associated data is written.Default:
text.Any of the formats below. - --tag-size
- CCM tag size in bytes.Default:
16. - --output-format
- How the result is written.Default:
hex.Any of the formats below.
mlkemRun an ML-KEM (FIPS 203) key exchange: generate a key pair, encapsulate, decapsulate and compare the shared secrets.
- --level
- Security level: 512, 768 or 1024.Default:
768.
randomGenerate secure random bytes or a random string.
- --kind
- Bytes or a string of characters.Default:
bytes.bytes · string - --length
- Number of bytes or characters.Default:
32. - --format
- How random bytes are written.Default:
hex.Any of the formats below. - --lower, --no-lower
- Strings: use a-z.Default:
true. - --upper, --no-upper
- Strings: use A-Z.Default:
true. - --numeric, --no-numeric
- Strings: use 0-9.Default:
true. - --symbols, --no-symbols
- Strings: use punctuation.Default:
false.
uuidGenerate UUIDs (RFC 9562), versions 1, 3, 4, 5, 6 and 7.
- --version
- UUID version.Default:
4. - --count
- How many, 1 to 100.Default:
1. - --namespace
- Versions 3 and 5: dns, url, oid, x500 or a UUID.Default:
dns. - --name
- Versions 3 and 5: the name to hash.
totpCompute a time-based one-time password (RFC 6238) from a Base32 secret.
- --secret
- The shared secret in Base32.Required.
- --algorithm
- The hash function.Default:
sha1.sha1 · sha256 · sha512 - --digits
- Code length, 6 to 8.Default:
6. - --period
- Time step in seconds.Default:
30. - --time
- Unix time in seconds to compute the code for. Defaults to now.
hotpCompute counter-based one-time passwords (RFC 4226) from a Base32 secret: the code at a counter and the next few.
- --secret
- The shared secret in Base32.Required.
- --counter
- The first counter value.Default:
0. - --count
- How many codes, 1 to 20.Default:
5. - --algorithm
- The hash function.Default:
sha1.sha1 · sha256 · sha512 - --digits
- Code length, 6 to 8.Default:
6.
Formats: text · hex · HEX · binary · octal · decimal · base64 · base64-nopad · base64url · base64url-nopad · base32 · base32-lower · base32-nopad · base32-hex · base32-crockford · base32-z · base36 · base45 · base58 · base58-flickr · base58-ripple · base62 · base85 · z85 · percent · percent-component · percent-form
Source: github.com/bitanon/toolbox, BSD-3-Clause.