CLI Templates for Python + Rust

Do you also write a lot of services that need a few CLI option (e.g. --config) and or little CLI tools from time to time? Want a base CLI + logging to stderr template to start from?

I always do, so I have Python and Rust base CLI code templtes shared on GitHub that I use all the time:

https://github.com/cooperlees/base_clis

I also have sample base GitHub Actions to steal so that you can keep your:

  • Code tested
  • Code formatted
  • Type Checked / compiled
    on commit.

Dependabot will also keep the depdendecies up to date on these templates, so you can rely on them using the latest hotness.

Steal them today and contribute back handy enhancements as you see fit!

Python

Click based, using base logging function with a logging format I love. Logging is usally info or debug.

Rust

clap based, logging with a more standard glog like logging output.

  • -vvv to make it useful logging

Related Posts

Book REVIEW: Linux Service Management Made Easy with systemd: Advanced techniques to effectively manage, control, and monitor Linux systems and services 1st Edition

Amazon Link Disclaimer: I get no royalites or anything here – Just had coworkers ask me about it So since I’m no systems guru and am now…

Stop IPv4 Point-To-Point Addressing your Networks

IPv4 addressing on links is no longer required to route IPv4. What you say?? Yes, you can stop IPv4 addressing your point to point links with Legacy…

NAT64: Using `jool` on Ubuntu 20.04

I found that jool has very good tutorials, but all the commands to get going are hidden in these large tutorials. Here are the steps I took…

Raspberry Pi Powered Fireplace

Mr Aijay Adams and I am back making my Fireplace Internet / Smart device controllable. Now, via a very sexy Web UI, when I’m heading back to…

nftables

Are you using the latest Linux kernel firewall?. Here are some notes I’ve saved that I use and forget all the time. I plan to add to…

RPM vs OPKG Cheat Sheet

Recently in the Terragraph project I work on we changed from RPM to OPKG to removes some dependencies (e.g. perl) and make our overall image size smaller….

Leave a Reply

Your email address will not be published. Required fields are marked *