Krakatau icon indicating copy to clipboard operation
Krakatau copied to clipboard

CLI

Open MartinThoma opened this issue 5 years ago • 7 comments

Currently, the scripts are harder to use than necessary. I think the situation would greatly improve by the following:

  1. Adding a setup.py
  2. Putting it on PyPI
  3. Moving most of the functions in the assemble.py, disassemble.py and decompile.py to Krakatau/cli so that one can access the code from the package.
  4. Creating a bin/krakatau CLI script which has assmble, disassemble, and decompile as subcommands

If you are interested in it, I could do it. This would add the dependency click (a commonly used CLI package) in the setup.py and in the bin/krakatau.

What do you think?

MartinThoma avatar Oct 02 '18 18:10 MartinThoma

In what ways would this make Krakatau easier to use?

Storyyeller avatar Oct 03 '18 01:10 Storyyeller

Improvements by adding a setup.py, uploading to PyPI and having a single command line tool called like the package:

  1. Discoverable via pip search
  2. Tool can be installed via pip install krakatau - no need to know where the sources are
  3. Functionality can be discovered by krakatau --help
  4. No matter in which directory I am, I can simply execute krakatau disassemble [foobar] - no need to know where on my machine krakatau is.

MartinThoma avatar Oct 03 '18 05:10 MartinThoma

This post was very helpful. Perhaps it's worth including it to readme.txt

unoexperto avatar Dec 08 '18 14:12 unoexperto

I'm currently rewriting Krakatau in Rust, so the PyPI stuff is no longer relevant. But if you have any suggestions on how to best distribute/install it, I'm all ears.

Storyyeller avatar May 16 '22 03:05 Storyyeller

@Storyyeller Robert, do you have repo with Rust-based version to share ?

unoexperto avatar Jul 20 '22 15:07 unoexperto

I haven't published the Rust version yet. I was planning to release an initial version for testing once the assembler was done.

Storyyeller avatar Jul 20 '22 15:07 Storyyeller

do you have repo with Rust-based version to share ?

FYI, the Rust version is now live (it is on the "v2" branch). This only includes the assembler and disassembler for now - I'm still trying to figure out what to do for the new decompiler.

Storyyeller avatar Apr 09 '23 22:04 Storyyeller