CLI Command Reference (qiongli)
This document outlines all "executable entry points" (pipx CLI / Python module / Bash scripts) mapping local calls and GitHub CI configurations for the qiongli package.
0) Command Name Conventions
qiongli: The main CLI (available after pipx/venv installation, or after shell bootstrap install).ql: short primary alias.research-skills,rsk, andrsw: legacy compatibility aliases, equivalent toqiongli.
The rest of this document will use qiongli as the example.
1) How Upstream Repositories are Resolved (Omitting --repo)
Many commands need to know "which GitHub repository to query/download releases from." The resolution order for qiongli upstream is as follows (highest to lowest priority):
- CLI Argument:
--repo <owner/repo|Git URL> - Environment Variable:
QIONGLI_REPO=<owner/repo|Git URL> - Legacy environment fallback:
RESEARCH_SKILLS_REPO=<owner/repo|Git URL> - Project Configuration File (searched upwards from the current directory or
--project-dir):qiongli.toml.qiongli.toml
- Package Default (inside the pipx installed package):
qiongli/project.toml(Injected by CI during publishing) - If running inside a
qionglirepository clone: Inferred from git remote (prioritizesupstream, thenorigin)
Supported repo formats:
owner/repohttps://github.com/owner/repo.git[email protected]:owner/repo.git
We highly recommend committing the upstream configuration to your project repository (useful for CI automation):
# qiongli.toml
[upstream]
repo = "owner/repo" # Or url = "https://github.com/owner/repo.git"2) qiongli (Installer & Updater CLI)
There are two distributions of this CLI:
- Python CLI: installed via
pip/pipx - Shell CLI: installed by
bootstrap_qiongli.shinto${QIONGLI_BIN_DIR:-${RESEARCH_SKILLS_BIN_DIR:-~/.local/bin}}by default
2.1 qiongli check (Check versions/Available updates)
Use Case:
- Outputs the CLI version, local repo version (if run from a clone), and installed versions across all 3 client directories.
- Optional: Queries the upstream latest release tag and determines if an upgrade is needed.
qiongli check [--repo <owner/repo|url>] [--json] [--strict-network]Key Flags:
--repo: Specify upstream (can be omitted, see "Upstream" section).--json: Output JSON only (useful for CI/Scripts).--strict-network: Return a failure code if upstream polling fails (defaults to warning and continuing).
JSON output includes the active installed subject and coverage for each target. Older managed installs that do not have a SUBJECT_MANIFEST.json or SUBJECT marker are reported as legacy core / complete.
Exit Codes:
0: No updates available / upstream check bypassed.1: Update available.2: Invalid argument.
2.2 qiongli install (Install bundled subject payload)
Use Case:
- Installs the subject payload bundled inside the PyPI package into global client skill directories.
- Defaults to
--subject core --coverage complete; use--subject economics,--subject political-economy, or--subject geoeconomicsfor full Qiongli plus the selected subject specialization.
qiongli install \
[--subject core|economics|accounting|business|finance|political-economy|geoeconomics|economics-accounting] \
[--coverage complete|focused] \
[--target codex|claude|gemini|antigravity|all] \
[--mode copy|link] \
[--project-dir <path>] \
[--overwrite] \
[--doctor] \
[--dry-run]Examples:
qiongli install --target all
qiongli install --subject economics --target all
qiongli install --subject accounting --target all
qiongli install --subject political-economy --target all
qiongli install --subject geoeconomics --target all
qiongli install --subject economics-accounting --target all
qiongli install --subject economics --coverage focused --target allSubject packages are specialized installs, not reduced-quality cuts. Default install is core/complete. --subject economics, --subject business, --subject finance, --subject political-economy, and --subject geoeconomics mean complete specialized installs, not reduced packages. --subject accounting means accounting/complete, full framework plus accounting specialization. Focused coverage selects the subject profile set and active effective skills for deliberate slim installs and Desktop/Web ZIPs. Current official subjects are core, economics, accounting, business, finance, political-economy, geoeconomics, and the named composite economics-accounting; political-economy and geoeconomics are independent subject choices, not a composite. Official composites are not arbitrary comma-separated stacking. Public Desktop ZIP subjects are core, economics, business, finance, political-economy, geoeconomics, and economics-accounting, with no standalone accounting Desktop ZIP in this phase. Switch subjects or coverage by rerunning install or upgrade with new flags.
2.3 qiongli upgrade (Download release & execute installers)
Use Case:
- Downloads the upstream release (defaults to latest tag
.tar.gz). - Extracts it and executes
scripts/install_qiongli.sh. - Defaults to refreshing global skill directories only; project assets are opt-in.
qiongli upgrade \
[--repo <owner/repo|url>] \
[--ref <tag-or-branch>] \
[--ref-type tag|branch] \
[--subject core|economics|accounting|business|finance|political-economy|geoeconomics|economics-accounting] \
[--coverage complete|focused] \
[--target codex|claude|gemini|antigravity|all] \
[--project-dir <path>] \
[--no-overwrite] \
[--doctor] \
[--dry-run]Notes:
--project-dirmatters when you also request project-facing surfaces, such as--parts project.- Default
upgradenow behaves as a global refresh. Useqiongli init --project-dir .for project bootstrap, orqiongli upgrade --parts project ...when you explicitly want project files rewritten. --subjectdefaults tocoreand--coveragedefaults tocomplete; use--subject economicsfor full Qiongli plus economics specialization,--subject accountingfor full Qiongli plus accounting specialization, or add--coverage focusedfor the slim selected package.- Example:
qiongli upgrade --subject accounting --target all. - After global install,
upgradecreates workflow discovery symlinks:~/.claude/commands/*.mdand~/.gemini/workflows/*.md→ enables direct/paper,/lit-review, etc. invocation. - Shell CLI uses the bundled bootstrap helper and does not require Python.
- The command exits with the error code returned by the underlying installer.
2.4 qiongli align (Quick Reference Guide)
Use Case: Prints an overview of "what pipx installed / paths modified by upgrades / common commands".
qiongli align [--repo <owner/repo|url>]2.5 qiongli init (Project Bootstrap)
Use Case: Creates project-local .env configuration in your project directory.
qiongli init [--project-dir <path>] [--target all|codex|claude|gemini] [--dry-run]Notes:
- Only creates project-facing assets (
.env). Does not touch global skill directories. - Safe to run multiple times; will not overwrite existing files unless
--overwriteis passed.
2.6 qiongli clean (Remove Stale Assets)
Use Case: Removes stale project-local assets left from older installations.
qiongli clean [--project-dir <path>] [--dry-run] [--globals]Flags:
--project-dir: Directory to clean (default: current dir). Removes.agent/workflows/,.agents/skills/qiongli-workflow/,CLAUDE.qiongli.md,.gemini/qiongli.md, and template-matchingCLAUDE.md.--globals: Also remove workflow discovery symlinks from~/.claude/commands/and~/.gemini/workflows/. Only removes symlinks that point toqiongli-workflow— user-created commands are preserved.--dry-run: Show what would be removed without deleting.
2.7 qiongli doctor (Environment Preflight)
Use Case: Runs orchestrator preflight checks (CLIs, API keys, MCP wiring).
qiongli doctor [--cwd <path>]2.8 qiongli customize (Create a custom subject overlay)
Use Case:
- Creates a local custom overlay scaffold for the Python/source checkout materialization workflow.
- Custom overlays affect generated output only and do not rewrite canonical source files.
- npm runtime installs use pre-generated payloads in this phase and do not materialize
--custom-diroverlays at install time.
qiongli customize --subject economics --name my-econ-lab --out ./qiongli-custom/econ-lab
python3 scripts/materialize_subject_package.py --subject economics --custom-dir ./qiongli-custom/econ-lab --source . --out /tmp/qiongli-workflowDeveloper subject-depth workflow: when adding or deepening a subject, update subjects/catalog.yaml, subject overlays, subject-specific registry and markdown, selected domain and venue profiles, subject eval fixtures, specialization audit expected terms, materializer tests, npm payload tests when the subject is installable through npm, and release validation if the subject has a Desktop/Web artifact.
3) Orchestrator CLI: python3 -m bridges.orchestrator
This is the execution entry point for "Parallel Fallbacks & Task-Run Contract Execution".
python3 -m bridges.orchestrator <mode> [args...]Available modes:
doctor: Environment Preflight Checksbashpython3 -m bridges.orchestrator doctor --cwd .parallel: 3-Agent Parallel Analysis + Synthesis (Auto-downgrades to dual/single if unavailable)bashpython3 -m bridges.orchestrator parallel \ --prompt "Analyze this study design" \ --cwd . \ --summarizer claude \ --profile-file standards/agent-profiles.example.json \ --profile defaulttask-run: Standard pipeline execution via Task ID (plan -> evidence -> draft -> review -> gates -> write to RESEARCH/)bashpython3 -m bridges.orchestrator task-run \ --task-id F3 \ --paper-type empirical \ --topic your-topic \ --cwd . \ --triadCommon parameters:
--domain <name>: inject a runtime domain profile (for exampleecon,cs,psychology) into the task packet and prompts--venue <name>/--context <text>--mcp-strict/--skills-strict--profile-file <path>+--profile <name>(along with--draft-profile/--review-profile/--triad-profile)--focus-output <path>(repeatable) +--output-budget <n>: narrow this run to a smaller active output set and defer the rest of the contract outputs explicitly--research-depth standard|deep+--max-rounds <n>: increase evidence-expansion pressure and enforce a deeper review/revision loop--only-target <id>(repeatable): for structured Stage-I tasksI4-I8, reload the existing artifact underRESEARCH/[topic]/code/and rerun only the named actionable targets--skip-validation: disable strict MCP/skill availability checks and skip the artifact validator gate for fast iteration; the run will emit an explicit warning and markvalidator_gate.skipped=true--update-academic-context: for supported stage-close tasks (A5,B6,C5,D3,E5,F6,H4), appendcontext/research_state.mdandcontext/decision_log.mdto this run's active outputs and inject stage-specific academic continuity guidance into the draft prompt- Built-in profiles now include
focused-deliveryanddeep-researchin addition todefault,rapid-draft, andstrict-review
Example: reduce artifact sprawl but keep stronger review pressure
bashpython3 -m bridges.orchestrator task-run \ --task-id F3 \ --paper-type empirical \ --topic your-topic \ --cwd . \ --focus-output manuscript/manuscript.md \ --research-depth deep \ --draft-profile deep-research \ --review-profile strict-review \ --triad-profile deep-research \ --triad \ --max-rounds 4Example: rerun only a blocked Stage-I planning step
bashpython3 -m bridges.orchestrator task-run \ --task-id I6 \ --paper-type methods \ --topic llm-bias \ --cwd . \ --only-target S1Example: force a stage-close run to refresh project-level academic continuity artifacts
bashpython3 -m bridges.orchestrator task-run \ --task-id F6 \ --paper-type empirical \ --topic your-topic \ --cwd . \ --update-academic-contexttask-plan: Renders the dependency execution order based on the contractbashpython3 -m bridges.orchestrator task-plan --task-id F3 --paper-type empirical --topic your-topic --cwd .code-build: Academic code workflow entry pointbashpython3 -m bridges.orchestrator code-build \ --method "Staggered DID" \ --topic policy-effects \ --domain econ \ --focus full \ --cwd .Key parameters:
--topic <slug>: when present,code-buildroutes into strict Stage-I workflow instead of the legacy prompt-only path--focus <name>: map intoI1/I2/I3/I4/I5/I6/I7/I8, or usefullforI5 -> I6 -> I7 -> I8--domain <name>: inject the matchingskills/domain-profiles/*.yaml--paper-type <type>: workflow paper type used by strict Stage-I routing--triad: add the third independent audit on the final strict review pass--paper <path-or-url>: optional paper reference carried into the task context--only-target <selector>(repeatable): targeted follow-up mode- single-stage focus: use bare target IDs such as
S1orP1-01 --focus full: useSTAGE_ID:TARGETselectors such asI5:decision-1orI8:P1-01
- single-stage focus: use bare target IDs such as
Example: run only the spec phase for an advanced CS method
bashpython3 -m bridges.orchestrator code-build \ --method "Transformer Fine-Tuning" \ --topic llm-bias \ --domain cs \ --tier advanced \ --focus code_specification \ --paper-type methods \ --cwd .Example: rerun only specific full-flow targets
bashpython3 -m bridges.orchestrator code-build \ --method "Transformer Fine-Tuning" \ --topic llm-bias \ --domain cs \ --focus full \ --only-target I5:decision-1 \ --only-target I8:P1-01 \ --cwd .single: Single-model execution (Quick debug/runs)bashpython3 -m bridges.orchestrator single --prompt "..." --cwd . --model codexchain: Iterative refinement (One builds, the other verifies)bashpython3 -m bridges.orchestrator chain --prompt "..." --cwd . --generator codexrole: Execution split by specialized rolesbashpython3 -m bridges.orchestrator role --cwd . --codex-task "..." --claude-task "..." --gemini-task "..."
4) Bash Scripts (Non-pipx)
4.1 Remote Bootstrap Installer: ./scripts/bootstrap_qiongli.sh
Use case:
- Install or refresh skills on machines without Python.
- Downloads a GitHub release/branch archive, extracts it, and then runs
scripts/install_qiongli.shfrom that archive.
./scripts/bootstrap_qiongli.sh \
--repo owner/repo \
--target all \
--project-dir /path/to/project \
--overwriteNotes:
- Requires
bashand eithercurlorwget, plustar. - Supports
--ref <tag-or-branch>with--ref-type tag|branch. - Installs shell CLI commands by default:
qiongli,ql,research-skills,rsk,rsw. - Use
--no-clito skip shell CLI installation, or--cli-dir <path>to choose the install location. - Remote bootstrap supports
--mode copyonly. --doctorauto-skips whenpython3is unavailable.
4.2 Installer Script: ./scripts/install_qiongli.sh
./scripts/install_qiongli.sh \
--target all \
--mode copy \
--project-dir /path/to/project \
--install-cli \
--overwrite \
--doctorNotes:
- This is the local-repository installer.
- The copy/link install path no longer requires Python.
- Add
--install-clito also install the shell CLI into${QIONGLI_BIN_DIR:-${RESEARCH_SKILLS_BIN_DIR:-~/.local/bin}}or--cli-dir <path>. --doctorrunspython3 -m bridges.orchestrator doctor --cwd <project>only whenpython3exists.
4.3 Release Automation: ./scripts/release_automation.sh
./scripts/release_automation.sh publish --version 0.1.0 --from-tag v0.1.0-beta.X
./scripts/release_automation.sh pre --tag v0.1.0-beta.X
./scripts/release_automation.sh post --tag v0.1.0-beta.X --create-releaseRecommended:
- use
publishas the only routine release entrypoint - use
pre/postonly for diagnostics or recovery - let
publishown commit, tag, push, branch CI wait, tag publish wait, GitHub Release, and acceptance receipt - stable releases publish from the matching
CHANGELOG.mdsection - beta / prerelease releases publish from
release/<tag>.md
Also executable individually:
./scripts/release_preflight.sh [--tag v0.1.0-beta.X] [--skip-smoke] [--maintainer-smoke] [--no-strict]
./scripts/release_postflight.sh --tag v0.1.0-beta.X [--skip-remote] [--skip-ci-status] [--wait-ci] [--create-release]4.4 Beta smoke tests: ./scripts/run_beta_smoke.sh
./scripts/run_beta_smoke.sh
./scripts/run_beta_smoke.sh --tier release
./scripts/run_beta_smoke.sh --tier maintainerThis smoke entrypoint supports two tiers:
release: built-in literature pipeline smoke +doctormaintainer: everything inrelease, plusparallelandtask-runprofile-path checks
Release preflight now uses the release tier by default. Use --maintainer-smoke in release tooling when you explicitly want the heavier maintainer checks.
4.5 Literature smoke: ./scripts/run_literature_smoke.sh
./scripts/run_literature_smoke.sh4.6 CI Default Upstream Injector: ./scripts/inject_project_toml.sh
Executed by GitHub actions during packaging to hardcode the repo slug into qiongli/project.toml.
bash scripts/inject_project_toml.sh
# Or override the repo slug dynamically during builds
QIONGLI_REPO_SLUG="other-owner/other-repo" bash scripts/inject_project_toml.sh5) Validators (Recommended before CI/Deployment)
python3 scripts/validate_research_standard.py --strict
python3 -m unittest tests.test_orchestrator_workflows -vProject Artifact Validator (run inside your actual project output directory):
python3 scripts/validate_project_artifacts.py \
--cwd /path/to/project \
--topic your-topic \
--task-id H1 \
--strict