Product6 min readMay 4, 2026

Introducing the 5am CLI: Your Media Hub from the Terminal

Upload, organize, and generate media without leaving the command line. Built for scripts, automations, and AI agents.

5

5AM Team

Writer & Creative

Introducing the 5am CLI: Your Media Hub from the Terminal

Introducing the 5am CLI

The web app is great when you want to browse and edit. But sometimes you have ten thousand photos on a backup drive, a script that needs to drop renders into an album every night, or an AI agent that should be able to manage your media library on your behalf. For those moments, opening a browser is the wrong tool.

Today we're shipping the 5am CLI — a single Go binary that gives you the full Media Hub from your terminal. It's JSON-by-default, exit-code-aware, and built so the next thing you pipe its output into can be jq, a shell loop, or an AI agent.

What you can do

# Albums
5am albums list
5am albums create --name "Trip 2026"

# Upload a whole directory recursively, filtered to images and videos
5am media upload ./photos -r --include '*.jpg,*.mp4' --album <id> --concurrency 8

# Download an entire album to a local folder
5am albums download <id> --output ./trip --concurrency 8

# Generate media from a prompt
5am media generate image --prompt "a cybernetic owl at dawn" --output owl.png
5am media generate video --prompt "a flowing river in autumn" --output river.mp4

That's the surface area. Underneath, the CLI uses presigned upload URLs (no client-side size limits on video), parallelizes uploads and downloads with a worker pool, and streams progress to stderr so you can pipe results without garbage in your JSON.

Built for scripts

A few decisions we made deliberately:

  • stdout is JSON. Every command returns a parseable manifest. --pretty is opt-in for humans.
  • stderr is progress. Per-file upload and download messages go here so 5am ... | jq stays clean.
  • Exit codes mean something. 2 for auth, 3 for validation, 4 for network, 5 for server. Branch on them in your scripts instead of grepping log lines.
  • --yes skips prompts so destructive ops can run unattended.

A typical "back up this directory to a new album" script ends up being three lines:

ALBUM=$(5am albums create --name "Backup $(date +%F)" | jq -r .id)
5am media upload ./incoming -r --include '*.jpg,*.mp4,*.mov' --album "$ALBUM" --concurrency 8
echo "Done — view at https://5am.app/album/$ALBUM"

AI characters from the command line

The CLI also unlocks the parts of 5AM that work best when something else is driving — your AI Characters.

Every character has its own scoped CLI token (read / write / admin), its own enabled skills, and its own optional webhooks. From the terminal you can:

# Spin up a character with a profile, skills, and scopes
5am characters create \
  --name "Pico" \
  --communication-style "friendly and concise" \
  --skills get_album_images,fetch_media \
  --scopes read,write

# Chat with it — one-shot, REPL, or with persistent history
5am characters chat <id> "what's on my schedule today?"
5am characters chat <id> "create a summary of my recent uploads" --history /tmp/chat.json

# Or let an external system drive it via webhooks
5am characters webhooks create <id> --url https://example.com/hooks/5am --events chat,skill

Skills are scope-checked at execution time, so a read-only character can't suddenly delete an album because the prompt told it to. And --active false is a kill switch that disables the character's token at the platform layer in seconds.

Built for AI agents

The CLI ships with a SKILL.md file that drops straight into Claude Code, Gemini CLI, or any tool that follows the Agent Skills standard. Once installed, an agent can recognize prompts like "upload these photos to a new album" or "show me what's in my Trip 2026 album" and reach for the 5am binary on its own — no glue code required.

If you've ever wanted an agent that can actually manage a media library instead of just talking about one, this is the missing piece.

Local skills, real local access

When you chat with a character, the CLI gives it a set of local skills that run on your machine — read a file, write a file, run a shell command, process video with FFmpeg, generate an image and save it directly to a path you choose. Destructive operations (rm, etc.) prompt for approval; you can pass --auto-approve if you want the character to work autonomously on safe operations.

The result is an agent that can do real work: "render a thumbnail from intro.mp4 and upload it to my Trip album," "transcribe the audio from meeting.wav and save the text," "generate ten variations of this prompt and save them to ./variants/."

Getting started

Prebuilt binaries live at cli.5am.app/cli/latest/. Pick the one for your machine:

# macOS (Apple Silicon)
curl -L -o 5am https://cli.5am.app/cli/latest/5am-darwin-arm64
chmod +x 5am && sudo mv 5am /usr/local/bin/

# macOS (Intel)
curl -L -o 5am https://cli.5am.app/cli/latest/5am-darwin-amd64
chmod +x 5am && sudo mv 5am /usr/local/bin/

# Linux (amd64)
curl -L -o 5am https://cli.5am.app/cli/latest/5am-linux-amd64
chmod +x 5am && sudo mv 5am /usr/local/bin/

# Linux (arm64)
curl -L -o 5am https://cli.5am.app/cli/latest/5am-linux-arm64
chmod +x 5am && sudo mv 5am /usr/local/bin/

# Windows (PowerShell)
Invoke-WebRequest https://cli.5am.app/cli/latest/5am-windows-amd64.exe -OutFile 5am.exe

Then mint a token in the web UI (Settings → CLI Access Tokens → Generate) and log in:

5am login
5am whoami        # confirm
5am albums list
5am account --pretty

Want an agent to drive the CLI for you? The companion SKILL.md drops straight into ~/.claude/skills/5am/SKILL.md (or your Gemini-CLI equivalent).

Full installation instructions, integrity-verification, all download links, and the agent skill file live on the CLI page.

If you're scripting against the CLI and you hit something rough, let us know — early adopters shape the roadmap more than anyone else.

Welcome to the terminal. Get the CLI →

Tags

#cli#automation#ai-agents#workflow

Related Posts

Ready to Create?

Join thousands of creators who use 5AM to bring their artistic vision to life.

Start Creating