Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

phalcon-devtools

> 开发工具
Open source

Phalcon Developer Tools

1.3K stars0 likes2 views
WebsiteGitHub

About

Phalcon Developer Tools

Phalcon Devtools

What's Phalcon?

Phalcon PHP is a web framework delivered as a C extension providing high performance and lower resource consumption.

What are Devtools?

This tools provide you useful scripts to generate code helping to develop faster and easy applications that use with Phalcon framework.

Requirements

  • PHP >= 7.2
  • Phalcon >= 4.0.0

Installing via Composer

Install composer in a common location or in your project:

bash
curl -s http://getcomposer.org/installer | php

Create the composer.json file as follows:

json
{
    "require-dev": {
        "phalcon/devtools": "~4.1"
    }
}

If you are still using Phalcon 3.4.x, create a composer.json with the following instead:

json
{
    "require-dev": {
        "phalcon/devtools": "^3.4"
    }
}

Run the composer installer:

bash
php composer.phar install

Build .phar

Install composer and box in a common location or in your project:

bash
curl -s http://getcomposer.org/installer | php
bin/composer install

Build phar file phalcon-devtools

bash
bin/box build -v
chmod +xr ./phalcon.phar
# Test it!
php ./phalcon.phar

Installation via Git

Phalcon Devtools can be installed by using Git.

Just clone the repo and checkout the current branch:

bash
cd ~
git clone https://github.com/phalcon/phalcon-devtools.git
cd phalcon-devtools

This method requires a little bit more of setup. Probably the best way would be to symlink the phalcon file to a directory in your PATH, so you can issue phalcon commands in each directory where a phalcon project resides.

bash
cd phalcon-devtools
composer install
ln -s $(pwd)/phalcon /usr/bin/phalcon
chmod ugo+x /usr/bin/phalcon

If you get a "phalcon: command not found" message while creating the symlink, make an alias.

bash
alias phalcon=/home/[USERNAME]/phalcon-devtools/phalcon

Usage

To get a list of available commands just execute following:

bash
phalcon commands help

This command should display something similar to:

…

Database adapter

Should add adapter parameter in your db config file (if you use not MySQL database).

For PostgreSQL it will be something like:

php
$config = [
  'host'     => 'localhost',
  'dbname'   => 'my_db_name',
  'username' => 'my_db_user',
  'password' => 'my_db_user_password',
  'adapter'  => 'Postgresql'
];

Configuration file

By creating config.json or any other configuration file called config in root project you can set options for all possible commands, for example:

json
{
  "migration" : {
    "migrations": "App/Migrations",
    "config": "App/Config/db.ini"
  },
  "controller" : {
    "namespace": "Phalcon\\Test",
    "directory": "App/Controllers",
    "base-class": "App\\MyAbstractController"
  }
}

And then you can use phalcon migration run or phalcon controller SomeClass and those commands will be executed with options from file. Arguments provided by developer from command line will overwrite existing one in a file.

License

Phalcon Developer Tools is open source software licensed under the New BSD License.

© Phalcon Framework Team and contributors

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptdevtoolshacktoberfestidephalcon

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具