114 lines
4.5 KiB
Markdown

# Coder Configuration
This section describes the configuration and features of the code-server environment.
## Accessing Code Server
- **URL:** `http://localhost:8080`
- **Authentication:** Password-based (see below for password retrieval)
### Retrieving the Code Server Password
After the first build, the code-server password is stored in:
```
configs/code-server/.config/code-server/config.yaml
```
Look for the `password:` field in that file. For example:
```yaml
password: 0c0dca951a2d12eff1665817
```
> **Note:** It is recommended **not** to change this password manually, as it is securely generated.
## Main Configuration Options
- `bind-addr`: The address and port code-server listens on (default: `127.0.0.1:8080`)
- `auth`: Authentication method (default: `password`)
- `password`: The login password (see above)
- `cert`: Whether to use HTTPS (default: `false`)
## Installed Tools and Features
The code-server environment includes:
- **Node.js 18+** and **npm**
- **Claude Code** (`@anthropic-ai/claude-code`) globally installed
- **Python 3** and tools:
- `python3-pip`, `python3-venv`, `python3-full`, `pipx`
- **Image and PDF processing libraries**:
- `CairoSVG`, `Pillow`, `libcairo2-dev`, `libfreetype6-dev`, `libjpeg-dev`, `libpng-dev`, `libwebp-dev`, `libtiff5-dev`, `libopenjp2-7-dev`, `liblcms2-dev`
- `weasyprint`, `fonts-roboto`
- **Git** for version control and plugin management
- **Build tools**: `build-essential`, `pkg-config`, `python3-dev`, `zlib1g-dev`
- **MkDocs Material** and a wide range of MkDocs plugins, installed in a dedicated Python virtual environment at `/home/coder/.venv/mkdocs`
- **Convenience script**: `run-mkdocs` for running MkDocs commands easily
### Using MkDocs
The virtual environment for MkDocs is automatically added to your `PATH`. You can run MkDocs commands directly, or use the provided script. For example, to build the site, from a clean terminal we would rung:
```bash
cd mkdocs
mkdocs build
```
## Claude Code Integration
<div class="github-widget" data-repo="anthropics/claude-code"></div>
The code-server environment comes with **Claude Code** (`@anthropic-ai/claude-code`) globally installed via npm.
### What is Claude Code?
Claude Code is an AI-powered coding assistant by Anthropic, designed to help you write, refactor, and understand code directly within your development environment.
### Usage
- Access Claude Code features through the command palette or sidebar in code-server.
- Use Claude Code to generate code, explain code snippets, or assist with documentation and refactoring tasks.
- For more information, refer to the [Claude Code documentation](https://docs.anthropic.com/claude/docs/claude-code).
> **Note:** Claude Code requires an API key or account with Anthropic for full functionality. Refer to the extension settings for configuration.
### Call Claude
To use claude simply type claude into the terminal and follow instructions.
```bash
claude
```
## Shell Environment
The `.bashrc` is configured to include the MkDocs virtual environment and user-local binaries in your `PATH` for convenience.
## Code Navigation and Editing Features
The code-server environment provides robust code navigation and editing features, including:
- **IntelliSense**: Smart code completions based on variable types, function definitions, and imported modules.
- **Code Navigation**: Easily navigate to definitions, references, and symbol searches within your codebase.
- **Debugging Support**: Integrated debugging support for Node.js and Python, with breakpoints, call stacks, and interactive consoles.
- **Terminal Access**: Built-in terminal access to run commands, scripts, and version control operations.
## Collaboration Features
Code-server includes features to support collaboration:
- **Live Share**: Collaborate in real-time with others, sharing your code and terminal sessions.
- **ChatGPT Integration**: AI-powered code assistance and chat-based collaboration.
## Security Considerations
When using code-server, consider the following security aspects:
- **Password Management**: The default password is securely generated. Do not share it or expose it in public repositories.
- **Network Security**: Ensure that your firewall settings allow access to the code-server port (default: 8080) only from trusted networks.
- **Data Privacy**: Be cautious when uploading sensitive data or code to the server. Use environment variables or secure vaults for sensitive information.
For more detailed information on configuring and using code-server, refer to the official [code-server documentation](https://coder.com/docs/).