PHPackages                             axy/htpasswd-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. axy/htpasswd-cli

ActiveLibrary[CLI &amp; Console](/categories/cli)

axy/htpasswd-cli
================

Htpasswd CLI utility

0.1.1(10y ago)0311MITPHPPHP &gt;=5.4.0

Since Dec 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/axypro/htpasswd-cli)[ Packagist](https://packagist.org/packages/axy/htpasswd-cli)[ Docs](https://github.com/axypro/htpasswd-cli)[ RSS](/packages/axy-htpasswd-cli/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

axy\\htpasswd-cli
=================

[](#axyhtpasswd-cli)

- GitHub: [axypro/htpasswd-cli](https://github.com/axypro/htpasswd-cli)
- Composer: [axy/htpasswd-cli](https://packagist.org/packages/axy/htpasswd-cli)

[Documentation in Russian](https://github.com/axypro/htpasswd-cli/wiki).

PHP 5.4+

Library does not require any dependencies (except composer packages).

Provides console utility `axy-htpasswd` that is analogue of Apache `htpasswd` utility.

Install (via composer):

```
$ composer global require axy/htpasswd-cli

```

The utility is stored in the directory `.composer/vendor/bin`. If this directory has been added to `$PATH` you can use the utility from the command line:

```
$ axy-htpasswd -cb .password-file nick password

```

You can rename `axy-htpasswd` to `htpasswd` and use as usual.

### Algorithms

[](#algorithms)

`axy-password` supports all crypt algorithms of Apache 2.4 htpasswd:

- BCrypt
- MD5 (Apache version)
- SHA1
- CRYPT
- PLAIN TEXT

### Interface

[](#interface)

`axy-password` matches the interface of `htpasswd`:

```
Usage:
	axy-htpasswd [-cimBdpsDv] [-C cost] passwordfile username
	axy-htpasswd -b[cmBdpsDv] [-C cost] passwordfile username password

	axy-htpasswd -n[imBdps] [-C cost] username
	axy-htpasswd -nb[mBdps] [-C cost] username password
 -c  Create a new file. (no effect in the current version)
 -n  Don't update file; display results on stdout.
 -b  Use the password from the command line rather than prompting for it.
 -i  Read password from stdin without verification (for script usage).
 -m  Force MD5 encryption of the password (default).
 -B  Force bcrypt encryption of the password (very secure).
 -C  Set the computing time used for the bcrypt algorithm
     (higher is more secure but slower, default: 5, valid: 4 to 31).
 -d  Force CRYPT encryption of the password (8 chars max, insecure).
 -s  Force SHA encryption of the password (insecure).
 -p  Do not encrypt the password (plaintext, insecure).
 -D  Delete the specified user.
 -v  Verify password for the specified user.
On other systems than Windows and NetWare the '-p' flag will probably not work.
The SHA algorithm does not use a salt and is less secure than the MD5 algorithm.

```

Differs:

- The option `-c` has no effect. If the file exists then it will be changed. If not exist then will be created.
- Many errors of options combination are ignored.
- The option `-n` can be used together with `-D` and `-v`. It is analogue of an empty file, the user will not found.

### Program API

[](#program-api)

For program API (PHP) see [axypro/htpasswd](https://github.com/axypro/htpasswd).

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3863d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e5b3a2db8d5614167d4510019e3373dbba63c6aade58d38d23f3e7d2e63c3c4a?d=identicon)[axy](/maintainers/axy)

---

Top Contributors

[![vasa-c](https://avatars.githubusercontent.com/u/557081?v=4)](https://github.com/vasa-c "vasa-c (6 commits)")

---

Tags

htpasswd

### Embed Badge

![Health badge](/badges/axy-htpasswd-cli/health.svg)

```
[![Health](https://phpackages.com/badges/axy-htpasswd-cli/health.svg)](https://phpackages.com/packages/axy-htpasswd-cli)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

13045.3M6.3k](/packages/illuminate-console)[winbox/args

Windows command-line formatter

20718.9k21](/packages/winbox-args)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
