Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add CLI spinners (#470) - @bl-ue
- Add support for dangerously bypassing permissions in sudo with new setting and patch (#478) - @brrock
- Add `unpack`, `repack`, and `adhoc-patch --string/regex/script` subcommands (#481)
- Add a patch to suppress the native installer warning (#483) - @brrock

## [v3.4.0](https://github.com/Piebald-AI/tweakcc/releases/tag/v3.4.0) - 2026-01-18

Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ $ pnpm dlx tweakcc
- [Statusline update customization](#feature-statusline-update-customization)
- [AGENTS.md support (with video)](#feature-agentsmd-support)
- [Auto-accept plan mode](#feature-auto-accept-plan-mode)
- [Suppress native installer warning](`#feature-suppress-native-installer-warning`)
- _Missing documentation for above features coming soon_
- [Configuration directory](#configuration-directory)
- [Building from source](#building-from-source)
Expand Down Expand Up @@ -616,6 +617,24 @@ When Claude finishes writing a plan and calls `ExitPlanMode`, you're normally sh
}
```

## Feature: Suppress native installer warning

When Claude Code detects that you've switched from npm to the native installer, it shows a warning message at startup suggesting you run `claude install` or visit the documentation for more options. This patch suppresses that warning.

**Via the UI:** Run `npx tweakcc`, go to **Misc**, and toggle **Suppress native installer warning**.

**Via `config.json`:**

```json
{
"settings": {
"misc": {
"suppressNativeInstallerWarning": true
}
}
}
```

## Configuration directory

tweakcc stores its configuration files in one of the following locations, in order of priority:
Expand Down
1 change: 1 addition & 0 deletions src/defaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ export const DEFAULT_SETTINGS: Settings = {
tokenCountRounding: null,
autoAcceptPlanMode: false,
allowBypassPermissionsInSudo: false,
suppressNativeInstallerWarning: false,
},
toolsets: [],
defaultToolset: null,
Expand Down
11 changes: 11 additions & 0 deletions src/patches/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import { writeTokenCountRounding } from './tokenCountRounding';
import { writeAgentsMd } from './agentsMd';
import { writeAutoAcceptPlanMode } from './autoAcceptPlanMode';
import { writeAllowBypassPermsInSudo } from './allowBypassPermsInSudo';
import { writeSuppressNativeInstallerWarning } from './suppressNativeInstallerWarning';
import {
restoreNativeBinaryFromBackup,
restoreClijsFromBackup,
Expand Down Expand Up @@ -340,6 +341,12 @@ const PATCH_DEFINITIONS = [
description:
'Allow bypassing permissions with --dangerously-skip-permissions even when running with root/sudo privileges',
},
{
id: 'suppress-native-installer-warning',
name: 'Suppress native installer warning',
group: PatchGroup.MISC_CONFIGURABLE,
description: 'Suppress the native installer warning message at startup',
},
// Features
{
id: 'swarm-mode',
Expand Down Expand Up @@ -758,6 +765,10 @@ export const applyCustomization = async (
fn: c => writeAllowBypassPermsInSudo(c),
condition: !!config.settings.misc?.allowBypassPermissionsInSudo,
},
'suppress-native-installer-warning': {
fn: c => writeSuppressNativeInstallerWarning(c),
condition: !!config.settings.misc?.suppressNativeInstallerWarning,
},
// Features
'swarm-mode': {
fn: c => writeSwarmMode(c),
Expand Down
26 changes: 26 additions & 0 deletions src/patches/suppressNativeInstallerWarning.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { showDiff } from './index';

export const writeSuppressNativeInstallerWarning = (
file: string
): string | null => {
const pattern =
/Claude Code has switched from npm to native installer\. Run `claude install` or see https:\/\/docs\.anthropic\.com\/en\/docs\/claude-code\/getting-started for more options\./;

const match = file.match(pattern);

if (!match || match.index === undefined) {
console.warn(
'patch: suppressNativeInstallerWarning: failed to find pattern'
);
return null;
}

const startIndex = match.index;
const endIndex = startIndex + match[0].length;

const newFile = file.slice(0, startIndex) + file.slice(endIndex);

showDiff(file, newFile, '', startIndex, endIndex);

return newFile;
};
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export interface MiscConfig {
tokenCountRounding: number | null;
autoAcceptPlanMode: boolean;
allowBypassPermissionsInSudo: boolean | null;
suppressNativeInstallerWarning: boolean;
}

export interface InputPatternHighlighter {
Expand Down
15 changes: 15 additions & 0 deletions src/ui/components/MiscView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export function MiscView({ onSubmit }: MiscViewProps) {
tokenCountRounding: null as number | null,
autoAcceptPlanMode: false,
allowBypassPermissionsInSudo: false,
suppressNativeInstallerWarning: false,
};

const ensureMisc = () => {
Expand Down Expand Up @@ -530,6 +531,20 @@ export function MiscView({ onSubmit }: MiscViewProps) {
});
},
},
{
id: 'suppressNativeInstallerWarning',
title: 'Suppress native installer warning',
description:
'Suppress the native installer warning message at startup.',
getValue: () => settings.misc?.suppressNativeInstallerWarning ?? false,
toggle: () => {
updateSettings(settings => {
ensureMisc();
settings.misc!.suppressNativeInstallerWarning =
!settings.misc!.suppressNativeInstallerWarning;
});
},
},
],
[settings, updateSettings]
);
Expand Down