### Install TWG CLI Source: https://twgcli.com/api Installs the Teamwork Graph CLI using a curl command. ```bash curl -fsSL https://twg.dev/install | sh ``` -------------------------------- ### Example of concise Agent-friendly search Source: https://twgcli.com/api Demonstrates a search command with options for JSON output, automatic summary, and compact agent fields, piped to jq for specific field extraction. ```bash $ twg search "incident review" --limit 20 \ --output json \ --output-summary auto \ --agent-fields @compact \ | jq '.items[] | {title, url, app}' ``` -------------------------------- ### Example: Generating a sprint report Source: https://twgcli.com This example shows how an AI Agent can generate a sprint report using TWG CLI commands. ```bash // 1. Resolve "mobile sprint 14" $ twg resolve --query "mobile sprint 14" → atlassian:cloud/jira/sprint/14 // 2. Fetch issue and PR progress $ twg jira sprint --id 14 --output json $ twg bitbucket pull-requests --since 1w // 3. Integrate data $ twg context jira workitem MOBL-201 -o json | twg visualize --open ``` -------------------------------- ### Install TWG skills for Claude Code Source: https://twgcli.com/api Installs TWG skills for Claude Code, enabling it to use TWG CLI commands. ```bash # 安裝 TWG skills 給 Claude Code twg skills install --agent claude # 或一次裝給所有支援的 coding agent twg skills install --all-agents ``` -------------------------------- ### Explore TWG CLI commands Source: https://twgcli.com/api Displays help information for the TWG CLI. ```bash twg help ``` -------------------------------- ### Full JSON interface for a command Source: https://twgcli.com/api Returns the precise argument, option, and output schema, including recommendedAgentFields, output presets, and risk warnings. ```json { "type": "cmd", "id": "twg:search", "cmd": "twg search", "args": [{"name": "query", "req": true}], "opts": [ {"long": "--limit", "arg": ""}, {"long": "--app", "arg": ""}, ... ], "output": { "recommendedAgentFields": "@compact", "primaryCollection": "items" } } ``` -------------------------------- ### Fuzzy command search Source: https://twgcli.com/api Takes any keyword and returns a relevance-sorted list of commands, useful when only fragments are remembered. ```bash $ twg help sprint matches: - twg jira sprint - twg jira sprint workitems - twg confluence search --label sprint ``` -------------------------------- ### Top-level command map Source: https://twgcli.com/api Returns a concise YAML list of namespaces and their executable subcommands. '$' identifies leaf node commands within a namespace. ```yaml tree: $: [resolve, search, login, logout, help] jira: board: {} sprint: {} workitem: {} confluence: page: {} blog: {} space: {} ... ``` -------------------------------- ### Login to TWG CLI Source: https://twgcli.com/api Logs the user into the Teamwork Graph CLI. ```bash twg login ``` -------------------------------- ### LangGraph TWG ToolNode Source: https://twgcli.com/api Integrates the twg_run function into a ToolNode within LangGraph, enabling nodes in a state graph to query Atlassian work data using the TWG CLI. ```python from langgraph.prebuilt import ToolNode from langchain_core.tools import tool import subprocess, json @tool def twg_run(args: list[str]) -> dict: """Run a twg CLI command and return parsed JSON.""" raw = subprocess.check_output(["twg", *args, "-o", "json"]) return json.loads(raw) tools = ToolNode([twg_run]) ``` -------------------------------- ### CrewAI TWG Tool Source: https://twgcli.com/api Defines a CrewAI tool that wraps the twg CLI, allowing agents to call any twg command using natural language and receive structured JSON output. ```python from crewai.tools import tool import subprocess, json @tool("twg") def twg(cmd: str) -> dict: out = subprocess.check_output( ["twg", *cmd.split(), "-o", "json"] ) return json.loads(out) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.