chaiterm
v0.0.7
Published
Access your terminal from anywhere - CLI tool for chaiterm
Maintainers
Readme
chaiterm CLI
Command-line tool for accessing your terminal from anywhere.
⚠️ Under Development
This package is currently under active development and is not ready for production use. Features may be incomplete, unstable, or subject to breaking changes. Use at your own risk.
Installation
npm install -g chaitermCommands
chaiterm init
Authenticate and initialize configuration.
chaiterm initchaiterm start
Start terminal access - connects your local PTY to the gateway.
chaiterm startOnce connected, access your terminal at: https://chaiterm.com/terminals
chaiterm expose <port>
Expose a local port to the internet.
chaiterm expose 3000Your app will be available at a random subdomain like: https://k7x9m2.chaiterm.com
chaiterm status
Show current connection status and configuration.
chaiterm statuschaiterm logout
Clear stored credentials.
chaiterm logoutchaiterm kill
Kill all running chaiterm processes (useful when PTY instances get stuck).
chaiterm killArchitecture
The CLI wraps two components:
- pty-client - Connects to
chaiterm.com/ws/ptyvia WebSocket, spawns local PTY - frp-wrapper - Wraps frpc binary for port exposure tunnels
Configuration
Config is stored in ~/.config/chaiterm/config.json (or platform equivalent).
Using Custom Config Files
Use the --config (or -c) flag to specify a different config file:
# Use a local development config
chaiterm --config ./local-config.json start
# Use a specific config file
chaiterm -c ~/.config/chaiterm/dev.json statusConfig File Format
{
"email": "[email protected]",
"gatewayUrl": "wss://chaiterm.com/ws/pty",
"frpServerAddr": "frp.chaiterm.com",
"frpServerPort": 7000
}| Field | Description | Default |
|-------|-------------|---------|
| email | Your email for terminal access | (required) |
| gatewayUrl | Terminal gateway WebSocket URL | wss://chaiterm.com/ws/pty |
| frpServerAddr | frp server address | frp.chaiterm.com |
| frpServerPort | frp server port | 7000 |
Requirements
- Node.js 18+
- For port exposure: frpc binary (install via
brew install frpcon macOS)
Development
# Install dependencies
bun install
# Build
bun run build
# Watch mode
bun run devLocal Development
To test CLI against a local server:
cd packages/cli
# 1. Create a local config file
echo '{
"email": "[email protected]",
"gatewayUrl": "ws://localhost:3000/ws/pty"
}' > local-config.json
# 2. Build and run with the local config
bun run build
node dist/bin/chaiterm.mjs --config ./local-config.json startTesting Remote Server
To test against the production server, use the default config (no --config flag):
node dist/bin/chaiterm.mjs start