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. [Framework](/categories/framework)
4. /
5. keenlysoft/keenly

ActiveLibrary[Framework](/categories/framework)

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

An efficient php framework keenly

2.3.6(7y ago)1346[1 PRs](https://github.com/keenlysoft/keenly/pulls)1Apache-2.0PHPPHP &gt;=7.0CI failing

Since Jul 23Pushed 6y agoCompare

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

READMEChangelog (10)Dependencies (4)Versions (15)Used By (1)

安装
==

[](#安装)

使用Composer来安装keenly框架

### composer源使用

[](#composer源使用)

`composer config  repo.packagist composer https://packagist.laravel-china.org`

### 创建项目

[](#创建项目)

`composer create-project keenlysoft/app keenly`

### nginx配置

[](#nginx配置)

```
server{
           listen 80;
           #access_log  /usr/local/keenly.log;
           #error_log /usr/local/nginx/logs/keenly_error.log;
           server_name  keenly.com;
           index index.html index.htm index.php;
           root /keenly/web;
           location / {
                try_files $uri $uri/ /index.php?$query_string;
           }
           location ~* ^/protected/views/.*\.(php|php5)$
           {
             deny all;
           }
           location ~ [^/]\.php(/|$)
           {
             try_files $uri =404;
             fastcgi_pass  unix:/dev/shm/php-cgi.sock;
             fastcgi_index index.php;
             include fastcgi.conf;
           }
           location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {
             add_header Cache-Control 'no-store';
           }
}

```

- 注意 fastcgi\_pass 请更换自己服务器环境正确地址；
- Web.config 写iis配置文件 service 2008

生成 model
--------

[](#生成-model)

在网站更目录使用

```
php keenly model #生成全部
php keenly model user #生成某一个
php keenly model -f user  #强制生成

```

cli模式运行
-------

[](#cli模式运行)

php keenly cli admin@index@index 参数1 参数2 说明：admin@index@index === 项目@控制类名称@方法 参数可选

redis 连接
--------

[](#redis-连接)

### config/database.php 配置设置

[](#configdatabasephp-配置设置)

```
'redis' =>[
           'driver'    => 'pconnect', //or connect redis attended mode
           'host'      => '127.0.0.1',
           'port'      => '6379',
           'password'  => '1234567',
           'selectDB'  => '0',  //默认数据库
           'timeout'   => '1',  //超时秒
           'rebinding' => '100' //重连机制
     ],

```

```
use keenly;
keenly::$box->redis->set();
// use() 设置数据库
redis::I()->use('0')->set();

```

分页
--

[](#分页)

```
/**
 *pagination()
 *参数1：总条数
 *参数2：当前页码
 *参数3：每页条数
 */
  $pag = new pagination($user->Count(), $page,2);
  $list = $user->limit($pag->limit)->offset($pag->offset)->all();
  $pag->page() //视图分页HTML
  //全部实例：
  $user = User::find()->where('id > 0');
        $pag = new pagination($user->Count(), $page,2);
        $list = $user->limit($pag->limit)->offset($pag->offset)->all();
        k::render('test',[
                'list'=>$list,
                'page'=>$pag->page()
        ]);
   //view页码
   {$page}

```

[路由配置](https://github.com/keenlysoft/keenly/blob/master/doc/routes.md "路由配置")
-----------------------------------------------------------------------------

[](#路由配置)

[视图使用](https://github.com/keenlysoft/keenly/blob/master/VIEW.md "视图使用")
-----------------------------------------------------------------------

[](#视图使用)

[数据库使用](https://github.com/keenlysoft/database "数据库使用")
-------------------------------------------------------

[](#数据库使用)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~14 days

Recently: every ~29 days

Total

13

Last Release

2678d ago

Major Versions

0.2.6 → 1.1.12018-07-30

1.1.1 → 2.02018-09-04

PHP version history (4 changes)0.2.5PHP &gt;=5.6.0

2.0PHP &gt;=7.1.0

2.3.4PHP &gt;=7.0.0

2.3.5PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebf036a2f870fd56c726461c5da15ef8e8769fd7edd6ea9ac278d5f53b98324c?d=identicon)[brain\_yang](/maintainers/brain_yang)

---

Top Contributors

[![keenlysoft](https://avatars.githubusercontent.com/u/38453834?v=4)](https://github.com/keenlysoft "keenlysoft (53 commits)")

---

Tags

php frameworkkeenlykeenly framework

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/keenlysoft-keenly/health.svg)

```
[![Health](https://phpackages.com/badges/keenlysoft-keenly/health.svg)](https://phpackages.com/packages/keenlysoft-keenly)
```

###  Alternatives

[phphleb/framework

Engine for Framework HLEB2

233318.7k12](/packages/phphleb-framework)[popphp/popphp

Pop PHP Framework, a lightweight, robust PHP framework

5713.5k9](/packages/popphp-popphp)[rougin/slytherin

A simple and extensible PHP micro-framework.

1113.1k4](/packages/rougin-slytherin)[zemit-cms/core

Build high-performance PHP applications faster with Phalcon Kit — a modular developer toolkit that extends the Phalcon framework.

138.2k1](/packages/zemit-cms-core)

PHPackages © 2026

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