mirror of
https://github.com/zenlm/zen-code-docs.git
synced 2026-10-30 14:58:40 +00:00
27 lines
71 KiB
Plaintext
27 lines
71 KiB
Plaintext
3:I[4707,[],""]
|
||
6:I[36423,[],""]
|
||
8:I[78400,["3185","static/chunks/app/layout-38b548b4f4d27f80.js"],"FontLoader"]
|
||
4:["lang","en","d"]
|
||
5:["mdxPath","tools/shell","oc"]
|
||
0:["0y8u-WGJo2VFWAF7bkrdx",[[["",{"children":[["lang","en","d"],{"children":[["mdxPath","tools/shell","oc"],{"children":["__PAGE__?{\"lang\":\"en\",\"mdxPath\":[\"tools\",\"shell\"]}",{}]}]}]},"$undefined","$undefined",true],["",{"children":[["lang","en","d"],{"children":[["mdxPath","tools/shell","oc"],{"children":["__PAGE__",{},[["$L1","$L2",[["$","link","0",{"rel":"stylesheet","href":"/qwen-code-docs/_next/static/css/04d76539cc2c4ebd.css","precedence":"next","crossOrigin":"$undefined"}]]],null],null]},[null,["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children","$5","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,"$L7"],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/qwen-code-docs/_next/static/css/7fba7395046b8eaa.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$undefined",["$","style",null,{"children":":root {\n --nextra-primary-hue: 248deg;\n --nextra-primary-saturation: 74%;\n --nextra-primary-lightness: 45%;\n --nextra-bg: 250,250,250;\n --nextra-content-width: 90rem;\n}\n.dark {\n --nextra-primary-hue: 248deg;\n --nextra-primary-saturation: 74%;\n --nextra-primary-lightness: 55%;\n --nextra-bg: 17,17,17;\n}\n::selection {\n background: hsla(var(--nextra-primary-hue),var(--nextra-primary-saturation),var(--nextra-primary-lightness),.3);\n}\nhtml {\n background: rgb(var(--nextra-bg));\n}"}],["$","meta",null,{"name":"theme-color","media":"(prefers-color-scheme: light)","content":"rgb(250,250,250)"}],["$","meta",null,{"name":"theme-color","media":"(prefers-color-scheme: dark)","content":"rgb(17,17,17)"}],"$undefined"]}],["$","body",null,{"children":[["$","$L8",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]]}]],null],null],["$L9",null]]]]
|
||
a:I[54108,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ThemeConfigProvider"]
|
||
b:I[16016,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"LastUpdated"]
|
||
c:I[30763,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"Search"]
|
||
d:I[25922,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ThemeProvider"]
|
||
e:I[94328,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"SkipNavLink"]
|
||
f:I[17691,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ConfigProvider"]
|
||
10:I[72972,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],""]
|
||
11:I[88212,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ClientNavbar"]
|
||
13:I[32594,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"LanguageDropdown"]
|
||
14:I[57191,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"MobileNav"]
|
||
15:I[18960,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"TOCProvider"]
|
||
16:"$Sreact.fragment"
|
||
17:I[57191,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"Sidebar"]
|
||
18:I[98270,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ClientWrapper"]
|
||
19:I[56099,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"HeadingAnchor"]
|
||
1a:I[98451,["5501","static/chunks/c16f53c3-b998f97655e65347.js","1105","static/chunks/1105-e07e82095c5c7b4a.js","5524","static/chunks/5524-d228bcaedae4ecb3.js","2770","static/chunks/2770-e894e62890be5e00.js","1084","static/chunks/app/%5Blang%5D/layout-11fe9b7075b678bf.js"],"ToggleWordWrapButton"]
|
||
12:T481,M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z7:["$","$La",null,{"value":{"children":"$undefined","darkMode":true,"docsRepositoryBase":"https://github.com/QwenLM/qwen-code/blob/main/docs","editLink":"Edit this page","feedback":{"content":"Question? Give us feedback","labels":"feedback"},"i18n":[{"locale":"en","name":"English"},{"locale":"zh","name":"中文"},{"locale":"de","name":"Deutsch"},{"locale":"fr","name":"Français"},{"locale":"ru","name":"Русский"},{"locale":"ja","name":"日本語"}],"lastUpdated":["$","$Lb",null,{}],"navigation":{"next":true,"prev":true},"search":["$","$Lc",null,{}],"sidebar":{"defaultMenuCollapseLevel":1,"defaultOpen":true,"toggleButton":true,"autoCollapse":true},"themeSwitch":{"dark":"Dark","light":"Light","system":"System"},"toc":{"backToTop":"Scroll to top","float":true,"title":"On This Page"}},"children":["$","$Ld",null,{"attribute":"class","defaultTheme":"light","disableTransitionOnChange":true,"storageKey":"theme","children":[["$","$Le",null,{}],"$undefined",["$","$Lf",null,{"pageMap":[{"data":{"index":{"title":"Welcome to Qwen Code Documentation"},"deployment":{"title":"Execution & Deployment"},"architecture":{"title":"Architecture Overview"},"cli":{"title":"CLI Usage Guide"},"core":{"title":"Core Details"},"tools":{"title":"Tools Collection"},"checkpointing":{"title":"Checkpointing Feature"},"extension":{"title":"Extension Development"},"ide-integration":{"title":"IDE Integration"},"telemetry":{"title":"Observability"},"examples":{"title":"Example Code"},"npm":{"title":"Package Management"},"gemini-ignore":{"title":"Ignore File Configuration"},"integration-tests":{"title":"Integration Tests"},"keyboard-shortcuts":{"title":"Keyboard Shortcuts"},"sandbox":{"title":"Sandbox Mechanism"},"issue-and-pr-automation":{"title":"Automation Handling"},"troubleshooting":{"title":"Troubleshooting"},"tos-privacy":{"title":"Terms of Service & Privacy"},"Uninstall":{"title":"Uninstall Guide"}}},{"name":"index","route":"/en","frontMatter":{"title":"Welcome to Qwen Code documentation","filePath":"content/en/index.md","timestamp":1789666354000},"title":"Welcome to Qwen Code Documentation"},{"name":"deployment","route":"/en/deployment","frontMatter":{"title":"Qwen Code Execution and Deployment","filePath":"content/en/deployment.md","timestamp":1789666354000},"title":"Execution & Deployment"},{"name":"architecture","route":"/en/architecture","frontMatter":{"title":"Qwen Code Architecture Overview","filePath":"content/en/architecture.md","timestamp":1789666354000},"title":"Architecture Overview"},{"name":"cli","route":"/en/cli","children":[{"data":{"index":{"title":"CLI Overview"},"commands":{"title":"Command Reference"},"configuration":{"title":"Configuration Guide"},"authentication":{"title":"Authentication Setup"},"openai-auth":{"title":"OpenAI Authentication"},"token-caching":{"title":"Token Caching"},"themes":{"title":"Theme Configuration"},"tutorials":{"title":"Usage Tutorials"}}},{"name":"index","route":"/en/cli","frontMatter":{"title":"Qwen Code CLI","filePath":"content/en/cli/index.md","timestamp":1789666354000},"title":"CLI Overview"},{"name":"commands","route":"/en/cli/commands","frontMatter":{"title":"CLI Commands","filePath":"content/en/cli/commands.md","timestamp":1789666354000},"title":"Command Reference"},{"name":"configuration","route":"/en/cli/configuration","frontMatter":{"title":"Qwen Code Configuration","filePath":"content/en/cli/configuration.md","timestamp":1789666354000},"title":"Configuration Guide"},{"name":"authentication","route":"/en/cli/authentication","frontMatter":{"title":"Authentication Setup","filePath":"content/en/cli/authentication.md","timestamp":1789666354000},"title":"Authentication Setup"},{"name":"openai-auth","route":"/en/cli/openai-auth","frontMatter":{"title":"OpenAI Authentication","filePath":"content/en/cli/openai-auth.md","timestamp":1789666354000},"title":"OpenAI Authentication"},{"name":"token-caching","route":"/en/cli/token-caching","frontMatter":{"title":"Token Caching and Cost Optimization","filePath":"content/en/cli/token-caching.md","timestamp":1789666354000},"title":"Token Caching"},{"name":"themes","route":"/en/cli/themes","frontMatter":{"title":"Themes","filePath":"content/en/cli/themes.md","timestamp":1789666354000},"title":"Theme Configuration"},{"name":"tutorials","route":"/en/cli/tutorials","frontMatter":{"title":"Tutorials","filePath":"content/en/cli/tutorials.md","timestamp":1789666354000},"title":"Usage Tutorials"},{"name":"welcome-back","route":"/en/cli/welcome-back","frontMatter":{"title":"Welcome Back Feature","filePath":"content/en/cli/welcome-back.md","timestamp":1789666354000},"title":"Welcome Back Feature"}],"title":"CLI Usage Guide"},{"name":"core","route":"/en/core","children":[{"data":{"index":{"title":"Core Overview"},"tools-api":{"title":"Tools API"},"memport":{"title":"Memory Import Processor"}}},{"name":"index","route":"/en/core","frontMatter":{"title":"Qwen Code Core","filePath":"content/en/core/index.md","timestamp":1789666354000},"title":"Core Overview"},{"name":"tools-api","route":"/en/core/tools-api","frontMatter":{"title":"Qwen Code Core: Tools API","filePath":"content/en/core/tools-api.md","timestamp":1789666354000},"title":"Tools API"},{"name":"memport","route":"/en/core/memport","frontMatter":{"title":"Memory Import Processor","filePath":"content/en/core/memport.md","timestamp":1789666354000},"title":"Memory Import Processor"}],"title":"Core Details"},{"name":"tools","route":"/en/tools","children":[{"data":{"index":{"title":"Tools Overview"},"file-system":{"title":"File System Tools"},"multi-file":{"title":"Multi-File Read Tools"},"shell":{"title":"Shell Tools"},"web-fetch":{"title":"Web Fetch Tools"},"web-search":{"title":"Web Search Tools"},"memory":{"title":"Memory Tools"},"todo-write":{"title":"Todo Write Tool"},"mcp-server":{"title":"MCP Server"}}},{"name":"index","route":"/en/tools","frontMatter":{"title":"Qwen Code tools","filePath":"content/en/tools/index.md","timestamp":1789666354000},"title":"Tools Overview"},{"name":"file-system","route":"/en/tools/file-system","frontMatter":{"title":"Qwen Code file system tools","filePath":"content/en/tools/file-system.md","timestamp":1789666354000},"title":"File System Tools"},{"name":"multi-file","route":"/en/tools/multi-file","frontMatter":{"title":"Multi File Read Tool (read_many_files)","filePath":"content/en/tools/multi-file.md","timestamp":1789666354000},"title":"Multi-File Read Tools"},{"name":"shell","route":"/en/tools/shell","frontMatter":{"title":"Shell Tool (run_shell_command)","filePath":"content/en/tools/shell.md","timestamp":1789666354000},"title":"Shell Tools"},{"name":"web-fetch","route":"/en/tools/web-fetch","frontMatter":{"title":"Web Fetch Tool (web_fetch)","filePath":"content/en/tools/web-fetch.md","timestamp":1789666354000},"title":"Web Fetch Tools"},{"name":"web-search","route":"/en/tools/web-search","frontMatter":{"title":"Web Search Tool (web_search)","filePath":"content/en/tools/web-search.md","timestamp":1789666354000},"title":"Web Search Tools"},{"name":"memory","route":"/en/tools/memory","frontMatter":{"title":"Memory Tool (save_memory)","filePath":"content/en/tools/memory.md","timestamp":1789666354000},"title":"Memory Tools"},{"name":"todo-write","route":"/en/tools/todo-write","frontMatter":{"title":"Todo Write Tool (todo_write)","filePath":"content/en/tools/todo-write.md","timestamp":1789666354000},"title":"Todo Write Tool"},{"name":"mcp-server","route":"/en/tools/mcp-server","frontMatter":{"title":"MCP servers with Qwen Code","filePath":"content/en/tools/mcp-server.md","timestamp":1789666354000},"title":"MCP Server"}],"title":"Tools Collection"},{"name":"checkpointing","route":"/en/checkpointing","frontMatter":{"title":"Checkpointing","filePath":"content/en/checkpointing.md","timestamp":1789666354000},"title":"Checkpointing Feature"},{"name":"extension","route":"/en/extension","frontMatter":{"title":"Qwen Code Extensions","filePath":"content/en/extension.md","timestamp":1789666354000},"title":"Extension Development"},{"name":"ide-integration","route":"/en/ide-integration","frontMatter":{"title":"IDE Integration","filePath":"content/en/ide-integration.md","timestamp":1789666354000},"title":"IDE Integration"},{"name":"telemetry","route":"/en/telemetry","frontMatter":{"title":"Qwen Code Observability Guide","filePath":"content/en/telemetry.md","timestamp":1789666354000},"title":"Observability"},{"name":"examples","route":"/en/examples","children":[{"data":{"proxy-script":{"title":"Proxy Script Example"}}},{"name":"proxy-script","route":"/en/examples/proxy-script","frontMatter":{"title":"Example Proxy Script","filePath":"content/en/examples/proxy-script.md","timestamp":1789666354000},"title":"Proxy Script Example"}],"title":"Example Code"},{"name":"npm","route":"/en/npm","frontMatter":{"title":"Package Overview","filePath":"content/en/npm.md","timestamp":1789666354000},"title":"Package Management"},{"name":"gemini-ignore","route":"/en/gemini-ignore","frontMatter":{"title":"Ignoring Files","filePath":"content/en/gemini-ignore.md","timestamp":1789666354000},"title":"Ignore File Configuration"},{"name":"integration-tests","route":"/en/integration-tests","frontMatter":{"title":"Integration Tests","filePath":"content/en/integration-tests.md","timestamp":1789666354000},"title":"Integration Tests"},{"name":"keyboard-shortcuts","route":"/en/keyboard-shortcuts","frontMatter":{"title":"Qwen Code Keyboard Shortcuts","filePath":"content/en/keyboard-shortcuts.md","timestamp":1789666354000},"title":"Keyboard Shortcuts"},{"name":"sandbox","route":"/en/sandbox","frontMatter":{"title":"Sandboxing in Qwen Code","filePath":"content/en/sandbox.md","timestamp":1789666354000},"title":"Sandbox Mechanism"},{"name":"issue-and-pr-automation","route":"/en/issue-and-pr-automation","frontMatter":{"title":"Automation and Triage Processes","filePath":"content/en/issue-and-pr-automation.md","timestamp":1789666354000},"title":"Automation Handling"},{"name":"troubleshooting","route":"/en/troubleshooting","frontMatter":{"title":"Troubleshooting guide","filePath":"content/en/troubleshooting.md","timestamp":1789666354000},"title":"Troubleshooting"},{"name":"tos-privacy","route":"/en/tos-privacy","frontMatter":{"title":"Qwen Code: Terms of Service and Privacy Notice","filePath":"content/en/tos-privacy.md","timestamp":1789666354000},"title":"Terms of Service & Privacy"},{"name":"Uninstall","route":"/en/Uninstall","frontMatter":{"title":"Uninstalling the CLI","filePath":"content/en/Uninstall.md","timestamp":1789666354000},"title":"Uninstall Guide"},{"name":"subagents","route":"/en/subagents","frontMatter":{"title":"Subagents","filePath":"content/en/subagents.md","timestamp":1789666354000},"title":"Subagents"}],"navbar":["$","header",null,{"className":"nextra-navbar x:sticky x:top-0 x:z-30 x:w-full x:bg-transparent x:print:hidden x:max-md:[.nextra-banner:not([class$=hidden])~&]:top-(--nextra-banner-height)","children":[["$","div",null,{"className":"nextra-navbar-blur x:absolute x:-z-1 x:size-full nextra-border x:border-b x:backdrop-blur-md x:bg-nextra-bg/70"}],["$","nav",null,{"style":{"height":"var(--nextra-navbar-height)"},"className":"x:mx-auto x:flex x:max-w-(--nextra-content-width) x:items-center x:gap-4 x:pl-[max(env(safe-area-inset-left),1.5rem)] x:pr-[max(env(safe-area-inset-right),1.5rem)] x:justify-end","children":[["$","$L10",null,{"href":"/","className":"x:flex x:items-center x:me-auto x:transition-opacity x:focus-visible:nextra-focus x:hover:opacity-75","aria-label":"Home page","children":["$","span",null,{"className":"ms-2 select-none font-extrabold flex items-center","title":"Qwen Code: AI Coding Agent","children":[["$","img",null,{"src":"https://assets.alicdn.com/g/qwenweb/qwen-webui-fe/0.0.191/static/favicon.png","alt":"Qwen Code","width":32,"height":32,"className":"inline-block align-middle mr-2 ","style":{"verticalAlign":"middle"}}],["$","span",null,{"className":"text-[1.3rem] font-normal align-middle mr-1 max-md:hidden","children":"Qwen"}],["$","span",null,{"className":"text-[1.3rem] font-normal align-middle max-md:hidden","children":"Code"}]]}]}],["$","$L11",null,{"className":"","children":[["$","a",null,{"href":"https://github.com/QwenLM/qwen-code","target":"_blank","rel":"noreferrer","children":[["$","svg",null,{"fill":"currentColor","viewBox":"3 3 18 18","height":"24","aria-label":"Project repository","children":["$","path",null,{"d":"$12"}]}],false],"className":"x:focus-visible:nextra-focus"}],"$undefined",["$","$L13",null,{"currentLang":"en"}]]}]]}]]}],"footer":null,"children":[["$","$L14",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]]}]]}]}]
|
||
2:["$","div",null,{"className":"x:mx-auto x:flex x:max-w-(--nextra-content-width)","sourceCode":"$undefined","children":["$","$L15",null,{"value":[{"value":"Description","id":"description","depth":2},{"value":"Arguments","id":"arguments","depth":3},{"value":[["$","$16",".0",{"children":["How to use ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," with Qwen Code"]}]],"id":"how-to-use-run_shell_command-with-qwen-code","depth":2},{"value":"Required Background Parameter","id":"required-background-parameter","depth":3},{"value":"Background vs Foreground Execution","id":"background-vs-foreground-execution","depth":3},{"value":"Execution Information","id":"execution-information","depth":3},{"value":[["$","$16",".0",{"children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," examples"]}]],"id":"run_shell_command-examples","depth":2},{"value":"Important notes","id":"important-notes","depth":2},{"value":"Environment Variables","id":"environment-variables","depth":2},{"value":"Command Restrictions","id":"command-restrictions","depth":2},{"value":"Command Restriction Examples","id":"command-restriction-examples","depth":3},{"value":[["$","$16",".0",{"children":["Security Note for ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"excludeTools"}]]}]],"id":"security-note-for-excludetools","depth":2}],"children":[["$","$L17",null,{}],["$","$L18",null,{"metadata":{"title":"Shell Tool (run_shell_command)","filePath":"content/en/tools/shell.md","timestamp":1789666354000},"bottomContent":"$undefined","children":[["$","div",null,{"id":"nextra-skip-nav"}],["$","main",null,{"data-pagefind-body":true,"children":[["$","h1",null,{"id":"$undefined","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-bold x:mt-2 x:text-4xl","children":[["Shell Tool (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}],")"],"$undefined"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["This document describes the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," tool for Qwen Code."]}],"\n",["$","h2",null,{"id":"description","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border","children":["Description",["$","$L19",null,{"id":"description"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["Use ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," to interact with the underlying system, run scripts, or perform command-line operations. ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," executes a given shell command. On Windows, the command will be executed with ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"cmd.exe /c"}],". On other platforms, the command will be executed with ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"bash -c"}],"."]}],"\n",["$","h3",null,{"id":"arguments","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl","children":["Arguments",["$","$L19",null,{"id":"arguments"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," takes the following arguments:"]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"command"}]," (string, required): The exact shell command to execute."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"description"}]," (string, optional): A brief description of the command’s purpose, which will be shown to the user."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"directory"}]," (string, optional): The directory (relative to the project root) in which to execute the command. If not provided, the command runs in the project root."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background"}]," (boolean, required): Whether to run the command in background. This parameter is required to ensure explicit decision-making about command execution mode. Set to true for long-running processes like development servers, watchers, or daemons that should continue running without blocking further commands. Set to false for one-time commands that should complete before proceeding."]}],"\n"]}],"\n",["$","h2",null,{"id":"how-to-use-run_shell_command-with-qwen-code","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border","children":[["How to use ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," with Qwen Code"],["$","$L19",null,{"id":"how-to-use-run_shell_command-with-qwen-code"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["When using ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}],", the command is executed as a subprocess. You can control whether commands run in background or foreground using the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background"}]," parameter, or by explicitly adding ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"&"}]," to commands. The tool returns detailed information about the execution, including:"]}],"\n",["$","h3",null,{"id":"required-background-parameter","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl","children":["Required Background Parameter",["$","$L19",null,{"id":"required-background-parameter"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["The ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background"}]," parameter is ",["$","strong",null,{"children":"required"}]," for all command executions. This design ensures that the LLM (and users) must explicitly decide whether each command should run in the background or foreground, promoting intentional and predictable command execution behavior. By making this parameter mandatory, we avoid unintended fallback to foreground execution, which could block subsequent operations when dealing with long-running processes."]}],"\n",["$","h3",null,{"id":"background-vs-foreground-execution","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl","children":["Background vs Foreground Execution",["$","$L19",null,{"id":"background-vs-foreground-execution"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"The tool intelligently handles background and foreground execution based on your explicit choice:"}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["Use background execution (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background: true"}],") for:"]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":["Long-running development servers: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm run start"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm run dev"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"yarn dev"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["Build watchers: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm run watch"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"webpack --watch"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["Database servers: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"mongod"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"mysql"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"redis-server"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["Web servers: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"python -m http.server"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"php -S localhost:8000"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":"Any command expected to run indefinitely until manually stopped"}],"\n"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":["Use foreground execution (",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background: false"}],") for:"]}]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":["One-time commands: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"ls"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"cat"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"grep"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["Build commands: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm run build"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"make"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["Installation commands: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm install"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"pip install"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["Git operations: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git commit"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git push"}]]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":["Test runs: ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm test"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"pytest"}]]}],"\n"]}],"\n",["$","h3",null,{"id":"execution-information","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl","children":["Execution Information",["$","$L19",null,{"id":"execution-information"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"The tool returns detailed information about the execution, including:"}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Command"}],": The command that was executed."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Directory"}],": The directory where the command was run."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Stdout"}],": Output from the standard output stream."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Stderr"}],": Output from the standard error stream."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Error"}],": Any error message reported by the subprocess."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Exit Code"}],": The exit code of the command."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Signal"}],": The signal number if the command was terminated by a signal."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Background PIDs"}],": A list of PIDs for any background processes started."]}],"\n"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"Usage:"}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"run_shell_command(command"}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"="}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"\"Your commands.\""}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" description=\"Your description of the command.\","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" directory=\"Your execution directory.\","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" is_background="}],["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":"false"}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":")"}]]}]}]]}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":[["$","strong",null,{"children":"Note:"}]," The ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background"}]," parameter is required and must be explicitly specified for every command execution."]}],"\n",["$","h2",null,{"id":"run_shell_command-examples","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border","children":[[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," examples"],["$","$L19",null,{"id":"run_shell_command-examples"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"List files in the current directory:"}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"run_shell_command(command"}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"="}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"\"ls -la\""}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" is_background="}],["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":"false"}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":")"}]]}]}]]}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"Run a script in a specific directory:"}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"run_shell_command(command"}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"="}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"\"./my_script.sh\""}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" directory=\"scripts\","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" description=\"Run my custom script\","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" is_background="}],["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":"false"}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":")"}]]}]}]]}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"Start a background development server (recommended approach):"}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"run_shell_command(command"}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"="}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"\"npm run dev\""}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" description=\"Start development server in background\","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" is_background="}],["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":"true"}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":")"}]]}]}]]}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"Start a background server (alternative with explicit &):"}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"run_shell_command(command"}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"="}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"\"npm run dev &\""}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" description=\"Start development server in background\","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" is_background="}],["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":"false"}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":")"}]]}]}]]}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"Run a build command in foreground:"}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"run_shell_command(command"}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"="}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"\"npm run build\""}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" description=\"Build the project\","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" is_background="}],["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":"false"}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":")"}]]}]}]]}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"Start multiple background services:"}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"run_shell_command(command"}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"="}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":"\"docker-compose up\""}],["$","span",null,{"style":{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},"children":","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" description=\"Start all services\","}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":" is_background="}],["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":"true"}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":")"}]]}]}]]}]]}],"\n",["$","h2",null,{"id":"important-notes","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border","children":["Important notes",["$","$L19",null,{"id":"important-notes"}]]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"Security:"}]," Be cautious when executing commands, especially those constructed from user input, to prevent security vulnerabilities."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"Interactive commands:"}]," Avoid commands that require interactive user input, as this can cause the tool to hang. Use non-interactive flags if available (e.g., ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm init -y"}],")."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"Error handling:"}]," Check the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Stderr"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Error"}],", and ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Exit Code"}]," fields to determine if a command executed successfully."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"Background processes:"}]," When ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background=true"}]," or when a command contains ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"&"}],", the tool will return immediately and the process will continue to run in the background. The ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"Background PIDs"}]," field will contain the process ID of the background process."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"Background execution choices:"}]," The ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background"}]," parameter is required and provides explicit control over execution mode. You can also add ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"&"}]," to the command for manual background execution, but the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background"}]," parameter must still be specified. The parameter provides clearer intent and automatically handles the background execution setup."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"Command descriptions:"}]," When using ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"is_background=true"}],", the command description will include a ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"[background]"}]," indicator to clearly show the execution mode."]}],"\n"]}],"\n",["$","h2",null,{"id":"environment-variables","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border","children":["Environment Variables",["$","$L19",null,{"id":"environment-variables"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["When ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," executes a command, it sets the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"QWEN_CODE=1"}]," environment variable in the subprocess’s environment. This allows scripts or tools to detect if they are being run from within the CLI."]}],"\n",["$","h2",null,{"id":"command-restrictions","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border","children":["Command Restrictions",["$","$L19",null,{"id":"command-restrictions"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["You can restrict the commands that can be executed by the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," tool by using the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"coreTools"}]," and ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"excludeTools"}]," settings in your configuration file."]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"coreTools"}],": To restrict ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," to a specific set of commands, add entries to the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"coreTools"}]," list in the format ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command(<command>)"}],". For example, ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"\"coreTools\": [\"run_shell_command(git)\"]"}]," will only allow ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git"}]," commands. Including the generic ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," acts as a wildcard, allowing any command not explicitly blocked."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"excludeTools"}],": To block specific commands, add entries to the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"excludeTools"}]," list in the format ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command(<command>)"}],". For example, ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"\"excludeTools\": [\"run_shell_command(rm)\"]"}]," will block ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"rm"}]," commands."]}],"\n"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":"The validation logic is designed to be secure and flexible:"}],"\n",["$","ol",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-decimal x:ms-6","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"Command Chaining Disabled"}],": The tool automatically splits commands chained with ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"&&"}],", ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"||"}],", or ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":";"}]," and validates each part separately. If any part of the chain is disallowed, the entire command is blocked."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"Prefix Matching"}],": The tool uses prefix matching. For example, if you allow ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git"}],", you can run ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git status"}]," or ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git log"}],"."]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","strong",null,{"children":"Blocklist Precedence"}],": The ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"excludeTools"}]," list is always checked first. If a command matches a blocked prefix, it will be denied, even if it also matches an allowed prefix in ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"coreTools"}],"."]}],"\n"]}],"\n",["$","h3",null,{"id":"command-restriction-examples","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-8 x:text-2xl","children":["Command Restriction Examples",["$","$L19",null,{"id":"command-restriction-examples"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":"Allow only specific command prefixes"}]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["To allow only ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git"}]," and ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm"}]," commands, and block all others:"]}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":[["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"{"}]}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":" \"coreTools\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":": ["}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"run_shell_command(git)\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":", "}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"run_shell_command(npm)\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"]"}]]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"}"}]}]]}]]}]]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git status"}],": Allowed"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm install"}],": Allowed"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"ls -l"}],": Blocked"]}],"\n"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":"Block specific command prefixes"}]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["To block ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"rm"}]," and allow all other commands:"]}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":[["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"{"}]}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":" \"coreTools\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":": ["}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"run_shell_command\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"],"}]]}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":" \"excludeTools\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":": ["}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"run_shell_command(rm)\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"]"}]]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"}"}]}]]}]]}]]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"rm -rf /"}],": Blocked"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git status"}],": Allowed"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"npm install"}],": Allowed"]}],"\n"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":"Blocklist takes precedence"}]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["If a command prefix is in both ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"coreTools"}]," and ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"excludeTools"}],", it will be blocked."]}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":[["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"{"}]}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":" \"coreTools\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":": ["}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"run_shell_command(git)\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"],"}]]}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":" \"excludeTools\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":": ["}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"run_shell_command(git push)\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"]"}]]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"}"}]}]]}]]}]]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git push origin main"}],": Blocked"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"git status"}],": Allowed"]}],"\n"]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["$","strong",null,{"children":"Block all shell commands"}]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["To block all shell commands, add the ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," wildcard to ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"excludeTools"}],":"]}],"\n",["$","div",null,{"data-pagefind-ignore":"all","className":"nextra-code x:relative x:not-first:mt-[1.25em]","children":["$undefined",["$","pre",null,{"className":"x:group x:focus-visible:nextra-focus x:overflow-x-auto x:subpixel-antialiased x:text-[.9em] x:bg-white x:dark:bg-black x:py-4 x:ring-1 x:ring-inset x:ring-gray-300 x:dark:ring-neutral-700 x:contrast-more:ring-gray-900 x:contrast-more:dark:ring-gray-50 x:contrast-more:contrast-150 x:rounded-md not-prose","tabIndex":"0","children":[["$","div",null,{"className":"x:group-hover:opacity-100 x:group-focus:opacity-100 x:opacity-0 x:transition x:focus-within:opacity-100 x:flex x:gap-1 x:absolute x:right-4 x:top-2","children":[["$","$L1a",null,{"children":["$","svg",null,{"viewBox":"0 0 24 24","fill":"currentColor","height":"1em","children":["$","path",null,{"d":"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}]}]}],false]}],["$","code",null,{"className":"nextra-code","dir":"ltr","children":[["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"{"}]}],"\n",["$","span",null,{"children":[["$","span",null,{"style":{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},"children":" \"excludeTools\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":": ["}],["$","span",null,{"style":{"--shiki-light":"#032F62","--shiki-dark":"#9ECBFF"},"children":"\"run_shell_command\""}],["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"]"}]]}],"\n",["$","span",null,{"children":["$","span",null,{"style":{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},"children":"}"}]}]]}]]}]]}],"\n",["$","ul",null,{"className":"x:[:is(ol,ul)_&]:my-[.75em] x:not-first:mt-[1.25em] x:list-disc x:ms-[1.5em]","children":["\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"ls -l"}],": Blocked"]}],"\n",["$","li",null,{"className":"x:my-[.5em]","children":[["$","code",null,{"className":"nextra-code","dir":"ltr","children":"any other command"}],": Blocked"]}],"\n"]}],"\n",["$","h2",null,{"id":"security-note-for-excludetools","className":"x:tracking-tight x:text-slate-900 x:dark:text-slate-100 x:font-semibold x:target:animate-[fade-in_1.5s] x:mt-10 x:border-b x:pb-1 x:text-3xl nextra-border","children":[["Security Note for ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"excludeTools"}]],["$","$L19",null,{"id":"security-note-for-excludetools"}]]}],"\n",["$","p",null,{"className":"x:not-first:mt-[1.25em] x:leading-7","children":["Command-specific restrictions in ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"excludeTools"}]," for ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"run_shell_command"}]," are based on simple string matching and can be easily bypassed. This feature is ",["$","strong",null,{"children":"not a security mechanism"}]," and should not be relied upon to safely execute untrusted code. It is recommended to use ",["$","code",null,{"className":"nextra-code","dir":"ltr","children":"coreTools"}]," to explicitly select commands\nthat can be executed."]}]]}]]}]]}]}]
|
||
9:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Shell Tool (run_shell_command) | "}],["$","meta","3",{"name":"description","content":"x"}],["$","meta","4",{"name":"msapplication-TileColor","content":"#fff"}],["$","meta","5",{"name":"apple-mobile-web-app-capable","content":"yes"}],["$","meta","6",{"name":"apple-mobile-web-app-title","content":"Qwen Code"}],["$","meta","7",{"name":"apple-mobile-web-app-status-bar-style","content":"default"}],["$","meta","8",{"property":"og:title","content":"Shell Tool (run_shell_command) | "}],["$","meta","9",{"property":"og:description","content":"x"}],["$","meta","10",{"property":"og:image","content":"https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg"}],["$","meta","11",{"name":"twitter:card","content":"summary"}],["$","meta","12",{"name":"twitter:site","content":"@qwenLLM"}],["$","meta","13",{"name":"twitter:title","content":"Shell Tool (run_shell_command) | "}],["$","meta","14",{"name":"twitter:description","content":"x"}],["$","meta","15",{"name":"twitter:image","content":"https://assets.vercel.com/image/upload/v1572282926/swr/twitter-card.jpg"}]]
|
||
1:null
|