https://github.com/axelhahn/ht-manager
Cli editor for management of htpasswd and htgrpup files
https://github.com/axelhahn/ht-manager
cli foss gplv3 htaccess htpasswd htpasswd-editor opemsource php
Last synced: 2 months ago
JSON representation
Cli editor for management of htpasswd and htgrpup files
- Host: GitHub
- URL: https://github.com/axelhahn/ht-manager
- Owner: axelhahn
- Created: 2025-07-27T22:44:45.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-03-06T21:47:32.000Z (4 months ago)
- Last Synced: 2026-05-01T12:53:00.115Z (2 months ago)
- Topics: cli, foss, gplv3, htaccess, htpasswd, htpasswd-editor, opemsource, php
- Language: PHP
- Homepage:
- Size: 911 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Ht-manager
Ht-manager is an interactive cli tool to simplify management of htpasswd and htgroup files.
This tool is written in PHP 8 and uses the classes of
*
*
---
๐ค Author: Axel Hahn \
๐งพ Source: https://github.com/axelhahn/ht-manager/ \
๐ License: GNU GPL 3.0
## Screenshot

## For PHP developers: Use php script
You can use the php script directly if you have a php interpreter installed.
Just run `php src/htman.php`.
BUT: You cannot move the script around - it includes a few files from vendor directory.
## Use merged php script or binary
The sources can be compiled into a single file.
* a single php script and
* a binary using SPC
Check the releases page to get the merged script or pre compiled file.
Copy the php script or binary to `/usr/bin` or `~/bin/` to start it witout path.
Or compile it yourself. See the next chapter.
## Compile
`src/htman.php`can be compiled into a standalone binary with the delivered scripts by using SPC (check out ). This was tested on Linux.
A compiled binary is a single binary without dependencies. You can put onto a machine of the same architecture. On your targets no PHP is needed.
### Requirements
Linux packages
* git
* wget
* elfpatch
### Compile
### Start once
Start `./compile/installer.php` to download the SPC binary and let it generate needed files and Micro sfx.
This compilation takes some minutes.
As long you dont't want to set another php version or include an additional php module you don't need to repeat this step.
### Compile binary
Run `./compile/build.php` to merge changes in `src/htman.php` into a newly generated binary. This is done within a second.
Output files on Linux:
```txt
Merged php file:
- ./built_packages/htman.php
Compiled binay:
- ./built_packages/htman
- ./built_packages/htman_linux_x86_64
- ./built_packages/htman_linux_x86_64__README.md
```
## Usage
Copy `built_packages/htman` into a bin directory eg `/usr/bin/` or `~/bin/` (or create a softlink) to start it without path on any system without PHP installed.
On Systems with PHP you can deploy `built_packages/htman.php` as single script. This is a merged php script that includes all needed files.
Start `htman` for interactive mode.
Start `htman -h` to see supported parameters.
```txt
php src/htman.php -h
_____________
_____/ A x e l s \_________________________________________________
_______ __
| | | |_ ______.--------.---.-.-----.---.-.-----.-----.----.
| | _|______| | _ | | _ | _ | -__| _|
|___|___|____| |__|__|__|___._|__|__|___._|___ |_____|__|
|_____| v0.5
๐ค Author: Axel Hahn
๐งพ Source: https://github.com/axelhahn/ht-manager/
๐ License: GNU GPL 3.0
HELP:
Manage htpasswd and htgroups
PARAMETERS:
-d
--debug (without value)
Debug mode.
Show debug messages on actions.
-f
--folder [value] (value required)
Folder name where to put .htpasswd an .htgroup
Set a folder where to handle the .htpasswd and .htgroup files.
If a value is given then it will be checked against regex /./i
-h
--help (without value)
Show help and exit
-v
--version (without value)
Show version and exit
```