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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "ref/oh-my-opencode"]
path = ref/oh-my-opencode
url = https://github.com/code-yeongyu/oh-my-opencode
[submodule "ref/docs-please"]
path = ref/docs-please
url = https://github.com/pleaseai/docs.git
28 changes: 28 additions & 0 deletions apps/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example

# Wrangler
.wrangler
.dev.vars
12 changes: 12 additions & 0 deletions apps/docs/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default defineAppConfig({
docs: {
title: 'Code Please',
description: 'Auto-format and type-check hooks for AI coding',
github: {
owner: 'chatbot-pf',
name: 'code-please',
url: 'https://github.com/chatbot-pf/code-please',
branch: 'main',
},
},
})
1 change: 1 addition & 0 deletions apps/docs/content/docs/.navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
title: Documentation
1 change: 1 addition & 0 deletions apps/docs/content/docs/1.getting-started/.navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
title: Getting Started
43 changes: 43 additions & 0 deletions apps/docs/content/docs/1.getting-started/1.introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Introduction
description: Learn about Code Please and its features
---

# Introduction

**Code Please** is a CLI tool and Claude Code plugin for AI-assisted coding. It provides automatic formatting and LSP diagnostics that integrate seamlessly with Claude Code's hook system.

## What is Code Please?

When you use Claude Code to write or edit files, Code Please can:

1. **Auto-format** your code using the appropriate formatter (Biome, Prettier, gofmt, etc.)
2. **Check for errors** using Language Server Protocol diagnostics (TypeScript, Python, Go, etc.)

This feedback happens automatically after each file edit, giving Claude real-time information about code quality.

## Packages

Code Please consists of four packages:

| Package | Description |
|---------|-------------|
| `@pleaseai/code` | Main CLI tool with format and lsp commands |
| `@pleaseai/code-format` | Formatter orchestration for 18+ formatters |
| `@pleaseai/code-lsp` | LSP client for 30 language servers |
| `@pleaseai/dora` | MCP server for JetBrains IDE integration |

## How It Works

Code Please integrates with Claude Code via [PostToolUse hooks](https://docs.anthropic.com/en/docs/build-with-claude/claude-code/hooks). When Claude uses the `Write` or `Edit` tool:

1. Claude Code sends the file info to Code Please via stdin
2. Code Please formats the file and/or checks for errors
3. Results are shown to Claude as hook output

This creates a feedback loop where Claude can see and fix issues immediately.

## Next Steps

- [Installation](/docs/getting-started/installation) - Install Code Please
- [Quick Start](/docs/getting-started/quick-start) - Set up Claude Code hooks
66 changes: 66 additions & 0 deletions apps/docs/content/docs/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Installation
description: Install Code Please globally or locally
---

# Installation

Code Please can be installed globally or as a project dependency.

## Global Installation

Install globally to use across all projects:

::code-group
```bash [npm]
npm install -g @pleaseai/code
```

```bash [bun]
bun add -g @pleaseai/code
```

```bash [pnpm]
pnpm add -g @pleaseai/code
```
::

Verify installation:

```bash
code version
```

## Local Installation

Install as a dev dependency for project-specific use:

::code-group
```bash [npm]
npm install -D @pleaseai/code
```

```bash [bun]
bun add -D @pleaseai/code
```

```bash [pnpm]
pnpm add -D @pleaseai/code
```
::

Then use via `npx`:

```bash
npx @pleaseai/code format src/index.ts
```

## Requirements

- **Node.js** 20+ or **Bun** 1.0+
- Language-specific tools for formatting (e.g., `biome`, `prettier`)
- Language servers for LSP diagnostics (auto-detected or auto-downloaded)

## Next Steps

- [Quick Start](/docs/getting-started/quick-start) - Set up Claude Code hooks
83 changes: 83 additions & 0 deletions apps/docs/content/docs/1.getting-started/3.quick-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Quick Start
description: Set up Code Please with Claude Code in minutes
---

# Quick Start

Get Code Please working with Claude Code in just a few steps.

## Step 1: Install Code Please

```bash
npm install -g @pleaseai/code
```

## Step 2: Configure Claude Code Hooks

Add the following to your `.claude/settings.json`:

```json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "npx @pleaseai/code format --stdin"
},
{
"type": "command",
"command": "npx @pleaseai/code lsp --stdin"
}
]
}
]
}
}
```

Or copy the example hooks file:

```bash
cp node_modules/@pleaseai/code/hooks/hooks.json .claude/
```

## Step 3: Start Coding

Now when Claude writes or edits files:

1. Files are automatically formatted using the appropriate formatter
2. Type errors and diagnostics are reported back to Claude
3. Claude can see and fix issues immediately

## Example Output

When Claude edits a TypeScript file with an error:

```
✗ 1 error found
✗ src/index.ts:15:7 [TS2322]: Type 'string' is not assignable to type 'number'
```

Claude sees this feedback and can fix the issue in the same conversation.

## CLI Usage

You can also use Code Please directly from the command line:

```bash
# Format a file
code format src/index.ts

# Get LSP diagnostics
code lsp src/index.ts
```

## Next Steps

- [Claude Code Hooks](/docs/guides/claude-code-hooks) - Learn more about hook configuration
- [Auto-Formatting](/docs/guides/auto-formatting) - Configure formatters
- [LSP Diagnostics](/docs/guides/lsp-diagnostics) - Configure language servers
1 change: 1 addition & 0 deletions apps/docs/content/docs/2.guides/.navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
title: Guides
Loading
Loading