Take control of Claude Code. Save tokens. Work smarter.
Claude Code is incredible, but it comes with overhead. Every tool, every capability, every feature costs tokens - before you even type your first message.
DeClaude fixes that.
- The Problem
- The Solution
- What is DeClaude?
- Why This Tool Needs to Exist
- Features
- Beginner vs Expert Mode
- Quick Start ← Start here!
- Help Wanted: Multi-Agent Support
- Privacy & Security
- Development
- Contributing
- License
This screenshot shows an extremely lean setup - no MCP servers, no complex CLAUDE.md files, minimal configuration. Even then:
- 49k tokens already used (24% of your context)
- System prompt: 2.2k tokens
- Memory files: 1.7k tokens
- Autocompact buffer: 45k tokens
- Free space: only 151k (75.6%)
Most users are far worse off. Add MCP servers, skills, custom CLAUDE.md files, plugins, and multiple tools? You're looking at 60-80k tokens consumed before you start. Some power users report starting conversations with 100,000+ tokens already used - half their context gone before typing a single message.
That's every compacting event. Every context refresh. Every new conversation.
If you're burning through hundreds of millions or billions of tokens a week, that overhead is costing you real money and real productivity.
With DeClaude's extreme configuration (Bash-only + custom system prompt):
- 0k/200k tokens (0%)
- System prompt: 10 tokens
- Messages: 8 tokens
- Free space: 200k (100.0%)
That's essentially zero overhead. Your entire context window is yours.
The math:
- Standard Claude Code: 49,000 tokens used before you start
- DeClaude extreme: 18 tokens
- Savings: 49,000 tokens. Every. Single. Time.
At scale, this is transformative. If you're hitting context limits, if you're watching costs climb, if you're tired of Claude forgetting things mid-conversation - this is why.
(The --system-prompt flag lets you override Claude's default prompt. Combined with using the Bash tool as an all-in-one tool to accomplish almost anything via simple commands, you get virtually unlimited context.)
Did you know Claude Code has flags to control which tools it can use?
Most people don't. Buried in the CLI documentation are --allowedTools and --disallowedTools flags that let you specify exactly which of Claude's 18 tools are available. Want Claude to only use Bash? Want to disable file editing? Want a read-only research mode? The capability exists - it's just nearly impossible to use.
DeClaude makes it usable. It's a visual command generator that creates custom Claude Code shell functions:
- Check boxes for the tools you want
- Set your flags
- Copy one command
- Now
declauderuns your custom config,declaude RESETrestores full access
It's the missing control panel for Claude Code's tool system.
Claude Code's built-in tool management is... a nightmare. The flags exist (--allowedTools, --disallowedTools), but actually using them?
Here's what most people don't realize: these flags are permanent. When you run claude --disallowedTools "Bash", Bash doesn't just get disabled for that session - it gets added to your config. Permanently. Until you explicitly re-enable it.
This means:
- Disable a tool once, it stays disabled forever
- To re-enable it, you need to know the exact flag syntax
- There's no command to check which tools are currently disabled - you only find out when you try to use a tool and it fails
- The only way to verify your setup is to try each tool individually
- No visual indicator, no status command, nothing
The workflow for manually managing tools:
- Remember which of the 18 tools you want enabled
- Remember which you want disabled
- Type them all correctly (one typo and it silently fails)
- Launch Claude
- Try to use a tool... did it work? Is it disabled? Who knows?
- Realize something's wrong mid-conversation
- Close Claude
- Retype the entire command with a guess at the fix
- Repeat until you give up
Nobody is doing this. I guarantee less than 1% of Claude Code users even know these flags exist, let alone use them regularly. And nobody is going to manually type --allowedTools "Bash,Read,Edit,Write,Glob,Grep" --disallowedTools "Task,TaskOutput,KillShell,WebFetch,WebSearch..." every time they want to switch workflows.
- Visual toggles - see exactly what's enabled/disabled at a glance
- Profile system - save configurations, switch workflows with a single word
- Both flags always set - every command sets a complete, known state - no surprises, no persistence issues
- RESET profile - one command to restore full Claude Code functionality
- Automated installation - one-liner install scripts that detect your shell, back up your config, and set everything up
- Export/Import - save your profiles as JSON, share them, restore them when things change
- Explain Mode - a full panel that tokenizes and explains every element of the generated command so you know exactly what it's doing
- Read-only environments - disable editing tools and Claude outputs commands as text instead of executing them - you become the filter, reviewing and running each command yourself
- No memorization required - the tool knows all 18 tool names so you don't have to
DeClaude makes tool management actually usable.
Our secret dream? Anthropic sees this, realizes how poorly designed their current system is, improves it, and makes DeClaude obsolete. That would be a win for everyone.
Organize your configurations into groups and profiles:
Built-in Groups:
- DeClaude: Restriction levels from DEFCON1 (full access) to DECLAUDE (Bash-only) to RESET (restore all)
- Use Case: Code Review, Documentation, Debugging, Research - each tuned for the task
- Workflow: Explore, Prototype, Implement, Test - match your development phase
Each profile stores:
- Which tools are enabled/disabled
- Which CLI flags are set
- A custom name that becomes your command flag
Management features:
- Inline editing (click the pencil to rename)
- Star button to set default profile
- Export/Import for backup and sharing
- Create custom groups and profiles
Bonus points to anyone who can make these tool/flag elements flow nicely in CSS. I tried everything and gave up. PRs welcome. 😅
Every Claude Code tool can be toggled independently:
| Category | Tools | Why You'd Disable |
|---|---|---|
| System | Bash, Task, TaskOutput, KillShell | Prevent shell access, background tasks |
| File | Read, Edit, Write, Glob, Grep | Read-only mode, prevent modifications |
| Web | WebFetch, WebSearch | Offline mode, prevent external calls |
| Advanced | NotebookEdit, Skill, SlashCommand | Limit advanced capabilities |
| User | TodoWrite, AskUserQuestion | Streamline interaction |
| Mode | EnterPlanMode, ExitPlanMode | Control planning behavior |
Example configurations:
- Code Review: Enable Read, Glob, Grep. Disable everything else. Claude can search and read but can't modify anything.
- Research Mode: Enable WebFetch, WebSearch, Read. Claude can research but can't touch your files.
- Paranoid Mode: Bash only. Claude has to ask you to do everything else through the terminal.
The app shows redundancy warnings when disabling one tool affects others.
Not just checkboxes. DeClaude supports:
- Boolean flags:
--verbose,--dangerously-skip-permissions - Flags with predefined options: Model selection with radio buttons
- Flags with free-text input: Custom values where you need them
- Risk indicators: Dangerous flags are visually marked
Plus additional tools fields - if there's a tool we don't know about, add it to the allowed/disallowed list manually.
🚧 This section is aspirational. We've built the architecture for broad compatibility, but only PowerShell + Claude Code is fully tested. We need your help to validate the rest and bring this vision to life. See Contributing.
DeClaude generates actual, proper shell syntax - not string templates:
| Shell | What You Get | Status |
|---|---|---|
| PowerShell | Real functions with param blocks and switch statements |
✅ Tested |
| Bash | Proper functions with case statements |
|
| Zsh | Native zsh syntax | |
| Fish | Fish shell functions | |
| Nushell | Modern def and match syntax |
|
| CMD | Batch files with IF/ELSE chains |
And support for multiple AI coding agents:
| Agent | Tool Restrictions | Status |
|---|---|---|
| Claude Code | --allowedTools / --disallowedTools |
✅ Tested |
| Gemini CLI | Config-based (settings.json) |
|
| OpenCode | --allowedTools / --excludedTools |
|
| Aider | Config file (~/.aider.conf.yml) |
|
| Codex CLI | Documentation varies | |
| Continue | Config-based (config.yaml) |
Select your OS, shell, and agent - get code that actually works. PowerShell + Claude Code is fully tested; everything else needs community validation - please report issues if you encounter problems.
Don't want to manually edit your shell config? Enable "Install Script" and get a one-liner that:
- Detects your shell's config file location
- Checks if the function already exists
- Creates a backup if needed
- Appends the function
- Sources the config
Paste one command, restart your terminal, done.
Hover over any segment of the generated command and see exactly what it does. The entire command is tokenized and color-coded:
- Function declarations and syntax
- Parameter blocks and defaults
- Flag names and their values
- Tool lists (allowed and disallowed)
- String delimiters and escaping
Perfect for learning shell syntax, or for verifying that the command does what you think it does.
DeClaude adapts to your experience level:
Toggle between them with one click:
- Open DeClaude - 👉 katsujincode.github.io/DeClaude 👈 or open
index.htmllocally - Pick a profile - Start with DECLAUDE (Bash-only) for maximum token savings
- Customize if needed - Toggle tools, set flags
- Copy the command - Click Copy, paste into terminal
- Use it:
declaude # Your default profile (Bash-only)
declaude DEFCON1 # Full access when you need it
declaude RESET # Restore all tools
declaude CodeReview # Read-only mode (no spaces = no quotes needed)(Tip: Profile names with spaces require quotes. Use underscores or camelCase to keep your commands clean.)
DeClaude currently supports Claude Code fully. We've also built the architecture for other AI coding agents:
Agent Status Claude Code Fully tested and working Gemini CLI Alpha - needs community validation OpenCode Alpha - needs community validation Aider Alpha - needs community validation Codex CLI Alpha - needs community validation Continue Alpha - needs community validation The tool configurations for non-Claude agents were built from documentation research, but haven't been battle-tested in real workflows. Each agent has different CLI patterns, different flag names, different behaviors.
If you use any of these agents, your testing would be invaluable. Even a simple "this worked" or "this flag is wrong" helps make this tool better for everyone.
- 100% client-side - No server, no backend, nothing leaves your browser
- localStorage only - Profiles saved locally, never transmitted
- No tracking - Zero analytics, zero cookies, zero telemetry
- Open source - Read every line of code yourself
git clone https://github.com/KatsuJinCode/DeClaude.git
cd DeClaude
# Open index.html in your browser - that's itNo build step. No npm install. No dependencies. Vanilla HTML/CSS/JS.
This project took countless hours. The profile system, explain mode, multi-shell support, flag configurations - all crafted with care.
But I'm one person, and I only use Claude Code. The multi-agent support is waiting for validation.
Even if you just:
- Test one agent and report back
- Fix a typo
- Suggest a better default
- Share it with someone who'd find it useful
That helps. GitHub Issues
MIT - Do whatever you want with it. See LICENSE.
Built for developers who want Claude's power with their own guardrails.
49,000 tokens saved. Every time.









