Skip to content

feat: add QR code generation tool#119

Merged
marinate305 merged 1 commit into
developfrom
feat/qr-generate-cli
Jul 16, 2026
Merged

feat: add QR code generation tool#119
marinate305 merged 1 commit into
developfrom
feat/qr-generate-cli

Conversation

@rocket-morgan

@rocket-morgan rocket-morgan commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add an MCP/CLI qr_generate tool that writes QR payloads to PNG files
  • Add optional terminal-friendly block QR output for logs and CLI use
  • Register the new tool in feature flags and tool schemas

Test Plan

  • uv run python -m pytest tests/test_cli.py::TestQrCommands tests/test_tools.py::TestToolRegistry -q
  • uv run python -m pytest tests/test_cli.py tests/test_tools.py -q

Note: uv run ruff check src tests currently fails on pre-existing lint issues outside this change.

Use: uv run aqua qr generate bc1q5gwctjuryd8550ddne92wmm2ku6tjsaj8fqrft --terminal
image

@andycreed0x
andycreed0x marked this pull request as draft July 11, 2026 17:14
@andycreed0x
andycreed0x marked this pull request as ready for review July 15, 2026 17:05

@coelhogonzalo coelhogonzalo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Posted a concern about the safety of creating files outside /.aqua/qr but I could be wrong.

Can we do something about the color inversion in the QR? This could be problematic for some scanners. https://www.reddit.com/r/computers/comments/1asy597/qr_codes_not_working_upon_changing_color/

Genuinely curious, just bringing it up for you to think about it. Not a major deal so you have my approval

Comment thread src/aqua/tools.py
@marinate305
marinate305 merged commit 1517659 into develop Jul 16, 2026
4 checks passed
@marinate305
marinate305 deleted the feat/qr-generate-cli branch July 16, 2026 03:08

@TomasCast TomasCast left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with comments

Comment thread src/aqua/tools.py
Comment thread src/aqua/tools.py
Comment on lines +1990 to +1991
qr_dir = output_dir or str(get_manager().storage.qr_dir)
path = generate_qr(data, qr_dir, filename=filename)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function does not have any type of restriction on data's length. It may generate data overflow errors or similars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants