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

Refactor CLI handling #20

Open
5 tasks
steinerkelvin opened this issue Feb 5, 2024 · 2 comments
Open
5 tasks

Refactor CLI handling #20

steinerkelvin opened this issue Feb 5, 2024 · 2 comments

Comments

@steinerkelvin
Copy link
Contributor

steinerkelvin commented Feb 5, 2024

  • use make_custom_context in all CLI command functions, like in save
  • all output and input goes through the CustomCtx interface
  • all informative and error outputs go to stderr, such that that relevant output can be parsed (specially on JSON output mode)
  • disable colors and input on non-interactive shells/scripts/etc
  • JSON output option for all commands
@Bakobiibizo
Copy link
Contributor

Bakobiibizo commented Mar 25, 2024

I started working on error handling which is related to this but not exactly what the post requests. Let me know if I should make a separate issue.
Currently have

  • custom exception classes
  • added a logger sink to a file
    Planning to
  • add a default error to incorrect cli inputs that just displays the help menu you're currently on. Saves you from having to the type --help everytime to see the menu since the messaging is verbose in this application and its inconvenient to scroll up.

@steinerkelvin
Copy link
Contributor Author

@Bakobiibizo

I think the library should not be writing log files by default, but I appreciate it if this is a feature gated by an environment variable.

Open at least a PR draft, so I can view your changes already plz

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

No branches or pull requests

2 participants