CLI Reference

Complete guide to the tinycrab command-line interface.

spawn

Create and start a new agent.

tinycrab spawn <agent-id> [options]

Options:
  --port, -p     Port for HTTP server (default: auto)
  --provider     LLM provider (default: openai)
  --model, -m    Model to use

chat

Send a message to an agent.

tinycrab chat <agent-id> [message] [options]

Options:
  --session, -s  Continue existing session
  --interactive, -i  Interactive mode

list

List all agents.

tinycrab list

stop

Stop an agent (keeps files).

tinycrab stop <agent-id>

cleanup

Stop agent and delete all files.

tinycrab cleanup <agent-id>

HTTP API

Each spawned agent runs an HTTP server. You can communicate with it directly:

$ tinycrab spawn my-agent
# → Server running on port 9000

$ curl -X POST http://localhost:9000/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello"}'
# → {"response": "Hello! How can I help?",
#    "session_id": "session-a1b2c3d4"}