承接 assegaiphp/console 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

assegaiphp/console

Composer 安装命令:

composer require assegaiphp/console

包简介

The Assegai CLI is a command-line interface tool that helps you to initialize, develop and maintain your Assegai applications.

README 文档

README

Assegai Logo

Latest release Tests PHP 8.4+ License Status active

Assegai Console

Requirements

  • PHP 8.4 (minimum)
  • Composer 2.x.x

Description

The Assegai Console is the framework CLI for:

  • creating new projects
  • serving apps locally
  • generating framework features
  • exporting API contracts and clients
  • working with queues, migrations, databases, and Web Components
  • upgrading existing workspaces across supported framework release lines

It also supports custom schematics so teams can teach assegai generate about their own company-specific features.

Contribution workflow

For commit and pull request conventions in this repo, see:

Installation

Install the Assegai Console globally using Composer:

$ composer global require assegaiphp/console

Then make sure Composer's global bin directory is on your PATH:

$ composer global config bin-dir --absolute

If the printed directory is not already on your PATH, add it in your shell profile. For example:

$ export PATH="$PATH:$(composer global config bin-dir --absolute)"

Refer to the official Composer documentation if your global Composer home is configured differently.

Usage

Get Started

To create a new Assegai project, run the following command:

$ assegai new my-app

This command will create a new Assegai project in the my-app directory.

The scaffold flow can also:

  • initialize git
  • configure a database
  • write sensitive config to config/secure.php
  • set up a starter users resource when ORM is enabled

Development

After creating a new project, you can start the development server to preview your application in the browser.

$ cd my-app

To start the development server, navigate to the project directory and run the following command:

$ assegai serve

Assegai Serve

OpenSwoole runtime

If you want to try the long-lived runtime path instead of the default PHP development server, install the OpenSwoole extension first and then run:

$ assegai serve --runtime=openswoole

You can also persist that choice in assegai.json:

{
  "development": {
    "server": {
      "runtime": "openswoole",
      "host": "127.0.0.1",
      "port": 9510,
      "openswoole": {
        "workerNum": 1,
        "taskWorkerNum": 0,
        "maxRequest": 0,
        "enableCoroutine": true,
        "hookFlags": "all"
      }
    }
  }
}

If the extension is not installed, the CLI now stops early with a direct setup message instead of falling into a runtime bootstrap failure.

The current OpenSwoole path is still experimental. It is intended for careful testing and advanced runtime work, not as a blanket replacement for the default php runtime in every project.

Upgrading existing projects

Use the update command to move an existing workspace onto the current supported framework line:

$ assegai update

The CLI now upgrades installed first-party packages more deliberately and is aware of the active framework release line.

Generating code

Use assegai generate (or assegai g) to scaffold framework artifacts:

$ assegai g resource users
$ assegai g component app --flat
$ assegai g page dashboard --path src/Admin

Useful options include:

  • --flat to generate directly into the target path instead of creating a name-based subdirectory
  • --path to place generated files at a source-relative path

Database-aware commands also support MySQL, MariaDB, PostgreSQL, SQLite, and MSSQL where applicable.

Custom schematics

You can extend the generator without forking the CLI.

The default local convention is:

schematics/<name>/
  schematic.json
  templates/

Start with a declarative starter:

assegai schematic:init loyalty-program

Or scaffold a PHP-backed starter when generation needs real logic:

assegai schematic:init customer-portal --php

Inspect what the CLI discovered:

assegai schematic:list

Run a custom schematic through the normal generate workflow:

assegai g loyalty-program rewards

For reusable team schematics, package manifests can be exposed through composer.json:

{
  "extra": {
    "assegai": {
      "schematics": [
        "resources/loyalty/schematic.json"
      ]
    }
  }
}

Learn more in the official documentation.

Stay in touch

License

Assegai Console is MIT Licensed

assegaiphp/console 适用场景与选型建议

assegaiphp/console 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 60 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 06 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 assegaiphp/console 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 assegaiphp/console 我们能提供哪些服务?
定制开发 / 二次开发

基于 assegaiphp/console 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 60
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 21
  • 依赖项目数: 0
  • 推荐数: 2

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-04