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.1.tar.gz (33.2 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.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nfctl-0.5.1.tar.gz
  • Upload date:
  • Size: 33.2 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.1.tar.gz
Algorithm Hash digest
SHA256 b86d279dd2d8265f0f9489d56f6b33815c64c20eb4f10a0ca4f48acfd360bf11
MD5 13a0ae6304938c5093fcdd8f06c1da0c
BLAKE2b-256 549109551d0e70e47d0f5922378f388c694c6acf10dfc10252aaf23c556e1b73

See more details on using hashes here.

Provenance

The following attestation bundles were made for nfctl-0.5.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: nfctl-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f359c7b0e1ff07c557138bcc1bb19df5d550a879a53a9e875868fb9641b794b1
MD5 e2b8e242c6ed5b958a12ff6b0d6e8af4
BLAKE2b-256 837c4c87793b7356eb96e62d2f374dd5c99a6093081f39dedac68f989258b7a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nfctl-0.5.1-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