question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CLI tools and distribution

See original GitHub issue

It’s time to reassess how our CLI tools are named and distributed.

  • At the moment, we compile separate binaries for all our CLI tools (mitmproxy, mitmweb, mitmdump, pathod and pathoc). For each command, we bundle a complete self-contained interpreter and all its dependencies. This significantly bloats our distribution.
  • We need more commands. I’m speccing out a separate command for managing and installing mitmproxy addons. I also think we have a “missing command” for processing flows and exiting, without starting a proxy. Conflating this use case with mitmdump has caused significant complexity and confusion.

All of this together has tipped us over to a point where a single-binary distribution makes sense. See previous discussion in #1526.

Proposal

I propose that we roll up all of our tools in a single command called mx, which is invoked as follows:

  • mx --flags - equivalent to current mitmproxy --flags. This command takes no arguments, so can be the top-level.
  • mx dump args - equivalent to mitmdump args. I think there’s an argument for renaming this - the analogy with tcpdump grows tenuous, and “dump” is not really the most apt description of what the tool does.
  • mx web args - equivalent to mitmweb args
  • mx pathod args - equivalent to pathod args
  • mx pathoc args - equivalent to pathoc args

In the next iteration, I would also like to add commands like:

  • mx addon args - Addon installation and management (mx addon install, mx addon list, etc.)
  • mx proc args - Command to process a set of flows and exit, used for conversion, client replay, etc. I’m not attached to the proc name here, so lets not argue about that one yet.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
madt1mcommented, May 15, 2018

We could follow the e.g. netcat approach here! Like, mitmproxy or mx (or similar) should both be valid.

A bit related to this, we could create an autocomplete file (for bash, zsh, fish etc.) that would help with commands & their args etc.

Good shot!

1reaction
cortesicommented, May 14, 2018

What about something like this as a shorter command that still relates more strongly to the brand?

mitm --flags
mitm dump args
mitm web args
mitm addon args
mitm proc args
Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line Tools for Developers | Toptal
Command line tools are a necessity for every developer. This article provides an overview of various CLI tools and explains why you should...
Read more >
How to - build and distribute a CLI Tool with Python - Medium
Navigate to https://test.pypi.org and create an account. Then create an API token so that you can upload the binaries for distribution. Make sure...
Read more >
My Favorite CLI Tools - Sebastian Witowski
26 CLI tools that I love. And one that is OK. ... It's better to learn how to use tools that come built-in...
Read more >
Set of CLI tools that are installed by default on most distributions
1 Answer 1 ... Anything that can reasonably called Unix or Unix-like has POSIX utilities. You can generally assume that the utilities are...
Read more >
CLI Tools for Confluent Platform
This tool manages Confluent Cloud and Confluent Platform, including RBAC, secrets, and the ability to deploy a single-node Confluent Platform instance as well ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found