# jama-agent

Remote Agent CLI for the **Jama Security Platform** — a unified cybersecurity platform with AI.

## Install

```bash
pip install jama-agent
```

## Quick Start

```bash
# 1. Login to your Jama server
jama-agent login --server https://your-jama-server.com --email you@company.com

# 2. Check connection status
jama-agent status

# 3. Connect via persistent WebSocket
jama-agent connect

# 4. Discover local network (from another terminal)
jama-agent discover

# 5. Disconnect
jama-agent disconnect
```

## Commands

| Command | Description |
|---------|-------------|
| `login` | Authenticate against a Jama server |
| `status` | Show current connection info |
| `connect` | Establish persistent WebSocket connection |
| `disconnect` | Clear credentials and disconnect |
| `discover` | Discover hosts on the local network (ARP + ping sweep) |
| `forward` | Port forwarding and SOCKS5 proxy via reverse tunnel |
| `tunnels` | List active tunnels |
| `version` | Show CLI version |

## Requirements

- Python 3.10+
- Access to a Jama Security Platform server

## Network Discovery

```bash
# Auto-detect subnet and scan ARP table
jama-agent discover

# Specify subnet
jama-agent discover --subnet 192.168.1

# Full ping sweep (slower but thorough)
jama-agent discover --ping
```

## SOCKS5 Tunnel

```bash
# Start a SOCKS5 proxy through the Jama tunnel
jama-agent forward --socks --socks-port 1080

# Then use with any tool:
export ALL_PROXY=socks5://127.0.0.1:1080
proxychains4 nmap -sV 10.0.0.0/24
```

## Configuration

Config is stored in `~/.jama/`:
- `config.yaml` — Server URL, heartbeat interval, agent name
- `credentials.json` — JWT tokens and agent ID (permissions 0600)

## License

Proprietary - Jama Security Platform
