How to Detect CodeBuddy Code and CodeBuddy IDE on Company Laptops
CodeBuddy is Tencent's AI coding assistant. It comes as a terminal agent (CodeBuddy Code, installed from npm) and as a desktop IDE, and both can answer to the command codebuddy. Here is how to tell them apart on each OS, a read-only check, and the settings worth a finding.
How to check if CodeBuddy is installed: for the CLI, look for the npm package @tencent-ai/codebuddy-code or a codebuddy-code command. For the IDE, look for /Applications/CodeBuddy.app on a Mac or %LOCALAPPDATA%\Programs\CodeBuddy and an uninstall entry named CodeBuddy on Windows. A codebuddy command alone can be either one.
What CodeBuddy is and why security teams care
CodeBuddy Code is a terminal agent that reads and edits code, runs commands and calls MCP servers with the logged-in user's permissions; CodeBuddy IDE is a desktop editor with the same assistant built in. Both are developed by Tencent and sign in to its service.
- Invisible CLI installs. The CLI is a global npm package that runs under
node; nothing lands in Programs and Features. - Bypass mode. CodeBuddy documents a
bypassPermissionspermission mode, selected with-y/--dangerously-skip-permissionsor set aspermissions.defaultModein~/.codebuddy/settings.json. - Project MCP servers. A repository's
.mcp.jsoncan declare MCP servers;enableAllProjectMcpServersapproves them all.
Where CodeBuddy leaves traces
| Signal | Windows | macOS | Linux |
|---|---|---|---|
| CLI npm package | @tencent-ai/codebuddy-code under %APPDATA%\npm\node_modules | Same package under npm root -g | Same as macOS |
| CLI commands | codebuddy-code, codebuddy and cbc (all from the npm package) | ||
| CLI process | node running @tencent-ai/codebuddy-code | ||
| IDE install | %LOCALAPPDATA%\Programs\CodeBuddy, uninstall entry CodeBuddy | /Applications/CodeBuddy.app | - |
| IDE user data | %APPDATA%\CodeBuddy | ~/Library/Application Support/CodeBuddy | - |
| Settings (CLI) | ~/.codebuddy/settings.json (user), .codebuddy/settings.json and .codebuddy/settings.local.json (project) | ||
| MCP servers (CLI) | ~/.codebuddy/.mcp.json (also the older ~/.codebuddy/mcp.json and ~/.codebuddy.json); .mcp.json in a project | ||
Trap: the npm package adds a codebuddy command, which is also the name of the IDE's launcher, and Homebrew's uninstall of the IDE removes ~/.codebuddy, so that folder is shared too. Kuntur reports the CLI only from codebuddy-code, the npm package or its node process, and the IDE only from its install folder, data folder, process path or uninstall entry. The Windows IDE folder follows the default for per-user Electron apps; the uninstall entry is the more reliable signal.
Check one machine
Both checks only read files and the process table. They send nothing over the network, change nothing, and print paths and labels only, never the contents of a settings or credentials file.
Windows (PowerShell)
# Read-only, no network. Run as the user (not SYSTEM). Prints paths only.
# 1. CodeBuddy Code (CLI): the npm package and its commands
Test-Path "$env:APPDATA\npm\node_modules\@tencent-ai\codebuddy-code"
Get-Command codebuddy-code, codebuddy, cbc -ErrorAction SilentlyContinue | Select-Object Source
# 2. CodeBuddy IDE: per-user install folder, user data and the uninstall entry
Test-Path "$env:LOCALAPPDATA\Programs\CodeBuddy"
Test-Path "$env:APPDATA\CodeBuddy"
Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' -ErrorAction SilentlyContinue |
Where-Object { $_.DisplayName -match '^CodeBuddy( |$)' } | Select-Object DisplayName, DisplayVersion
# 3. Running now? CLI under node, IDE from its install folder
Get-CimInstance Win32_Process |
Where-Object { $_.CommandLine -like '*@tencent-ai\codebuddy-code*' -or $_.ExecutablePath -like '*\Programs\CodeBuddy\*' } |
Select-Object ProcessId, Name, ExecutablePath
# 4. Settings and MCP files, and the settings worth a finding (labels only, no values)
$d = "$env:USERPROFILE\.codebuddy"
foreach ($f in "$d\settings.json", "$d\.mcp.json", "$d\mcp.json", "$env:USERPROFILE\.codebuddy.json") {
if (Test-Path $f) { $f }
}
$s = "$d\settings.json"
if (Test-Path $s) {
if (Select-String -Path $s -Pattern '"defaultMode"\s*:\s*"bypassPermissions"' -Quiet) { " defaultMode bypassPermissions" }
if (Select-String -Path $s -Pattern '"enableAllProjectMcpServers"\s*:\s*true' -Quiet) { " enableAllProjectMcpServers true" }
}
macOS and Linux (bash)
# Read-only, no network. Run as the user. Prints paths only.
# 1. CodeBuddy Code (CLI): the npm package and its commands
ls -d "$(npm root -g 2>/dev/null)/@tencent-ai/codebuddy-code" 2>/dev/null
command -v codebuddy-code codebuddy cbc # "codebuddy" can also be the IDE launcher
# 2. CodeBuddy IDE: app bundle and user data (macOS)
ls -d /Applications/CodeBuddy.app "$HOME/Applications/CodeBuddy.app" 2>/dev/null
ls -d "$HOME/Library/Application Support/CodeBuddy" 2>/dev/null
# 3. Running now? CLI under node, IDE from its bundle
pgrep -fl '@tencent-ai/codebuddy-code|CodeBuddy\.app/'
# 4. Settings and MCP files, and the settings worth a finding (labels only, no values)
for f in "$HOME/.codebuddy/settings.json" "$HOME/.codebuddy/.mcp.json" \
"$HOME/.codebuddy/mcp.json" "$HOME/.codebuddy.json"; do
[ -f "$f" ] && echo "$f"
done
s="$HOME/.codebuddy/settings.json"
if [ -f "$s" ]; then
grep -Eq '"defaultMode"[[:space:]]*:[[:space:]]*"bypassPermissions"' "$s" && echo " defaultMode bypassPermissions"
grep -Eq '"enableAllProjectMcpServers"[[:space:]]*:[[:space:]]*true' "$s" && echo " enableAllProjectMcpServers true"
fi
With nvm, fnm or Volta each Node version has its own global packages, so also list ~/.nvm/versions/node/*/lib/node_modules/@tencent-ai.
Settings worth a finding
| Setting | What it means | What Kuntur reports |
|---|---|---|
permissions.defaultMode: "bypassPermissions" | Tool calls run without asking by default | AGENT_PERMISSIONS_BYPASS (user and project settings, unless disableBypassPermissionsMode is "disable") |
-y / --dangerously-skip-permissions | The same for one run | A flag: only EDR process command lines show it |
enableAllProjectMcpServers: true | Every MCP server a cloned repository declares is approved | Not a finding yet |
Servers in .mcp.json | Programs or URLs the agent can call, often with tokens in env | MCP inventory and MCP findings |
For administrators, CodeBuddy documents permissions.disableBypassPermissionsMode: "disable", which turns bypass mode off, and permissions.disableAutoMode.
Find it across a fleet
The commands above answer the question for one laptop. Across a fleet, run the same read-only checks from the management tool you already use and collect one line per device. These guides show how to deploy a read-only script and read the results; their ready-made scripts cover the most common AI tools, so paste the CodeBuddy checks from this page into the same script:
- Windows with Intune: Detect AI tools with Intune Remediations (detection-only script, results in the device status column).
- Windows with NinjaOne: Inventory AI tools with NinjaOne (writes a summary to a device custom field).
- macOS with Jamf Pro: Find AI tools with a Jamf Pro extension attribute (plus a Smart Group to act on it).
- macOS with Iru (Kandji): Detect AI tools with an Iru custom script (with an allowlist).
MDM scripts usually run as SYSTEM or root, where %USERPROFILE% and ~ point at the wrong home folder, so loop over every profile under C:\Users, /Users or /home and replace the home path in each check. The Kuntur agent already does this for CodeBuddy on every endpoint.
How to restrict CodeBuddy with Intune or Jamf
Kuntur does not block, restrict or uninstall anything. If your policy says the CodeBuddy IDE should not run, the restriction is done with your MDM, and the inventory tells you who the rule will affect before you enforce it.
- Windows (Intune): a per-user Electron-style app is restricted with an App Control for Business or AppLocker rule on its executable, by publisher or path, in audit mode first. How to restrict Cursor with Intune covers the same kind of per-user desktop app step by step.
- macOS (Jamf Pro): a Restricted Software record with the app's exact process name. How to restrict ChatGPT Desktop with Jamf Pro and Cursor with Jamf Pro show the steps and what the record will not catch.
The CLI runs under node, so a binary rule does not catch it (see restricting a terminal agent with Intune for why). If the CLI is approved, distribute a settings.json with permissions.disableBypassPermissionsMode set to disable.
How Kuntur detects CodeBuddy
Kuntur's catalog has two rules: CodeBuddy Code (CLI) by the npm package, the codebuddy-code command and a node process running the package; CodeBuddy IDE by its install folder or app bundle, user data, process path and uninstall entry. The agent also reads the CLI's MCP files (~/.codebuddy/.mcp.json and the older names) for every user profile, and treats MCP servers started by the IDE as the IDE's.
To check one machine now, the free Kuntur scanner lists CodeBuddy together with every other AI tool, extension, local model and MCP server it finds:
- Download scan.ps1.
- Read it. It's plain text; here's what it does.
- Check its SHA-256 against the published hash:
Get-FileHash .\scan.ps1 -Algorithm SHA256 - Run it:
powershell -ExecutionPolicy Bypass -File .\scan.ps1
Windows shortcut, if you trust the source (PowerShell)
irm https://app.kuntur.io/scan.ps1 | iexmacOS and Linux (Terminal)
curl -fsSL https://app.kuntur.io/scan.sh | shIt needs no account and no admin rights, writes an HTML report to the Desktop (or home folder) and uploads nothing. You can read scan.ps1 or scan.sh before running it; what it collects is documented.
Across a fleet, the Kuntur agent reports the same inventory for every user profile on Windows, macOS and Linux. You mark CodeBuddy approved or unauthorized once for the organization, the dashboard shows which machines carry it, and every decision lands in an audit log.
Free for up to 5 endpoints. Pro is US$3 per endpoint per month (or US$30 per endpoint per year) for 10 to 30 endpoints. The trial needs no credit card. Kuntur detects and reports; it does not block or uninstall anything.
FAQ
- Where is CodeBuddy Code installed?
- As the global npm package
@tencent-ai/codebuddy-code, which adds the commandscodebuddy-code,codebuddyandcbc. Its settings are in~/.codebuddy/settings.json. - How do I tell the CodeBuddy CLI from the IDE?
- The CLI is the npm package and runs under
node; the IDE isCodeBuddy.appon a Mac or%LOCALAPPDATA%\Programs\CodeBuddyon Windows. Do not rely on thecodebuddycommand or the~/.codebuddyfolder, which both can use. - Does CodeBuddy have a YOLO or bypass mode?
- Yes: the
bypassPermissionspermission mode, selected with-y/--dangerously-skip-permissionsorpermissions.defaultMode. Administrators can disable it withpermissions.disableBypassPermissionsMode: "disable". - Where does CodeBuddy store MCP servers?
- In
~/.codebuddy/.mcp.jsonfor the user (older installs:~/.codebuddy/mcp.jsonor~/.codebuddy.json) and.mcp.jsonat a project's root.
Sources
- CodeBuddy Code permission modes (bypassPermissions)
- CodeBuddy Code settings files
- CodeBuddy Code MCP configuration
- Homebrew cask codebuddy (IDE paths)
- @tencent-ai/codebuddy-code on npm
Detect other AI tools:
Related guides: