New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@spaceflow/cli

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spaceflow/cli

Spaceflow CLI 工具

Source
npmnpm
Version
0.31.0
Version published
Weekly downloads
65
400%
Maintainers
1
Weekly downloads
 
Created
Source

@spaceflow/cli

npm version License: MIT

Spaceflow CLI 壳子入口,提供 spaceflow / space 命令。负责引导 .spaceflow/ 工作目录并启动 @spaceflow/core 运行时。

安装

pnpm add -D @spaceflow/cli

使用

# 使用 spaceflow 或 space 命令
spaceflow <command> [options]
space <command> [options]

工作原理

CLI 本身不包含任何命令实现,职责仅限于:

  • 读取 .spaceflow/package.json 确定依赖
  • 生成 .spaceflow/bin/index.js 入口文件
  • 通过 execSync 启动子进程执行 @spaceflow/coreexec() 函数

所有命令(内置 13 个 + 外部扩展)均由 @spaceflow/core 提供。

内置命令

命令说明
install安装扩展
uninstall卸载扩展
build构建扩展
dev开发模式运行
create创建新扩展
update更新扩展
list列出已安装扩展
clear清理缓存
runx / x执行扩展命令
schema生成配置 JSON Schema
commitAI 智能提交
setup初始化项目配置
mcp启动 MCP Server

扩展开发

# 创建命令型扩展
spaceflow create command my-extension

# 创建 MCP 服务扩展
spaceflow create mcp my-mcp

扩展结构

import { defineExtension } from "@spaceflow/core";

export default defineExtension({
  name: "my-extension",
  commands: [
    {
      name: "my-command",
      description: "My command description",
      run: async (args, options, ctx) => {
        ctx.output.info("Hello from my command!");
      },
    },
  ],
});

编辑器集成

通过配置文件中的 support 字段,spaceflow install 会自动将扩展关联到对应编辑器目录:

编辑器配置目录
Claude Code.claude/
Windsurf.windsurf/
Cursor.cursor/
OpenCode.opencode/

许可证

MIT

FAQs

Package last updated on 26 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts