Thanks for your interest in contributing to clsh! This guide will help you get set up and understand how we work.
Not a contributor? Just want to use clsh? Run
npx clsh-devand you're done. See the README for details.
git clone https://github.com/my-claude-utils/clsh
cd clsh
cp .env.example .env # Add your NGROK_AUTHTOKEN
npm install # Installs all workspace deps + compiles node-pty
npm run dev # Starts agent + web in parallel via TurborepoThe agent runs on http://localhost:4030 and the web frontend on http://localhost:4031.
clsh/
├── packages/
│ ├── agent/ # Backend — PTY manager, WebSocket server, auth, ngrok tunnel
│ ├── web/ # Frontend — React + xterm.js + MacBook Pro UI
│ └── cli/ # CLI wrapper — bootstraps and manages the agent
├── apps/
│ └── landing/ # Landing page at clsh.dev (static HTML)
├── turbo.json # Turborepo task configuration
└── package.json # Root workspace config
- Agent (
packages/agent): Usestsx watchfor auto-reload on file changes - Web (
packages/web): Uses Vite with HMR for instant updates - WebSocket proxy: Vite dev server proxies
/wsto the agent on port 4030 - Turborepo:
npm run devruns both in parallel;npm run buildbuilds in dependency order
- TypeScript: Strict mode enabled in all packages
- Prettier: Auto-formats on save — config in
.prettierrc- No semicolons, single quotes, trailing commas, 100 char width
- ESLint: Flat config (
eslint.config.js) withtypescript-eslintstrict rules - EditorConfig: 2-space indent, LF line endings, UTF-8
Run checks locally:
npm run lint # ESLint across all packages
npm run typecheck # TypeScript type checking
npm run format:check # Prettier formatting check
npm run build # Full buildWe use Conventional Commits:
feat:— New featurefix:— Bug fixdocs:— Documentation changeschore:— Maintenance, dependency updatesrefactor:— Code restructuring without behavior changetest:— Adding or updating testsstyle:— Formatting, whitespace (no code change)
Examples:
feat: add mobile tab navigation for terminal panes
fix: prevent WebSocket reconnect loop on auth failure
docs: add ngrok setup instructions to README
feat/description— New featuresfix/description— Bug fixesdocs/description— Documentation
- Create a branch from
mainusing the naming convention above - Write a clear description of what changed and why
- Include a testing checklist — what did you test manually?
- Add screenshots for any UI changes
- Ensure CI passes — lint, typecheck, and build must all succeed
- Keep PRs focused — one feature or fix per PR
- Unit tests: Vitest — run with
npm run test - E2E tests: Playwright — for browser-based testing
- Tests live alongside source code in
__tests__/directories or as*.test.tsfiles
Open a GitHub issue with:
- Your environment (OS, Node version, browser)
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
Open a GitHub issue describing:
- The problem you're trying to solve
- Your proposed solution
- Any alternatives you've considered
- GitHub Issues: For bugs and feature requests
- Discord: For questions and discussion (link in README)
By contributing, you agree that your contributions will be licensed under the MIT License.