Sa

Sane: pure Python, single file command runner

Hacker News

Sane: pure Python, single file command runner

Hello HN, I just published v7 of `sane`, a single-file command runner written completely in vanilla Python. Quoting from sane's manual page: > # Why use sane? > Sane is 1. extremely portable, and 2. low (mental) overhead. This is because (1.) sane is fully contained in a single Python file, so you can (and should!) distribute it alongside your codebase, and (2.) sane is vanilla Python. The second property makes sane extremely expressive -- in fact, sane can do anything Python can -- and prevents the introduction of more domain-specific languages. > Of course, with great power comes great responsibility, and sane is trivially Turing complete; that is, after all, the point. Therefore, there are more (and more unpredictable) ways to fail critically. But, as Python has shown over the years, this flexibility is not much of a problem in practice, especially when compared to the advantages it brings, and given that other, more structured, tools are still available to be used in tandem. Sane is pretty magic; calling "import sane" is enough to get started. This does come with its caveats, but this magic can optionally be disabled. Sane is also prepared to make use of concurrency (within the limits of Python): its topological sort algorithm identifies tasks that can be run in parallel, which can be activated with a Make-like "--jobs" flag. Another focus point of sane is ergonomics: just about everything the user (as in, you) passes to sane is validated, and reflection is used to try to identify exactly the source of error and provide the user with specific and helpful feedback (and even an explicit solution, where possible). Here, Rust was very much an influence. I'd submitted a previous version of sane to Show HN before, but v7 is a complete re-write, down to the documentation. I don't expect sane to replace Make or other bigger scale or specialised build solutions, but I do think it can be a good option for small-scale projects or prototypes, and everything that can benefit from portability.

Share card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: started, para · Missing: supports, reddit linkedin, podcasting
91%91% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: user, single, tasks · Missing: mac, agents, macos
84%84% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
62%62% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way, para · Missing: mobile apps, ios, personal
41%41% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
40%40% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
12%12% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

Sa
Sane, a single file, super flexible, Python command runner51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sane, a single file, super flexible, Python command runner

Hacker News5
Ek
Ekam – The Command Runner for the Challengers50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Ekam – The Command Runner for the Challengers

Hacker News1
Pu
Pure Python SHA1 and MD4 Implementations60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pure Python SHA1 and MD4 Implementations

Hacker News2
A
A pure Python implemention of Apache Thrift48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A pure Python implemention of Apache Thrift

Hacker News64
rf
rfilerunner: a simple command runner60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

rfilerunner: a simple command runner

Hacker News3
Reflex Cloud
Reflex Cloud72%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Build web apps in pure Python + deploy with a single command

Product Hunt+628Web App
Id
Idae, a Python script runner32%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Idae, a Python script runner

Hacker News1
Di
Disable Python assertions per file/module33%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Disable Python assertions per file/module

Hacker News3
I
I made a simple, sequential task runner (in Python)51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I made a simple, sequential task runner (in Python)

Hacker News1
Python Playground
Python Playground51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Python Online Code Runner

Indie Hackers1education