定制 refs/sputnik 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

refs/sputnik

最新稳定版本:0.1.0

Composer 安装命令:

composer require refs/sputnik

包简介

Modern PHP TaskRunner with class-based tasks, Nette DI, and template engine

README 文档

README

CI Latest Release Packagist License: MIT PHP

A PHP TaskRunner for project automation. Class-based tasks, context switching, environment-aware execution.

What it does

Sputnik runs tasks defined as PHP classes. Each task is a single class with attributes -- no YAML actions, no function dumps, no DSL. You write normal PHP, Sputnik handles discovery, CLI, contexts, and shell routing.

#[Task(name: 'deploy', description: 'Deploy the application', environment: 'container')]
final class DeployTask implements TaskInterface
{
    public function __invoke(TaskContext $ctx): TaskResult
    {
        $ctx->shell('rsync -avz ./dist/ {{ deployPath }}/');
        $ctx->shellRaw('php artisan migrate --force');

        return TaskResult::success();
    }
}
$ php sputnik.phar deploy

Sputnik 0.1.0 │ .sputnik.dist.neon │ prod

▸ deploy · Deploy the application

  > rsync -avz ./dist/ /var/www/app/
  > php artisan migrate --force
✓ Done (1.24s)

Install

PHAR (recommended)

curl -Lo sputnik.phar https://github.com/refsz/sputnik/releases/latest/download/sputnik.phar
chmod +x sputnik.phar
php sputnik.phar init

Verify the download:

curl -Lo sputnik.phar.sha256 https://github.com/refsz/sputnik/releases/latest/download/sputnik.phar.sha256
sha256sum -c sputnik.phar.sha256

For IDE autocompletion you can additionally install via Composer: composer require --dev refs/sputnik. See Installation for details.

Key concepts

Tasks are PHP classes with #[Task] attributes. Options, arguments, and shell execution are built in. Writing Tasks

Contexts let you define named configurations -- different variables, different behavior. Switch with one command, no code changes. Contexts

Templates render files like .env with {{ variable }} syntax. Re-rendered automatically on context switch. Templates

Environments route commands transparently between host and container. A task marked environment: 'container' is automatically wrapped with your Docker executor. Environments

Links

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固