Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CLI #746

Open
3 tasks done
Rudxain opened this issue Nov 28, 2024 · 1 comment
Open
3 tasks done

feat: CLI #746

Rudxain opened this issue Nov 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Rudxain
Copy link
Member

Rudxain commented Nov 28, 2024

Describe the feature you want

What

Quoting the chat with minor edits:

I've been considering to develop "UAD-NG: CLI edition" (the name can be shortened to "UAD-CLI", as the legacy UAD didn't have a command-line interface).

Thanks to clap, this could be easy. I could even implement #184 while we're at it

I don't have time for this, but I wish to see it happen.

clap may conflict with iced, and the CLI is supposed to be "lite"

How

I thought a separate repo (on my account, and then later on the org) was a good idea, but @schbrns suggested that it might be better to take the mono-repo approach, as there's some internal code that can be shared between GUI and CLI (such as the handling of ADB commands, and the logic for different Android versions).

It's possible to convert to a mono-repo, there are 3 ways:

It seems workspaces are the most sensible option, as multi-crate would require us to have 3 crates (is this 100% true?):

  • core library
  • GUI importing core
  • CLI importing core

Why?

CLIs tend to be more accessible (#605) and reliable (#645) than GUIs. This would allow more potential users to use the app with minimal problems.

The CLI can be designed to be more similar to a typical package manager, which could make it more intuitive and safe (#642) to use than the GUI.

Also, the CLI wouldn't need as much logging as the GUI (shells write to a .*_history file), which would make it even more efficient.

why not TUI?

Because that's just a GUI made of text, it's a waste of time. CLI and GUI complement each other.

Drawbacks

If we do design it as a typical pack-man, we would need to somehow cache the list of installed packs from every connected device, as a command such as uad ls -i (list installed packs, rather than the pack-IDs in uad_lists.json) could take hundreds of milliseconds to sync.

Rather than caching to storage, a REPL might be a better choice, as the state of the session is always in memory.

etc...

We may have to revert #154

Acknowledgements

  • This issue is not a duplicate of an existing feature request.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
@Rudxain Rudxain added the enhancement New feature or request label Nov 28, 2024
@Rudxain
Copy link
Member Author

Rudxain commented Dec 2, 2024

I've just realized another benefit of the CLI. If the CLI and GUI are separate executables, then users could run it on Android itself!

Note

In theory, this is already possible for the GUI too:

I haven't tested either of those

This can happen in 3 ways:

Tip

There's also cross

However, it's not recommended to disable packs on the same device, as the user could permanently lock themselves out, requiring a factory-reset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant