agentleFS
postmeridiempostmeridiem/clide/legacy/CLAUDE.md

clide / legacy

CLAUDE.md4 starsChanged 3 months agoMITView on GitHub

Clide is a TUI IDE wrapper for Claude Code CLI, designed to be Claude-centric with VSCode-familiar keybindings. See docs/tui-ide-spec.md for full specification.

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use @work decorator for non-blocking operations:

    line 144

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Clide is a TUI IDE wrapper for Claude Code CLI, designed to be Claude-centric with VSCode-familiar keybindings. See docs/tui-ide-spec.md for full specification.

Design Principles

  • Claude-centric: Claude Code is the primary workspace, always visible
  • Contextual panels: Editor/Diff/Terminal appear only when needed
  • Alt-key shortcuts: Alt-based keybindings don't interfere with input fields
  • Responsive: Works on 13" laptop to widescreen monitors
  • State preservation: Hiding panels preserves all state (never destroy widgets)

Tech Stack

ComponentLibraryVersion
RuntimePython3.12+
TUI FrameworkTextuallatest
CLITyperlatest
Data ValidationPydanticv2 (strict mode)
Settingspydantic-settingslatest
DatabaseSQLModel + SQLitelatest
Web ServerFastAPI + uvicornlatest
Testingpytest + pytest-asyncio + pytest-textual-snapshotlatest
Extensionspluggylatest

Development Commands

Clide (TUI)

make setup          # Create venv, install deps
make run            # Run application
make test           # Run all tests
make test-single    # Run single test (TEST=path::test_name)
make typecheck      # Run mypy
make lint           # Run ruff check
make format         # Run ruff format
make build          # Build for current platform

clide-web (Web Server)

cd clide-web/
make setup          # Create venv, install deps, run setup wizard
make run            # Run the web server (foreground)
make dev            # Run with auto-reload
make start-server   # Start systemd service
make stop-server    # Stop systemd service
make restart-server # Restart systemd service
make status-server  # Show service status
make logs-server    # Tail service logs

Panel Architecture

┌─────────────────┬─────────────────────────┬──────────────────┐
│ panel-sidebar   │ panel-workspace (60%)   │ panel-context    │
│                 │ [Editor][Diff][Terminal]│                  │
│ [Files][Git]    │ (hidden when inactive)  │ [Problems][TODOs]│
│ [Tree]          ├─────────────────────────┤ [Jira]           │
│                 │                         │                  │
│ (content area)  │ panel-claude            │ (content area)   │
│                 │ (40% when workspace     │                  │
│                 │  visible, else 100%)    │                  │
├─────────────────┤                         ├──────────────────┤
│ ⎇ main ▾       │                         │ [⚠ 3][✓12][Jira]│
└─────────────────┴─────────────────────────┴──────────────────┘

Project Structure

clide/
├── clide/                        # Package source
│   ├── __init__.py
│   ├── __main__.py
│   ├── app.py                    # Main App, layout, keybindings
│   ├── cli.py                    # Typer entry point
│   ├── controllers/              # Domain logic (no UI)
│   ├── widgets/                  # UI components
│   │   ├── panels/               # Main layout containers
│   │   └── components/           # Reusable UI pieces
│   ├── models/                   # Pydantic data models
│   ├── services/                 # Background task logic
│   ├── themes/                   # Theme system
│   ├── extensions/               # Plugin system
│   └── helpers/                  # Utility functions
│
├── tests/
│   ├── conftest.py
│   ├── harnesses/
│   │   ├── app_harness.py
│   │   └── controller_harness.py
│   ├── unit/
│   ├── integration/
│   └── snapshots/
│
├── .config/                      # User config (gitignored)
│   ├── settings.toml             # User settings
│   └── themes/                   # Custom user themes
│       └── my-theme.toml
├── docs/
│   ├── tui-ide-spec.md           # Full UI/UX specification
│   ├── web-deployment.md         # Web deployment architecture
│   └── ARCHITECTURE.md           # Framework best practices
├── pyproject.toml
└── Makefile
│
clide-web/                        # Web server package (wraps clide)
├── clide_web/
│   ├── server.py                 # FastAPI app, routes, WebSocket handler
│   ├── sessions.py               # tmux session manager
│   ├── pty_bridge.py             # PTY ↔ WebSocket bridge
│   ├── config.py                 # Pydantic settings with DB overlay
│   ├── setup_wizard.py           # Interactive first-run config
│   └── static/
│       ├── index.html            # HTML page (toolbar + xterm.js)
│       └── vendor/               # Vendored xterm.js (offline)
├── pyproject.toml
└── Makefile

Key Patterns

Panel Visibility (Hide, Don't Destroy)

def toggle_workspace(self, visible: bool) -> None:
    workspace = self.query_one("#panel-workspace")
    workspace.display = visible  # Preserves all child state

    claude = self.query_one("#panel-claude")
    claude.styles.height = "40%" if visible else "100%"

Background Tasks

Use @work decorator for non-blocking operations:

@work(thread=True)
def refresh_git_status(self) -> None:
    result = subprocess.run(["git", "status", "--porcelain"], ...)
    self.call_from_thread(self.update_git_view, result.stdout)

Reactive State

class ClideApp(App):
    current_file: reactive[str | None] = reactive(None)
    workspace_visible: reactive[bool] = reactive(False)
    problem_count: reactive[int] = reactive(0)
    todo_count: reactive[int] = reactive(0)
    compact_mode: reactive[bool] = reactive(False)

Pydantic Models (Strict + Frozen)

from pydantic import BaseModel, ConfigDict

class GitChange(BaseModel):
    model_config = ConfigDict(strict=True, frozen=True)
    path: str
    status: Literal["added", "modified", "deleted", "untracked", "renamed"]
    staged: bool

Controller → Widget Communication

Controllers emit Textual messages; widgets subscribe:

# In controller
class GitStatusUpdated(Message):
    def __init__(self, status: GitStatus) -> None:
        self.status = status
        super().__init__()

self.post_message(GitStatusUpdated(status))

# In widget
def on_git_status_updated(self, event: GitStatusUpdated) -> None:
    self.refresh_view(event.status)

Theme System

Default Theme: Summer Night

Based on jackw01/summer-night-vscode-theme:

SUMMER_NIGHT = ThemeColors(
    primary="#00a3d2",      # cyan
    secondary="#00a9b9",    # teal
    accent="#fa5f8b",       # pink
    background="#21262f",   # mono_8
    surface="#393e48",      # mono_7
    panel="#292e38",
    foreground="#e2e8f5",   # mono_1
    success="#00ab9a",      # green
    warning="#d08447",      # orange
    error="#f06c6f",        # red
)

Built-in Themes (22 total)

CategoryThemes
Coresummer-night (default), summer-day
Popularone-dark, one-dark-pro, one-light, dracula, nord, gruvbox-dark, gruvbox-light
GitKrakenone-dark-teal, gamma
Seasonal - Winterwinter-is-coming, monokai-winter
Seasonal - Fallfall, dark-autumn
Seasonal - Halloweenall-hallows-eve, halloween
Seasonal - Christmaschristmas, santa-baby
Hackerpro-hacker, hacker-style
Bonushouston

Theme Definition

class ThemeColors(BaseModel):
    model_config = ConfigDict(strict=True, frozen=True)
    primary: str       # Main accent
    secondary: str     # Secondary accent
    accent: str        # Highlight accent
    background: str    # Main background
    surface: str       # Elevated surfaces
    panel: str         # Panel backgrounds
    foreground: str    # Primary text
    success: str       # Success/green
    warning: str       # Warning/yellow
    error: str         # Error/red

class ThemeDefinition(BaseModel):
    name: str          # Identifier (e.g., "summer-night")
    display_name: str  # Human-readable name
    dark: bool         # Dark or light theme
    colors: ThemeColors

Custom Themes

Users can add themes in .config/themes/:

# .config/themes/my-theme.toml
name = "my-theme"
display_name = "My Custom Theme"
dark = true

[colors]
primary = "#007acc"
secondary = "#3c3c3c"
accent = "#0e639c"
background = "#1e1e1e"
surface = "#252526"
panel = "#2d2d30"
foreground = "#d4d4d4"
success = "#4ec9b0"
warning = "#dcdcaa"
error = "#f44747"

Theme Switching

  • Keybinding: Ctrl+K Ctrl+T
  • Settings: theme = "summer-night" in ClideSettings
  • Runtime: app.theme = "dracula"

Keybindings (Alt-based)

ActionBinding
QuitAlt+Q
Command paletteAlt+P
Quick openAlt+O
Toggle left sidebarAlt+B
Toggle right sidebarAlt+Shift+B
Toggle terminalAlt+`
Focus ClaudeAlt+1
Focus EditorAlt+2
Focus TerminalAlt+3
Toggle compact modeAlt+C
Git panelAlt+G
Problems panelAlt+M
Select themeAlt+T
Save fileAlt+S

Configuration

Settings are loaded from multiple sources (in priority order):

  1. Environment variables (CLIDE_*)
  2. .config/settings.toml
  3. Defaults in ClideSettings
class ClideSettings(BaseSettings):
    model_config = SettingsConfigDict(
        env_prefix="CLIDE_",
        env_file=".env",
        extra="ignore",
    )

    theme: str = "summer-night"
    jira_enabled: bool = False
    jira_cli_path: str = "jira"

    panels: PanelConfig = PanelConfig()
    keybindings: KeybindingsConfig = KeybindingsConfig()

Documentation Links

Core Stack

Testing

Extensions

Build

Theme References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.