{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Treasure Code","product_name":"Treasure Code","type":"markdown"},"seo":{"title":"tdx upgrade - CLI Upgrade | Treasure AI","description":"Upgrade tdx CLI to the latest or a specific version.","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]},"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"upgrade-commands","__idx":0},"children":["Upgrade Commands"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Upgrade tdx to the latest version. Detects your package manager (npm or bun) and runs the appropriate install command."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"usage","__idx":1},"children":["Usage"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"tdx upgrade [version] [options]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"arguments","__idx":2},"children":["Arguments"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Argument"},"children":["Argument"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[version]"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Target version to install (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0.28.0"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0.28.0"]},"). Defaults to latest."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"options","__idx":3},"children":["Options"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dry-run"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check for updates without installing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--next"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Upgrade to the next (pre-release) channel"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--method <pm>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Package manager to use (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bun"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pnpm"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["yarn"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":4},"children":["Examples"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Upgrade to latest stable version\ntdx upgrade\n\n# Upgrade to a specific version\ntdx upgrade 0.28.0\n\n# Check what would happen without installing\ntdx upgrade --dry-run\n\n# Upgrade to the pre-release channel\ntdx upgrade --next\n\n# Override the detected package manager\ntdx upgrade --method pnpm\n\n# Combine version and method\ntdx upgrade 0.28.0 --method bun\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"behavior","__idx":5},"children":["Behavior"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Checks the npm registry for the latest version"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Compares with the currently installed version"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If an update is available, runs the install command"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Reports success or failure"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a specific ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[version]"]}," is provided, the registry check and version comparison are skipped — the command installs the requested version directly."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--dry-run"]},", the command shows the version comparison and the install command that would be executed, without actually running it."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"package-manager-detection","__idx":6},"children":["Package Manager Detection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The command automatically detects whether tdx was installed via ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["npm"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["bun"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["pnpm"]},", or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["yarn"]}," and uses the corresponding package manager for the upgrade. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--method"]}," to override auto-detection."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"notes","__idx":7},"children":["Notes"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Not available for development versions (local builds from source)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--next"]}," flag overrides the release channel configured in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.config/tdx/tdx.json"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Leading ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v"]}," prefix is stripped from version arguments (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0.28.0"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0.28.0"]},")"]}]}]},"headings":[{"value":"Upgrade Commands","id":"upgrade-commands","depth":1},{"value":"Usage","id":"usage","depth":2},{"value":"Arguments","id":"arguments","depth":2},{"value":"Options","id":"options","depth":2},{"value":"Examples","id":"examples","depth":2},{"value":"Behavior","id":"behavior","depth":2},{"value":"Package Manager Detection","id":"package-manager-detection","depth":2},{"value":"Notes","id":"notes","depth":2}],"frontmatter":{"seo":{"title":"tdx upgrade - CLI Upgrade | Treasure AI","description":"Upgrade tdx CLI to the latest or a specific version."}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/treasure-code/commands/upgrade","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}