Skip to content

Commit 729161f

Browse files
committed
docs: add CLAUDE.md
1 parent 665d820 commit 729161f

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
This is a GitHub Action that installs and configures mise, a polyglot runtime manager. The action is written in TypeScript and published to the GitHub Actions marketplace.
8+
9+
## Development Commands
10+
11+
```bash
12+
# Install dependencies
13+
npm install
14+
15+
# Build, format, lint, and package
16+
npm run all
17+
18+
# Individual commands
19+
npm run format:write # Format code with Prettier
20+
npm run lint # Run ESLint and format check
21+
npm run package # Bundle with ncc for distribution
22+
23+
# Testing
24+
npm run all # Run full build pipeline
25+
./scripts/test.sh # Integration test script
26+
```
27+
28+
## Architecture
29+
30+
The action follows GitHub's standard TypeScript action structure:
31+
32+
1. **Entry Point**: `src/index.ts` - Main action logic that:
33+
- Downloads and installs mise binary
34+
- Manages caching through GitHub Actions cache
35+
- Configures environment variables (MISE_*, GITHUB_TOKEN)
36+
- Runs mise commands (install, reshim, etc.)
37+
- Exports mise environment variables to GITHUB_ENV
38+
39+
2. **Distribution**: `dist/index.js` - Compiled and bundled output (must be committed)
40+
41+
3. **Action Definition**: `action.yml` - Defines inputs, outputs, and metadata
42+
43+
## Key Implementation Details
44+
45+
- **Cache Management**: Uses content-addressable caching based on mise config files (.mise.toml, .tool-versions, etc.)
46+
- **Binary Download**: Supports downloading from GitHub releases or mise.jdx.dev
47+
- **Platform Support**: Handles Linux (glibc/musl), macOS, and Windows
48+
- **Environment Setup**: Automatically adds mise bin and shims directories to PATH
49+
- **GitHub API**: Uses GITHUB_TOKEN to avoid rate limits when installing GitHub-hosted tools
50+
51+
## Important Notes
52+
53+
- Always run `npm run all` before committing to ensure dist/ is updated
54+
- The dist/ folder must be committed as GitHub Actions runs the compiled code
55+
- Test changes using the action itself (uses: ./) in test workflows

0 commit comments

Comments
 (0)