Skip to main content

nf-server CLI — 面向生信工程师和 AI Agent 的命令行工具

Project description

nfctl

nf-server CLI — 面向生信工程师和 AI Agent 的命令行工具。

安装

pip install nfctl

配置

# 设置服务地址(默认 http://localhost:8000)
nfctl config set url http://nf-server:8000

# 或通过环境变量
export NFCTL_URL=http://nf-server:8000

命令

查询

nfctl overview                           # 系统概览
nfctl list [--status running] [-n 20]    # 工作流列表
nfctl list --all                         # 获取全部工作流(自动翻页)
nfctl list --sort created_at --sort-order asc  # 按创建时间升序
nfctl list --pipeline WGS --env prod     # 按 Pipeline / 环境过滤
nfctl list --project-sn P2026001         # 按 LIMS 项目编号过滤
nfctl list --query sample1               # 按 workflow_id / launch_dir 搜索
nfctl status <id>                        # 工作流详情
nfctl tasks <id> [--status failed]       # 子任务列表
nfctl tasks <id> --sort duration --sort-order desc  # 按耗时排序
nfctl task <id> <task_id>                # 子任务详情
nfctl log <id> [--grep ERROR]            # 日志查看
nfctl resources <id>                     # 资源统计

管理

nfctl submit <dir> --pipeline <name>                     # 投递工作流
nfctl submit <dir> --pipeline <name> --env prod          # 指定环境(test/gray/prod)
nfctl submit <dir> --pipeline <name> --project-sn P2026001  # 绑定 LIMS 项目编号
nfctl submit <dir> --pipeline <name> --dry-run           # 仅验证,不实际投递
nfctl resume <id>                                        # 恢复失败/取消的工作流
nfctl cancel <id> [--reason "原因"]                      # 取消运行中的流程
nfctl delete <id>                                        # 删除工作流

其他

nfctl pipeline list                      # Pipeline 配置
nfctl config set/show                    # 配置管理

AI Agent 使用

所有命令支持 --format json,输出标准信封格式:

nfctl -f json list
# {"ok": true, "data": {"total": 5, "items": [...]}}

使用 --jq 过滤 JSON 输出:

nfctl --jq '.data.items[].workflow_id' list
nfctl --jq '.data.items[] | select(.status=="failed")' list

安装 Agent Skills:

npx skills add huangzhibo/nfctl

开发

uv sync
uv run nfctl --help
uv run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nfctl-0.5.2.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nfctl-0.5.2-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file nfctl-0.5.2.tar.gz.

File metadata

  • Download URL: nfctl-0.5.2.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nfctl-0.5.2.tar.gz
Algorithm Hash digest
SHA256 deaa9a721f1a0f064fcebe4afdee01bbd383e3f9e787672265679bc28be2c99e
MD5 75db97480f52801ce5bb795dd70305c7
BLAKE2b-256 50aff1b06dc754a2a98903128eb492711136e040a950d494274d6b87fd3b304b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nfctl-0.5.2.tar.gz:

Publisher: publish.yml on huangzhibo/nfctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nfctl-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: nfctl-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nfctl-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 15c86444598ef60476cb79c6ded4779fd71a57b7b49d266bc7b73a6f27db0f1c
MD5 fb1df700cf2790e5714d3d5a07b6f2b0
BLAKE2b-256 96ec38c672a85e6a70855c74e7de157d3d396e88273b721bb12c109507a2ee80

See more details on using hashes here.

Provenance

The following attestation bundles were made for nfctl-0.5.2-py3-none-any.whl:

Publisher: publish.yml on huangzhibo/nfctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page