Thank you for your interest in contributing to Keycode! This document provides guidelines and information for contributors.
- Fork the repository
- Clone your fork:
git clone https://github.com/<your-username>/keycode.git - Install dependencies:
npm install - Create a branch:
git checkout -b my-feature
Run in dev mode (no build step needed):
npx tsx src/cli.tsx decks/sample-deckBuild:
npm run buildRun tests:
npm testkeycode # Bash entry-point script
src/ # TypeScript source
cli.tsx # CLI entry, file watcher, render root
PresentationApp.tsx # Main presentation component
parser.ts # Slide parsing pipeline
types.ts # Shared type definitions
*Tag.ts # Tag extraction modules (one per slide tag)
layout.ts # Terminal layout engine
renderSlide.ts # Slide text rendering
test/ # Test files (*.test.ts)
decks/ # Deck directories (.sld files + optional .index + images/)
macos/ # macOS native Swift overlays
REFERENCE.md # Complete slide format documentation
CONVENTIONS.md # Code conventions and standards
Please read CONVENTIONS.md before writing code. Key points:
- TypeScript strict mode -- no
any, explicit types for function parameters and return types - ES modules -- use
.jsextensions in imports - No default exports -- always use named exports
- No classes -- purely functional code with React function components
- Style -- 2-space indentation, single quotes, semicolons, no trailing commas
- Tests -- Node.js built-in test runner (
node:testandnode:assert/strict)
- Create
src/<name>Tag.tswith anextract<Name>function - Wire it into the parser chain in
src/parser.ts - Add tests in
test/<name>Tag.test.ts - Document the tag in
REFERENCE.md - Update
CHANGELOG.md
- Make sure all tests pass:
npm test - Make sure TypeScript compiles:
npm run build - Write clear commit messages that explain why, not just what
- Open a pull request against
master - Fill out the pull request template
Open an issue using the Bug Report template. Include:
- Steps to reproduce
- Expected vs actual behavior
- Terminal output or screenshots
- Your environment (OS, Node.js version, terminal app)
Open an issue using the Feature Request template. If proposing a new slide tag, include an example of the .sld syntax you'd like to use.
By contributing, you agree that your contributions will be licensed under the MIT License.