Repository navigation
Add the bitanon command and MCP server - #3
Merged
Merged
Conversation
One Dart front end over the engine, built two ways: a native binary (dart compile exe) and a Node.js build for the `bitanon` npm package. `bitanon mcp` serves every tool over stdio. The tool list, flags, help and MCP schemas all come from lib/src/catalog.dart. CI runs both builds end to end; pushing a vX.Y.Z tag builds binaries for Linux, macOS and Windows, creates the GitHub release and publishes to npm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KmuCbtjZ699DghxV5a1A9S
Ship native binaries only: remove the Node.js host, the npm package and its release job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KmuCbtjZ699DghxV5a1A9S
install.sh (Linux, macOS) and install.ps1 (Windows) fetch the binary for the system from the latest GitHub release, check it against SHA256SUMS and install it. The README leads with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KmuCbtjZ699DghxV5a1A9S
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Dipu · project thread
Adds
bitanon, a native command-line tool, andbitanon mcp, an MCP server on stdio, both over the same engine as bitanon.dev/toolbox.How it fits together
lib/src/catalog.dartlists the 19 tools once (name, parameters, defaults, which parameter takes data from a file or stdin). CLI flags,--helpand the MCPinputSchemas all come from it.lib/src/cli.dartandlib/src/mcp.darttalk to a smallHostinterface;bin/bitanon.dartimplements it withdart:io, the tests with a fake.dart pub global activate --source git https://github.com/bitanon/toolbox.CLI behaviour
--file, or stdin. File and stdin bytes are read as is (bitanon hash < file.binmatchessha256sum), unless you set the format flag, which reads them as text.hashdefaults to SHA-256 instead of the web page's "all algorithms".--jsonprints the engine result. Exit codes: 0 ok, 1 failure or "no match" from the verify tools, 2 usage mistake.MCP
Negotiates protocol versions 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05. Tools carry read-only annotations; tool errors come back as
isErrorresults so the model can fix its input;structuredContentfrom 2025-06-18 on. It reads no files and makes no network requests.Release
Push a
vX.Y.Ztag that matchespubspec.yaml.release.ymlchecks the version, builds linux-x64/arm64, macos-arm64/x64 and windows-x64 binaries, runs the end-to-end checks on each, and creates the GitHub release withSHA256SUMSand the CHANGELOG section as notes.Testing
test/cli_test.dart: 31 tests (CLI, catalog, MCP protocol) with known answers from FIPS 180-4 and RFCs 1321, 4231, 4648 and 4226.tool/check_cli.mjs: runs the built binary end to end (argument, stdin, file, exit codes, MCP handshake and call). Passes locally; CI now runs it.check_js.mjsunchanged and passing.The second commit removes an npm build that the first one added (npm publishing was dropped mid-way). Squash-merging this PR, or letting me force-push one combined commit, keeps main clean.
Generated by Claude Code