Product6 min read•Published Updated

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

Product guides and release notes from 5AM Software Labs, the publisher of 5AM. Contact us with questions or corrections.

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

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 Go binary for library management, media processing, and supported AI workflows 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 YOUR_ALBUM_ID --concurrency 8

# Download an entire album to a local folder
5am albums download YOUR_ALBUM_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 (with route-specific limits and account storage quotas), 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:

  • JSON is the default for data commands. Streaming chat, formatted transcripts, and file-producing commands have their own output behavior. Check the command reference before piping stdout to a JSON parser. --pretty is available for readable data output.
  • 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.

For this Bash example, install jq, log in with a token that can create albums and upload media, and choose an existing input directory. Uploads use storage quota. The printed URL is the owner’s album URL; configure sharing separately. Stop on errors, then inspect the uploaded files before treating them as a backup:

set -euo pipefail
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 YOUR_CHARACTER_ID "what's on my schedule today?"
5am characters chat YOUR_CHARACTER_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 YOUR_CHARACTER_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. Use the character’s active setting to disable access when it is no longer needed; check running operations and token status separately.

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. Local skills have the permissions of the process running the CLI. Review approval prompts and enabled skills; a read-only library token does not make local shell commands read-only. Only enable automatic approval after checking its scope in the current command help.

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/."

Access, AI costs, and getting started

Local media processing can have additional dependencies such as FFmpeg. AI generation, transcription, and character conversations use AI credits or the configured provider key; they are not included merely because the CLI download is free. Characters also require an eligible plan. See pricing and record 5am --version when reporting a problem.

In the examples, replace YOUR_ALBUM_ID and YOUR_CHARACTER_ID with real IDs before running commands.

The easiest way to install or upgrade the 5am CLI on macOS and Linux is using our installation script:

curl -fsSL https://cli.5am.app/cli/latest/install.sh | sh

For Windows:

Invoke-WebRequest https://cli.5am.app/cli/latest/5am-windows-amd64.exe -OutFile 5am.exe
./5am.exe --version

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

Muse Has Its Own Computer. Give It the 5am CLI.
Product15 min read

Muse Has Its Own Computer. Give It the 5am CLI.

Meta's Muse agent works on its own cloud computer, with a terminal. Install the 5am CLI there and Muse can bring your Instagram posts into 5AM albums, share them, turn albums into reels, cut short clips, edit whole shoots, make motion films and run marketing campaigns for you.

5AM Team · Oct 4, 2026

Read more →

Creativity never sleeps.

Turn the 5 a.m. idea into shipped work. Store it, make it, sell it — in one place.

Start with 5 GB free

5 GB free · No card required