quit # Kill specific
pkill -f "SCREEN.*claudeman" # Kill all
```
---
## FAQ
**Q: How long can sessions run?**
A: 24+ hours. Buffer management keeps memory stable.
**Q: Does it work with Claude Code hooks?**
A: Yes! Claudeman spawns real Claude CLI processes.
**Q: Can I run multiple sessions?**
A: Yes, up to 50 concurrent sessions.
**Q: What if the server restarts?**
A: Screen sessions persist and auto-restore.
**Q: How does token counting work?**
A: Parses Claude's status line (e.g., "123.4k tokens").
**Q: Custom completion phrases?**
A: Yes! Use `--completion` flag or `PHRASE`.
---
## Development
### Setup
```bash
npm install
npx tsx src/index.ts web # Dev mode
npm run build # Production
npx tsc --noEmit # Type check
```
### Testing
```bash
npm run test # All tests (195)
npm run test:watch # Watch mode
npm run test:coverage # Coverage
npx vitest run -t "name" # By pattern
```
### Test Ports
| Port | Test File |
|------|-----------|
| 3099 | quick-start.test.ts |
| 3102 | session.test.ts |
| 3105 | scheduled-runs.test.ts |
| 3107 | sse-events.test.ts |
| 3110 | edge-cases.test.ts |
| 3115 | integration-flows.test.ts |
| 3120 | session-cleanup.test.ts |
---
## Contributing
1. Fork the repository
2. Create feature branch (`git checkout -b feature/amazing`)
3. Write tests for new functionality
4. Ensure tests pass (`npm test`)
5. Commit with conventional commits (`feat:`, `fix:`, `docs:`)
6. Open Pull Request
### Code Style
- TypeScript strict mode
- ES2022 target, NodeNext modules
- Pre-compile regex patterns
---
## License
MIT License - see [LICENSE](LICENSE) for details.
---
## Acknowledgments
- [Claude Code](https://claude.ai/code) by Anthropic
- [xterm.js](https://xtermjs.org/) for terminal rendering
- [Fastify](https://fastify.io/) for the web server
- [node-pty](https://github.com/microsoft/node-pty) for PTY
- [GNU Screen](https://www.gnu.org/software/screen/) for persistence
---
Made with care for autonomous AI development