Sleepy CLI
sleepy is a terminal-native AI coding agent. It reads and writes code, runs
commands, manages Git, drives LSP diagnostics, and carries persistent memory
across sessions — with named specialist agent personas for different kinds of
work.
It talks to the Sleepy gateway (or any mainstream provider you point it at), and its usage lands in the same pool as the API, the chat app, and the VS Code extension.
Install
# macOS / Linux
curl -fsSL https://www.sleepyai.org/install | bash
# Windows (PowerShell)
irm https://www.sleepyai.org/install.ps1 | iex
# Or via npm
npm i -g @sleepy-ai/cli
The install script pulls the release matching your OS/arch from GitHub
Releases (sleepy-darwin-arm64, sleepy-linux-x64, …) and drops the sleepy
binary on your PATH. Pin a version with SLEEPY_VERSION=x.y.z, or grab a
specific release from
github.com/TahsinArafat/sleepy-code/releases.
Run sleepy to start.
Log in
On first launch the CLI uses an OAuth device flow: it shows a code and a URL; you open the URL, sign in to sleepyai.org, approve, and the CLI receives a token. No API key to paste, and no static key sitting on disk.
sleepy login
The token works against the same /api/v1 gateway and the same usage pool as a
virtual key. If a session is revoked or expires, the CLI tells you to log in
again.
Channels
On launch you can choose a channel:
- Sleepy Auto — zero configuration, uses the hosted gateway (free for a limited time).
- Sleepy Platform — OAuth login against sleepyai.org.
- Your own provider — point the CLI at any OpenAI-compatible endpoint with your own key.
Capabilities
- Reads/writes code, runs commands, manages Git, surfaces LSP diagnostics
- Persistent memory across sessions, snapshot/rollback, worktrees
- MCP servers, plugins, skills, and workflows
- Multi-provider LLM support — Sleepy's gateway or any mainstream provider
- ACP server, headless
sleepy run,sleepy serveHTTP API,generate,export/import - IDE awareness — detects a VS Code terminal and lets you compose prompts
in your external
$EDITOR(/editor, orCtrl+X E)
Specialist personas
Named agent personas (Apex, Phantom, Pivot, Forge, Stack, Plan, Compose) with dynamic, context-preserving agent switching — pick the right specialist for the job instead of a generic "build/plan/compose".
Usage & limits
CLI requests are metered exactly like API requests and appear in
Dashboard → Usage under source
cli. The same RPM, rolling 5h/24h/weekly windows, monthly allowance, free-
model daily budget, and extra credits apply — see
Usage limits.
Download
sleepyai.org/download — the page also lists the latest release version and date.
Next: VS Code extension · SleepyAI Chat