Skip to content

Commit 2424a50

Browse files
docs: add CLAUDE.md for Claude Code guidance
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 488dd3e commit 2424a50

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

CLAUDE.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
ossin is a Python CLI utility that displays system information (OS, Python environment, platform) using Rich for terminal output. Built with Typer, it supports table, panel, and JSON output formats.
8+
9+
## Development Commands
10+
11+
```bash
12+
uv sync # Install dependencies
13+
uv run ossin # Run the CLI
14+
uv run ossin --format json # Run with JSON output
15+
uv run pytest # Run tests
16+
```
17+
18+
### Linting & Type Checking (CI runs these on Ubuntu only)
19+
20+
```bash
21+
uv run ruff check src tests # Lint
22+
uv run ruff format --check . # Format check
23+
uv run mypy # Type check (strict mode)
24+
uv run ty check # Type check with ty
25+
uv run pyrefly check # Type check with pyrefly
26+
uv run pyright # Type check with pyright
27+
uv run vulture src tests # Dead code detection
28+
uv run validate-pyproject pyproject.toml
29+
```
30+
31+
## Architecture
32+
33+
- `src/ossin/core.py``SystemInfo` TypedDict and `get_system_info()` function (stdlib only: `platform`, `sys`)
34+
- `src/ossin/cli.py` — Typer app with three output renderers (table, panels, JSON) using Rich
35+
- `src/ossin/__main__.py` — Entry point, imports and runs `cli.app`
36+
- Version is dynamic from VCS via hatch-vcs, generated into `src/ossin/_version.py` at build time
37+
38+
## Code Style
39+
40+
- **Ruff** with ALL rules selected, preview mode, unsafe fixes enabled. Ignored rules: B008, COM812, FBT001, FBT003
41+
- No relative imports allowed (`ban-relative-imports = "all"`)
42+
- McCabe complexity limit: 4
43+
- Docstring convention: PEP 257
44+
- All type checkers run in strict/error-on-warning mode
45+
- Target Python version: 3.10
46+
47+
## CI/CD
48+
49+
- PR titles must follow **Conventional Commits** format (enforced by check-pr-title workflow)
50+
- CI runs linters/type-checkers on Ubuntu only; runs the CLI on all three platforms (Ubuntu, macOS, Windows)
51+
- CD publishes to PyPI via trusted publishing on GitHub release, then triggers Homebrew and Scoop manifest updates

0 commit comments

Comments
 (0)