Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A clear and concise description of what the bug is.

Steps to reproduce the behavior:

1. Run `npx cc-mirror ...`
1. Run `npx claude-sneakpeek ...`
2. Select '...'
3. See error

Expand All @@ -30,7 +30,7 @@ If applicable, add screenshots to help explain your problem.

- **OS**: [e.g., macOS 14.0, Ubuntu 22.04, Windows 11]
- **Node.js version**: [e.g., 20.10.0]
- **cc-mirror version**: [e.g., 1.0.0]
- **claude-sneakpeek version**: [e.g., 1.0.0]
- **Provider**: [e.g., zai, minimax, openrouter, ccrouter]

## Additional Context
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature Request
about: Suggest an idea for cc-mirror
about: Suggest an idea for claude-sneakpeek
title: '[Feature] '
labels: enhancement
assignees: ''
Expand Down
38 changes: 19 additions & 19 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ npm run dev # Run CLI from TypeScript sources
npm run tui # Launch TUI wizard
npm test # Run all tests
npm run typecheck # TypeScript check without emit
npm run bundle # Build dist/cc-mirror.mjs
npm run render:tui-svg # Regenerate docs/cc-mirror-tree.svg
npm run bundle # Build dist/claude-sneakpeek.mjs
npm run render:tui-svg # Regenerate docs/claude-sneakpeek-tree.svg
```

## Coding Conventions
Expand All @@ -84,7 +84,7 @@ npm run render:tui-svg # Regenerate docs/cc-mirror-tree.svg
### Variant Directory Structure

```
~/.cc-mirror/<variant>/
~/.claude-sneakpeek/<variant>/
├── config/
│ ├── settings.json # Env overrides (API keys, base URLs, model defaults)
│ ├── .claude.json # API-key approvals + onboarding/theme + MCP servers
Expand All @@ -102,11 +102,11 @@ npm run render:tui-svg # Regenerate docs/cc-mirror-tree.svg

Location: `<bin-dir>/<variant>` (macOS/Linux) or `<bin-dir>/<variant>.cmd` (Windows)

Default `<bin-dir>` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on Windows.
Default `<bin-dir>` is `~/.local/bin` on macOS/Linux and `~/.claude-sneakpeek/bin` on Windows.

- Sets `CLAUDE_CONFIG_DIR` to variant config
- Loads `settings.json` into env at runtime
- Shows provider splash ASCII art when TTY and `CC_MIRROR_SPLASH != 0`
- Shows provider splash ASCII art when TTY and `CLAUDE_SNEAKPEEK_SPLASH != 0`
- Auto-update disable: `DISABLE_AUTOUPDATER=1` in settings.json env

### Provider Auth Modes
Expand All @@ -127,7 +127,7 @@ Default `<bin-dir>` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on W

## Team Mode

**Legacy notice:** Team mode is only supported in the published cc-mirror **1.6.3** release. Current development builds do not patch Claude Code; focus is provider enablement and stable updates.
**Legacy notice:** Team mode is only supported in the published claude-sneakpeek **1.6.3** release. Current development builds do not patch Claude Code; focus is provider enablement and stable updates.

Team mode patches `cli.js` to enable Task\* tools for multi-agent collaboration.

