PHPackages                             keenlysoft/keenly - 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. keenlysoft/keenly

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

keenlysoft/keenly
=================

A lightweight PHP framework for small web applications and command-line tools

2.5.0(4w ago)1356[2 PRs](https://github.com/keenlysoft/keenly/pulls)1Apache-2.0PHPPHP &gt;=7.4 &lt;9.0CI passing

Since Jul 23Pushed 3w agoCompare

[ Source](https://github.com/keenlysoft/keenly)[ Packagist](https://packagist.org/packages/keenlysoft/keenly)[ Docs](https://github.com/keenlysoft/keenly)[ RSS](/packages/keenlysoft-keenly/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (8)Versions (18)Used By (1)

Keenly
======

[](#keenly)

Keenly is a lightweight PHP framework for building small web applications and command-line tools. It provides routing, request helpers, session handling, Smarty-based views, a simple service container, model generation, and optional Swoole components.

The project is intentionally compact. It is suitable for developers who want to understand the framework internals, maintain an existing Keenly application, or contribute focused improvements without adopting a large application stack.

Features
--------

[](#features)

- HTTP routing with controller and action dispatch
- Request helpers for query parameters, form data, and raw request bodies
- Session handling with configurable file or Redis storage
- Smarty template rendering and cache configuration
- Model generation through the `keenly` command
- CLI controller invocation
- Simple dependency injection and singleton helpers
- Optional Redis and Swoole integrations
- Apache, Nginx, and IIS rewrite configuration examples

Requirements
------------

[](#requirements)

- PHP 7.4 or later, including PHP 8.x
- Composer
- `ext-mbstring` for request and route handling
- `ext-openssl` for the bundled encryption helpers
- A web server such as Nginx, Apache, or IIS for web applications

Optional extensions depend on the features you use:

- `ext-gd` for CAPTCHA image helpers
- Redis and the relevant PHP extension for Redis-backed sessions or caching
- Swoole for the optional process, table, and HTTP server components

PHP 7.4 remains supported for existing applications. New deployments should prefer a maintained PHP 8.x release.

Installation
------------

[](#installation)

Create a new Keenly application with Composer:

```
composer create-project keenlysoft/app keenly
cd keenly
```

The framework package can also be installed directly when maintaining an existing application:

```
composer require keenlysoft/keenly
```

Composer uses Packagist by default. Older Keenly documentation referenced a regional Composer mirror; that mirror is no longer required.

Quick Start
-----------

[](#quick-start)

Define routes in your application's `config/routes.php`:

```
