Hello everyone! I'm building a new thing and I need some advice on architecture.
I think I want to build a command architecture like git, whereby the base command is extensible with subsequent command modifiers.
To illustrate, there's a cool repo named git-extras wherein you can call (for example) $ git info and that, in turn, delegates to a separately packaged extra named git-info. This sort of extensibility in git is really nice. I think I want to make something like this, as opposed to a monolith.
My questions
Does anyone know, what is this type of command architecture called?
Do you know if there's rust a repository that uses this architecture that I could use as a rough guide?
That's how cargo works. It's not particularly complex, it just runs the executable cargo-<subcommand> (in ~/.cargo/bin/ or the PATH) when it encounters a subcommand that isn't in the list of built-in commands. You maybe want to start by looking at the function execute_external_subcommand().
That looks perfect for structure and scale to get me started. AND I'm sorta familiar with the project — well its products anyway — and I'm natively predisposed to dig into it.