SAHAJ - Open Source Software Installation Helper
Project description
SAHAJ
SAHAJ is an open-source CLI tool to install and manage open-source software easily.
Requirements
- Python 3.11+
- Git installed and available on
PATH - Docker (required for commands that start containers or use docker-compose)
- Recommended: a POSIX-like shell environment for running repo scripts (
bash/sh)
Installation
pip install SAHAJ
Quick notes
- Global CLI entrypoint:
sahaj - Default repo folder used by commands:
./sahaj-opensource(change with--into <dir>) - User config file (created by
register) is stored in the config directory (typically~/.sahaj/config.jsonon Unix). UseSAHAJ_CONFIG_DIRto override.
Commands
register
Interactive config wizard — creates config.json in your config dir (used by repo scripts and by pull copying).
sahaj register # interactive prompts; use --overwrite to replace existing config.json
pull (clone / update repo)
Clones the repo (if missing) or pulls updates from origin/main. Copies your global config.json into the cloned repo root (backups existing), and makes .sh files executable under scripts and services.
sahaj pull # clone into ./sahaj-opensource or pull updates if folder exists
sahaj pull --into my-folder # clone/pull into specified folder
sahaj clone # alias for `sahaj pull`
Behavior on existing folder:
- Attempts
git pull origin main. - If local changes block merge, you will be prompted to discard local changes (forced reset) or abort.
- After clone/pull, user config is copied to
<repo>/config.json(existing repo config is backed up). - Makes
.shexecutable under<repo>/scriptsand<repo>/services.
rundev (dev environment)
Run repository-provided scripts located under <repo>/scripts/*.sh. All commands default to the repo folder ./sahaj-opensource unless you pass --into.
start
Run the repo init-rundev script. Requires <repo>/config.json.
sahaj rundev start
sahaj rundev start --into path/to/repo
stop
Run the repo stop-rundev script. Optionally pass -a / --clean-volumes to remove volumes (passed as -a to the script).
sahaj rundev stop
sahaj rundev stop --into path/to/repo
sahaj rundev stop -a
If you omit -a the command prompts whether to clean volumes (recommended for fresh starts).
restart
Stop (with volumes cleaned) then start:
sahaj rundev restart
status
Runs status-rundev script (placeholder / implemented to invoke the repo status script):
sahaj rundev status
deploy (production / builder workflows)
All deploy scripts are expected under <repo>/scripts/*.sh. Commands require a repo with config.json in repo root for start/build/full operations.
full
Run combined build+deploy:
sahaj deploy full
sahaj deploy full --into path/to/repo
build
Run the build-images script:
sahaj deploy build
start
Run deploy-all (expects images built and config present):
sahaj deploy start
stop
Run stop-deployed. Optionally pass -a/--clean-volume to remove volumes (script gets -a):
sahaj deploy stop
sahaj deploy stop -a
reset
Run clean-built-images (removes built images). Use --dry-run to only show actions:
sahaj deploy reset # actually run with confirmation semantics of underlying script
sahaj deploy reset --dry-run
restart
Stop then start:
sahaj deploy restart
status
Placeholder (keeps status behavior for future implementation):
sahaj deploy status
quickstart
Quickstart is not implemented in this version:
sahaj quickstart
Basic info & docs
sahaj version
sahaj license
sahaj about
sahaj docs
sahaj list
Environment & config
- Global config created with
sahaj registeris copied into cloned repos bysahaj pull. - Override config dir with
SAHAJ_CONFIG_DIRif needed.
Troubleshooting
- If
gitis not onPATH,pull/update will fail — install Git first. - If
docker/docker-composeare required by your repo scripts, ensure Docker is installed and running. - On
git pullconflicts you can choose to discard local changes (forced reset) or abort to handle conflicts manually. - If a repository script is missing, commands will print
not foundand exit.
Exit codes
- The CLI prints descriptive messages on failures; many subcommands return non-zero via underlying scripts when appropriate. Check stdout/stderr for script failure details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sahaj-0.0.3.tar.gz.
File metadata
- Download URL: sahaj-0.0.3.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d39af61da6a215a856d04ed158f27960867935b03eb827f09928d13b4a64b8ee
|
|
| MD5 |
723daf2f16aa23833e9c24ca75e04d5a
|
|
| BLAKE2b-256 |
a7d55c9aae479e69325116625160e7c86a704ff5b132123392dfbf7b5129ddfe
|
File details
Details for the file sahaj-0.0.3-py3-none-any.whl.
File metadata
- Download URL: sahaj-0.0.3-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07def839e42cfb6261cda78eb1368dbc148e530275d1dc10622d135c8c13c751
|
|
| MD5 |
0781978a17a3a2aabfa9cb806bf39062
|
|
| BLAKE2b-256 |
99b4f1cd44c315dafe4c1f65bfce69bf83b788ae0154f2f533da0b201b68fafe
|