{"id":25608239,"url":"https://github.com/dhondta/python-tinyscript","last_synced_at":"2025-04-05T07:02:46.482Z","repository":{"id":50649804,"uuid":"97124128","full_name":"dhondta/python-tinyscript","owner":"dhondta","description":"Devkit for quickly building CLI tools with Python","archived":false,"fork":false,"pushed_at":"2025-03-12T10:19:51.000Z","size":2328,"stargazers_count":55,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T06:07:19.715Z","etag":null,"topics":["cli","cli-toolkit","ctf-tools","development","devkit","programming","python","rad","tinyscript"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhondta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-13T13:12:50.000Z","updated_at":"2025-03-10T02:35:45.000Z","dependencies_parsed_at":"2023-02-08T08:02:26.207Z","dependency_job_id":"6172bde6-5d6c-41b9-aead-ad320b62e7fb","html_url":"https://github.com/dhondta/python-tinyscript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhondta%2Fpython-tinyscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhondta%2Fpython-tinyscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhondta%2Fpython-tinyscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhondta%2Fpython-tinyscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhondta","download_url":"https://codeload.github.com/dhondta/python-tinyscript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299831,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cli-toolkit","ctf-tools","development","devkit","programming","python","rad","tinyscript"],"created_at":"2025-02-21T20:19:50.525Z","updated_at":"2025-04-05T07:02:46.436Z","avatar_url":"https://github.com/dhondta.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/dhondta/python-tinyscript/raw/main/docs/pages/img/logo.png\"\u003e\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eTinyScript \u003ca href=\"https://twitter.com/intent/tweet?text=TinyScript%20-%20Devkit%20for%20quickly%20building%20CLI%20tools%20with%20Python.%0D%0APython%20library%20with%20many%20features%20for%20writing%20short,%20simple%20and%20nice-looking%20CLI%20tools.%0D%0Ahttps%3a%2f%2fgithub%2ecom%2fdhondta%2fpython-tinyscript%0D%0A\u0026hashtags=python,programming,devkit,console,cli,tools,ctftools\"\u003e\u003cimg src=\"https://img.shields.io/badge/Tweet--lightgrey?logo=twitter\u0026style=social\" alt=\"Tweet\" height=\"20\"/\u003e\u003c/a\u003e\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eMake a CLI tool with very few lines of code.\u003c/h3\u003e\n\n[![PyPi](https://img.shields.io/pypi/v/tinyscript.svg)](https://pypi.python.org/pypi/tinyscript/)\n[![Read The Docs](https://readthedocs.org/projects/python-tinyscript/badge/?version=latest)](https://python-tinyscript.readthedocs.io/en/latest/?badge=latest)\n[![Build Status](https://github.com/dhondta/python-tinyscript/actions/workflows/python-package.yml/badge.svg)](https://github.com/dhondta/python-tinyscript/actions/workflows/python-package.yml)\n[![Coverage Status](https://raw.githubusercontent.com/dhondta/python-tinyscript/main/docs/coverage.svg)](#)\n[![Python Versions](https://img.shields.io/pypi/pyversions/tinyscript.svg)](https://pypi.python.org/pypi/tinyscript/)\n[![Known Vulnerabilities](https://snyk.io/test/github/dhondta/python-tinyscript/badge.svg?targetFile=requirements.txt)](https://snyk.io/test/github/dhondta/python-tinyscript?targetFile=requirements.txt)\n[![License](https://img.shields.io/pypi/l/tinyscript.svg)](https://pypi.python.org/pypi/tinyscript/)\n\nThis library is aimed to provide useful features and helpers in order to shorten the number of required lines of code for writing simple and nice-looking command-line interface tools. It is based on `argparse` and is considered a **development kit**, on the contrary of popular **frameworks** like [`cement`](https://builtoncement.com/), [`click`](https://click.palletsprojects.com) or [`docopt`](http://docopt.org), as it is not aimed to reinvent the wheel in yet another paradigm.\n\n```sh\npip install tinyscript\n```\n\n## :bulb: Philosophy\n\nThis library is built with the DRY (*Don't Repeat Yourself*) and KISS (*Keep It Stupid Simple*) philosophies in mind ; the whole machinery of Tinyscript holds in its **star import** (`from tinyscript import *`) and its **initialization** (with the `initialize` function).\n\nIt is aimed to shorten required code by setting a few things while loaded:\n- a [*proxy* parser](https://python-tinyscript.readthedocs.io/en/latest/internals.html#proxy-parser) (coming from the star import) collects arguments definitions and formats help at initialization, preventing from rewriting the whole bunch of code needed to declare an [`ArgumentParser`](https://docs.python.org/3/library/argparse.html#example) (and define its epilog, and so forth)\n- a [main (colored) logger](https://python-tinyscript.readthedocs.io/en/latest/internals.html#pre-configured-colored-logger) is preconfigured and can be tuned through two constants so that we don't care for writing a bunch of code needed to configure logging\n- [preimports](https://python-tinyscript.readthedocs.io/en/latest/internals.html#pre-imports) (while a bit anti-Pythonic, we confess) of common libraries also reduces the quantity of code required\n- among these, some [modules are enhanced](https://python-tinyscript.readthedocs.io/en/latest/enhancements.html) with new functions and classes that are not natively foreseen\n\nLeveraging this allows to create very short scripts with **only the real code that matters**, reducing the code to be rewritten to create efficient, nice-looking and sophisticated CLI tools.\n\nNote that, while star imports should be avoided according to Python's style guide (see [PEP8](https://pep8.org/#imports)), it is deliberately extensively used and covering a huge scope in order to shorten code length. This \"anti-pattern\" pays off after creating a few tools, when we can realize it shortens parts of the code that are often repeated from a tool to another (e.g. for shaping tool's help message).\n\n## :sunglasses: Usage\n\nIt is designed to be as simple and straightforward to use as possible. In order to learn and use it, you only need your browser (for consulting the documentation), a text editor and a good Python Interpreter (e.g. [IDLE](https://docs.python.org/3/library/idle.html)) for using auto-completion or an IDE like [PyCharm](https://www.jetbrains.com/pycharm/) to get helpers suggested.\n\nThe point is that you will use:\n- [features](https://python-tinyscript.readthedocs.io/en/latest/utility.html), enabled by setting flags in the \"master\" function called `ìnitialize`\n- [helpers](https://python-tinyscript.readthedocs.io/en/latest/helpers.html), grouped under the \"master\" submodule called `ts`\n- [reporting](https://python-tinyscript.readthedocs.io/en/latest/reporting.html) objects from the global scope\n\nPlease see the [example tools](#example-tools) herebelow for examples of usage of features, helpers and reporting.\n\n## :fast_forward: Quick Start\n\n### Create from template\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/dhondta/python-tinyscript/main/docs/pages/demos/create.svg\"\u003e\u003c/p\u003e\n\n### Edit source\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/dhondta/python-tinyscript/main/docs/pages/demos/edit.svg\"\u003e\u003c/p\u003e\n\n### Run your tool\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/dhondta/python-tinyscript/main/docs/pages/demos/run.svg\"\u003e\u003c/p\u003e\n\n## :mag: Example tools\n\n### Security\n\n- [AppMemDumper](https://github.com/dhondta/AppmemDumper) (Windows forensics)\n- [Bots Scheduler](https://github.com/dhondta/bots-scheduler) (Web security services job scheduler)\n- [DroneSploit](https://github.com/dhondta/dronesploit) (startup script)\n- [Evil Pickle Creation Tool](https://gist.github.com/dhondta/0224d42a6f9dde00247ff8646f4e89aa) (Python evil pickle generation tool)\n- [Malicious Macro Tester](https://github.com/dhondta/malicious-macro-tester) (malicious VB macro detection)\n- [Paddinganograph](https://gist.github.com/dhondta/90a07d9d106775b0cd29bb51ffe15954) (base32/64 padding-based steganography)\n- [PDF Passwords Bruteforcer](https://gist.github.com/dhondta/efe84a92e4dfae3b6c14932c73ab2577) (bruteforce tool)\n- [Solitaire Cipher](https://gist.github.com/dhondta/1858f406fc55e5e5d440ff26432ad0a4) (encryption)\n- [StegoLSB](https://gist.github.com/dhondta/d2151c82dcd9a610a7380df1c6a0272c) (Least Significant Bit)\n- [StegoPIT](https://gist.github.com/dhondta/30abb35bb8ee86109d17437b11a1477a) (Pixel Indicator Technique)\n- [StegoPVD](https://gist.github.com/dhondta/feaf4f5fb3ed8d1eb7515abe8cde4880) (Pixel Value Differencing)\n- [STIX Report Generator](https://gist.github.com/dhondta/ca5fb748957b1ec6f13418ac41c94d5b)\n- [WLF (Word List Filter)](https://gist.github.com/dhondta/82a7919f8aafc1393c37c2d0f06b77e8)\n\n### Utils\n\n- [Audio Assembler](https://gist.github.com/dhondta/8b3c7d95b056cae3505df853a098fc4f)\n- [Documentation Text Masker](https://gist.github.com/dhondta/5cae9533240471eac155bd51593af2e0)\n- [Email Origin](https://gist.github.com/dhondta/9a8027062ff770b2aa5d8422ddd78b57)\n- [Loose Comparison Input Generator](https://gist.github.com/dhondta/8937374f087f708c608bcacac431969f) (PHP Type Juggling)\n- [PDF Preview Generator](https://gist.github.com/dhondta/f57dfde304905644ca5c43e48c249125)\n- [Recursive Compression](https://github.com/dhondta/recursive-compression)\n- [WebGrep](https://github.com/dhondta/webgrep) (Web text search)\n- [Zotero CLI](https://github.com/dhondta/zotero-cli)\n\n\n## :clap:  Supporters\n\n[![Stargazers repo roster for @dhondta/python-tinyscript](https://reporoster.com/stars/dark/dhondta/python-tinyscript)](https://github.com/dhondta/python-tinyscript/stargazers)\n\n[![Forkers repo roster for @dhondta/python-tinyscript](https://reporoster.com/forks/dark/dhondta/python-tinyscript)](https://github.com/dhondta/python-tinyscript/network/members)\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/badge/Back%20to%20top--lightgrey?style=social\" alt=\"Back to top\" height=\"20\"/\u003e\u003c/a\u003e\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhondta%2Fpython-tinyscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhondta%2Fpython-tinyscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhondta%2Fpython-tinyscript/lists"}