Get Started Contributing

Set up your local environment to contribute to maltty.

Prerequisites

Steps

1. Fork and clone

gh repo fork thebytefarm/maltty --clone
cd maltty

2. Install dependencies

pnpm install

3. Verify the build

Run the full CI check suite to confirm everything works:

pnpm lint && pnpm format && pnpm typecheck

4. Run tests

pnpm test

5. Understand the project

Read the project docs in this order:

  1. CLAUDE.md -- tech stack, project structure, available commands
  2. contributing/concepts/architecture.md -- system layers, packages, and data flow
  3. contributing/concepts/cli.md -- commands, context, middleware, and error flow
  4. Relevant standards in contributing/standards/ as needed

6. Set up Claude Code (optional)

The repo includes built-in configuration for Claude Code:

FilePurpose
CLAUDE.mdPersona, project structure, tech stack, and commands
.claude/settings.jsonPostToolUse hooks that auto-format and lint TypeScript files on save
.claude/rules/typescript.mdFunctional programming rules Claude follows for all packages/**/*.ts files

Verification

Confirm all checks pass:

pnpm lint && pnpm format && pnpm typecheck
pnpm test

Troubleshooting

pnpm not found

Issue: Running pnpm returns "command not found."

Fix:

corepack enable

Lockfile mismatch after switching branches

Issue: Build or install fails after checking out a different branch.

Fix:

pnpm install

Lefthook hooks fail on commit or push

Issue: Git hooks block your commit or push with lint/format/typecheck errors.

Fix: Fix the reported issues and re-commit. The hooks run automatically via Lefthook -- see lefthook.yml for the full hook configuration.

References