Expand All @@ -144,7 +144,7 @@ function sU() {
```

- Backup stored at `cli.js.backup` before patching
- Task storage: `~/.cc-mirror/<variant>/config/tasks/<team_name>/`
- Task storage: `~/.claude-sneakpeek/<variant>/config/tasks/<team_name>/`

### Dynamic Team Names (v1.3.0+)

Expand Down Expand Up @@ -227,12 +227,12 @@ export const MINIMAX_BLOCKED_TOOLS = [

```bash
# Variant config
cat ~/.cc-mirror/<variant>/config/settings.json
cat ~/.cc-mirror/<variant>/config/.claude.json
cat ~/.cc-mirror/<variant>/variant.json
cat ~/.claude-sneakpeek/<variant>/config/settings.json
cat ~/.claude-sneakpeek/<variant>/config/.claude.json
cat ~/.claude-sneakpeek/<variant>/variant.json

# TweakCC config
cat ~/.cc-mirror/<variant>/tweakcc/config.json
cat ~/.claude-sneakpeek/<variant>/tweakcc/config.json

# Wrapper script
cat <bin-dir>/<variant>
Expand All @@ -242,36 +242,36 @@ cat <bin-dir>/<variant>

```bash
# Check if cli.js is patched
grep "function sU(){return" ~/.cc-mirror/<variant>/npm/node_modules/@anthropic-ai/claude-code/cli.js
grep "function sU(){return" ~/.claude-sneakpeek/<variant>/npm/node_modules/@anthropic-ai/claude-code/cli.js
# Should show: function sU(){return!0} (enabled)
# Not: function sU(){return!1} (disabled)

# List team tasks
ls ~/.cc-mirror/<variant>/config/tasks/<team_name>/
ls ~/.claude-sneakpeek/<variant>/config/tasks/<team_name>/
```

### Health Check

```bash
npx cc-mirror doctor
npx claude-sneakpeek doctor
```

### Reference Files

- **Upstream CLI references**: `repos/anthropic-claude-code-*/cli.js` (multiple versions for comparison)
- **System prompt sources**: `repos/claude-code-system-prompts/` (includes CHANGELOG.md)
- **Research notes**: `notes/` (deep dives, version analysis, design decisions)
- **Applied prompts**: `~/.cc-mirror/<variant>/tweakcc/system-prompts/`
- **Debug logs**: `~/.cc-mirror/<variant>/config/debug/*.txt`
- **Applied prompts**: `~/.claude-sneakpeek/<variant>/tweakcc/system-prompts/`
- **Debug logs**: `~/.claude-sneakpeek/<variant>/config/debug/*.txt`

### CLI Feature Gates

```bash
# Search for feature flags in cli.js
rg "tengu_prompt_suggestion|promptSuggestionEnabled" ~/.cc-mirror/<variant>/npm/node_modules/@anthropic-ai/claude-code/cli.js
rg "tengu_prompt_suggestion|promptSuggestionEnabled" ~/.claude-sneakpeek/<variant>/npm/node_modules/@anthropic-ai/claude-code/cli.js

# Check cached gates
cat ~/.cc-mirror/<variant>/config/.claude.json | jq '.statsig'
cat ~/.claude-sneakpeek/<variant>/config/.claude.json | jq '.statsig'
```

## ZAI CLI (for Z.ai variants)
Expand Down Expand Up @@ -299,7 +299,7 @@ Requires `Z_AI_API_KEY` in environment.
2. Verify `variant.json` exists
3. Verify `.claude.json` has `hasCompletedOnboarding` + `theme`
4. Run wrapper in TTY and confirm splash + no onboarding prompt
5. Use `npx cc-mirror update test-zai` to validate update flow
5. Use `npx claude-sneakpeek update test-zai` to validate update flow

## Testing

Expand Down
16 changes: 8 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ All notable changes to this project will be documented in this file.

### Documentation

- README and docs now mark team mode as legacy (cc-mirror 1.6.3 only).
- README and docs now mark team mode as legacy (claude-sneakpeek 1.6.3 only).

## [1.6.5] - 2026-01-12

Expand All @@ -29,7 +29,7 @@ All notable changes to this project will be documented in this file.

### Changed

- `cc-mirror update` now resets `npm/` and `tweakcc/` before reinstalling, preserving config/tasks/skills for a clean rebuild.
- `claude-sneakpeek update` now resets `npm/` and `tweakcc/` before reinstalling, preserving config/tasks/skills for a clean rebuild.
- Update command defaults to quiet tweakcc output; use `--verbose` to show full logs.

### Added
Expand Down Expand Up @@ -67,7 +67,7 @@ All notable changes to this project will be documented in this file.
### Changed

- **Complete messaging overhaul: "Claude Code, Unshackled"**
- New tagline positions CC-MIRROR as an opinionated Claude Code distribution
- New tagline positions CLAUDE-SNEAKPEEK as an opinionated Claude Code distribution
- "We did the hacking — you get the superpowers"
- Team mode (multi-agent orchestration) is now the flagship feature

Expand All @@ -77,10 +77,10 @@ All notable changes to this project will be documented in this file.
- Updated provider descriptions across CLI, TUI, and documentation

- **README.md completely rewritten**
- New hero section: "The Unlock" — explains what CC-MIRROR enables
- New hero section: "The Unlock" — explains what CLAUDE-SNEAKPEEK enables
- Before/after ASCII diagram showing the transformation
- Mirror Claude Quick Start at the top
- "What is CC-MIRROR?" section explains the opinionated distribution model
- "What is CLAUDE-SNEAKPEEK?" section explains the opinionated distribution model
- Orchestrator skill section with example workflow
- Clear documentation of team mode as default (with disable instructions)

Expand Down Expand Up @@ -116,7 +116,7 @@ All notable changes to this project will be documented in this file.

### Changed

- **All commands now use `npx cc-mirror`** for portability - no global install required
- **All commands now use `npx claude-sneakpeek`** for portability - no global install required
- Updated task-manager skill with `npx` prefix
- Updated README.md command examples
- Updated team-mode.md CLI examples
Expand Down Expand Up @@ -307,7 +307,7 @@ All notable changes to this project will be documented in this file.
- AskUserQuestion as mandatory tool (never text menus)
- Background agents by default (`run_in_background=True`)
- 8 domain-specific reference guides (code review, testing, devops, documentation, etc.)
- Managed skill marker (`.cc-mirror-managed`) for safe updates without overwriting user customizations
- Managed skill marker (`.claude-sneakpeek-managed`) for safe updates without overwriting user customizations

- **Documentation**
- `docs/features/team-mode.md` - Complete team mode guide with architecture diagrams
Expand Down Expand Up @@ -339,7 +339,7 @@ All notable changes to this project will be documented in this file.

### Fixed

- Fixed bin path to use relative path (`./dist/cc-mirror.mjs`)
- Fixed bin path to use relative path (`./dist/claude-sneakpeek.mjs`)
- Added missing `@eslint/js` dev dependency

## [1.0.2] - 2025-01-03
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Contributing to cc-mirror
# Contributing to claude-sneakpeek

Thanks for your interest in contributing!

## Development Setup

```bash
# Clone the repo
git clone https://github.com/numman-ali/cc-mirror.git
cd cc-mirror
git clone https://github.com/numman-ali/claude-sneakpeek.git
cd claude-sneakpeek

# Install dependencies
npm install
Expand Down
36 changes: 18 additions & 18 deletions DESIGN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cc-mirror Design
# claude-sneakpeek Design

## Goals

Expand All @@ -11,7 +11,7 @@

```
.-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
| ~/.cc-mirror/<variant> |
| ~/.claude-sneakpeek/<variant> |
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-'
|-- npm/ # npm install root (cli.js lives here)
|-- config/ # CLAUDE_CONFIG_DIR
Expand All @@ -26,7 +26,7 @@
```

Wrappers are installed into `<bin-dir>/<variant>` (configurable).
Default `<bin-dir>` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on Windows.
Default `<bin-dir>` is `~/.local/bin` on macOS/Linux and `~/.claude-sneakpeek/bin` on Windows.

## Core Components

Expand Down Expand Up @@ -66,15 +66,15 @@ Default `<bin-dir>` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on W

## Updating Binaries

- `cc-mirror update` rebuilds the `npm/` + `tweakcc/` directories (preserving config, tasks, skills, approvals), then re-runs `npm install` and reapplies tweakcc for a clean upgrade.
- `claude-sneakpeek update` rebuilds the `npm/` + `tweakcc/` directories (preserving config, tasks, skills, approvals), then re-runs `npm install` and reapplies tweakcc for a clean upgrade.

## Maintenance Checklist

- Update all variants after Claude Code upgrades: `cc-mirror update`
- Update a single variant: `cc-mirror update <name>`
- Reapply or change brand preset: `cc-mirror update <name> --brand zai`
- Adjust API keys/base URL: edit `~/.cc-mirror/<variant>/config/settings.json`
- Launch tweakcc UI for a variant: `cc-mirror tweak <name>`
- Update all variants after Claude Code upgrades: `claude-sneakpeek update`
- Update a single variant: `claude-sneakpeek update <name>`
- Reapply or change brand preset: `claude-sneakpeek update <name> --brand zai`
- Adjust API keys/base URL: edit `~/.claude-sneakpeek/<variant>/config/settings.json`
- Launch tweakcc UI for a variant: `claude-sneakpeek tweak <name>`
- Opt out of prompt packs: `--no-prompt-pack`
- Select prompt pack mode: `--prompt-pack-mode minimal|maximal`
- Opt out of skill install: `--no-skill-install`
Expand All @@ -85,36 +85,36 @@ Provider templates are plain TS objects; add new providers by extending `src/pro

## Auth Handling

When an API key is supplied, cc-mirror writes `ANTHROPIC_API_KEY` into the variant config
When an API key is supplied, claude-sneakpeek writes `ANTHROPIC_API_KEY` into the variant config
so Claude Code recognizes API-key auth during onboarding.

Wrappers also load `settings.json` env vars at launch, ensuring onboarding sees API-key auth
before Claude Code applies config env internally.

For Z.ai variants, cc-mirror also sets `Z_AI_API_KEY` to the same value by default (used by `zai-cli`), unless the user overrides it via extra env. Quick/TUI flows can also write it into the shell profile (opt out with `--no-shell-env`).
For Z.ai variants, claude-sneakpeek also sets `Z_AI_API_KEY` to the same value by default (used by `zai-cli`), unless the user overrides it via extra env. Quick/TUI flows can also write it into the shell profile (opt out with `--no-shell-env`).

cc-mirror also stores the **last 20 characters** of the API key in
`~/.cc-mirror/<variant>/config/.claude.json` under `customApiKeyResponses.approved` so Claude Code
claude-sneakpeek also stores the **last 20 characters** of the API key in
`~/.claude-sneakpeek/<variant>/config/.claude.json` under `customApiKeyResponses.approved` so Claude Code
skips the OAuth login screen in interactive mode.

Brand presets stamp the user label for the chat banner from `CLAUDE_CODE_USER_LABEL` (fallback: OS username).

`ANTHROPIC_AUTH_TOKEN` is stripped from variant settings and wrappers; variants are API-key only to avoid auth conflicts.

MiniMax variants seed a default MCP server entry in `~/.cc-mirror/<variant>/config/.claude.json` so the coding-plan MCP is ready once you add your API key.
MiniMax variants seed a default MCP server entry in `~/.claude-sneakpeek/<variant>/config/.claude.json` so the coding-plan MCP is ready once you add your API key.

Z.ai variants add a deny list for known server-side MCP tools in `~/.cc-mirror/<variant>/config/settings.json`, pushing the model toward `zai-cli`.
Z.ai variants add a deny list for known server-side MCP tools in `~/.claude-sneakpeek/<variant>/config/settings.json`, pushing the model toward `zai-cli`.

Prompt packs (provider overlays) are injected into tweakcc prompt fragments after tweakcc runs, then re-applied so the patched binary includes provider guidance.

dev-browser is installed into `~/.cc-mirror/<variant>/config/skills/dev-browser` by default for Z.ai and MiniMax variants (opt out with `--no-skill-install`).
dev-browser is installed into `~/.claude-sneakpeek/<variant>/config/skills/dev-browser` by default for Z.ai and MiniMax variants (opt out with `--no-skill-install`).

## Brand Presets

Brand presets are optional tweakcc configurations written into `~/.cc-mirror/<variant>/tweakcc/config.json`.
Brand presets are optional tweakcc configurations written into `~/.claude-sneakpeek/<variant>/tweakcc/config.json`.
Presets are provider-aware (e.g., `zai` auto-selects the Z.ai Carbon skin, `minimax` selects MiniMax Pulse) but can be overridden via `--brand`.

## Install (npm-only)

cc-mirror always installs `@anthropic-ai/claude-code@2.0.76` into `~/.cc-mirror/<variant>/npm` and runs its `cli.js`.
claude-sneakpeek always installs `@anthropic-ai/claude-code@2.0.76` into `~/.claude-sneakpeek/<variant>/npm` and runs its `cli.js`.
Use `--npm-package` to override the package name; the version stays pinned.
Loading