Skip to content

add ability to point to external builtin registry#19

Open
neerfri wants to merge 1 commit into
elixir-ai-tools:mainfrom
neerfri:allow-custom-builtin-registry
Open

add ability to point to external builtin registry#19
neerfri wants to merge 1 commit into
elixir-ai-tools:mainfrom
neerfri:allow-custom-builtin-registry

Conversation

@neerfri

@neerfri neerfri commented Mar 6, 2026

Copy link
Copy Markdown

Summary

This PR adds the ability to add a custom builtin registery

Changes

  • Add option to JushBash.new/1: custom_builtin_registery
  • The interface for methods inJustBash.Commands.Registry get's the JustBash instance as first argument.
  • Added the ability in JustBash.Interpreter.Executor.execute_builtin/4 to execute a function-defined builtins

Related Issues

Non.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Testing

Describe how this was tested:

  • Added new tests
  • All existing tests pass
  • Tested manually

Checklist

  • My code follows the style guidelines of this project
  • I have run mix format
  • I have run mix credo and addressed any issues
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • I have updated the documentation accordingly
  • I have updated the CHANGELOG.md (for non-trivial changes)

@neerfri neerfri changed the title add ability to point to external builtin registry via MFA add ability to point to external builtin registry Mar 6, 2026
@neerfri

neerfri commented Mar 11, 2026

Copy link
Copy Markdown
Author

Hi Team! Awesome project!
Any interest in this addition?

@davydog187 @ivarvong @cjbell

@ivarvong

Copy link
Copy Markdown
Collaborator

Hi @neerfri -- thanks so much for your interest in the project and this PR!

I just merged a PR that adds the capability via a commands list. I expect this will accomplish what you're after. Please give it a try and let me know! Docs: https://github.com/elixir-ai-tools/just_bash?tab=readme-ov-file#custom-commands

@neerfri

neerfri commented Mar 15, 2026

Copy link
Copy Markdown
Author

@ivarvong Thank you for your response.
The feature you added is a good step in the right direction.

The feature I'm missing from it is that a command must have a module that contains it's logic and name.
In my system these commands can be dynamic per sandbox (including the command's name), right now I cannot imagine how I should implement it with the new commands feature. It would help if we could implement additional pattern to register a command {Module, Opts}. This will allow to use a module that knows how to locate and execute the relevant logic and would allow the library to provide alias functionality without requiring the module to have stattic aliases hard-coded. (the Opts option will be passed to calls of Module.names and Module.execute)

Looking forward to your response

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.

2 participants