The 5am CLI
Your media hub from the terminal. Single Go binary. JSON-by-default. Built for scripts, automations, and AI agents.
Latest: v1.2.2·Released Sep 5, 2026
Quick install
Install or upgrade the 5am CLI on macOS or Linux with a single command. The script detects your platform and architecture automatically.
# Install or upgrade the 5am CLI (macOS and Linux)
curl -fsSL https://cli.5am.app/cli/latest/install.sh | shDownload
Every binary is stripped, statically linked (CGO_ENABLED=0), and ~14 MB. Verify each download against its .sha256 file.
sha256
03856d673ed1743320622c9f23e99f1e192ef87d26c70f6073cdae09f8a04530sha256
c96eff512b28657095287e9898729700eb854ab25543a7e8176214ab180ace29sha256
a67510ec93e2d032a75fe8a2a6b22e8f0c70e415fa475229cb0da464a182c0c9sha256
7fafd97c18e6f4b5feb27e57cc28122b9712952331a5324381bef9d2654b0af4sha256
f32181fce86e5464e36dfc500c1fff25a93d63bf9910bb8f71ddce862d9bf63aVerify integrity
Each binary has a published .sha256 file alongside it. After downloading, confirm the hash matches:
curl -sS https://cli.5am.app/cli/latest/5am-darwin-arm64.sha256 | shasum -a 256 -c
# → 5am-darwin-arm64: OKFull machine-readable manifest with sizes, hashes, and version metadata: manifest.json
Use it with an AI agent
The CLI ships with a companion SKILL.md that follows the Agent Skills open standard. Drop it into Claude Code, Gemini CLI, or any compatible tool, and the agent will recognize prompts like “upload these photos to a new album” and reach for the 5am binary on its own.
# Claude Code (personal — applies to all projects)
mkdir -p ~/.claude/skills/5am
curl -L https://cli.5am.app/cli/latest/SKILL.md -o ~/.claude/skills/5am/SKILL.md
# Or project-local (gets committed alongside your code)
mkdir -p .claude/skills/5am
curl -L https://cli.5am.app/cli/latest/SKILL.md -o .claude/skills/5am/SKILL.mdFirst steps
Mint a token in the web UI (Settings → CLI Access Tokens → Generate), then:
5am login # paste the token at the prompt
5am whoami # confirm
5am albums list
5am account --pretty
# Upload a directory recursively
5am media upload ./photos -r --include '*.jpg,*.mp4' --album <id> --concurrency 8
# Download an entire album
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.png5am studio / media clips), edit rendering, and AI descriptions for video/audio. Grab it from ffmpeg.org/download.html (or brew install ffmpeg on macOS); the CLI finds it on your PATH, or point at a binary with --ffmpeg / $FFMPEG.Example use cases
Cut a long video into Shorts — free, on your machine
Clip Maker turns a talk, podcast, or stream into Shorts-ready clips with burned-in subtitles and AI titles. The heavy lifting runs on your computer through the CLI, so the source video never uploads and the feature is free — start the companion and drive it from the browser, or script it directly:
# The web workflow: run the companion, then open 5am.app/clip-maker
5am studio
# Or fully scripted: five 9:16 clips with subtitles → talk-clips/
5am media clips talk.mp4 --count 5 --brief "the product demo moments"Turn a podcast into a video
Made an episode in the Podcast Studio? The CLI ships a one-command helper, podcast_to_video.py, that turns your WAV into a shareable MP4 — either an animated waveform over your cover art, or AI-generated Veo b-roll whose scenes are written from your transcript so the visuals track the conversation. It burns in your transcript as synced captions either way. Stdlib-only Python, so it runs on macOS, Linux, and Windows; it just needs the 5am binary and a local ffmpeg.
# Download the helper alongside the CLI
curl -L https://cli.5am.app/cli/latest/podcast_to_video.py -o podcast_to_video.py
# Waveform video (instant, no AI): cover art + waveform + synced captions
python3 podcast_to_video.py -i episode.wav --visualize \
--cover cover.jpg -s episode.srt -a 9:16
# Or AI b-roll: Veo writes per-scene prompts from your transcript
python3 podcast_to_video.py -i episode.wav -s episode.srt -a 9:16 --clips 2Upload videos the apps can’t
The CLI is the only client that uploads videos up to 10 GB. Files over 2 GB are processed locally first — poster extraction and, when needed, a web-playable 1080p proxy. If the connection dies, run the same command again: already-uploaded parts are reused and only the missing pieces move.
5am media upload ./footage/interview-4k.mov --album "Shoots"
5am media upload ./festival-master.mov --album "Masters" --part-concurrency 8Back up local folders to 5AM
One command mirrors a directory tree into an album: recursive scan with include filters, a parallel worker pool, and JSON results per file — cron-friendly. Add --describe and every upload gets an AI description computed locally with your Gemini key (classifier tags for photos, an audio-track summary for video), so the backup is searchable the moment it lands.
5am media upload ~/Pictures/2026 -r --include '*.jpg,*.heic,*.mp4' \
--new-album "2026 Archive" --concurrency 8 --describeAsk your infrastructure questions
Deploy the CLI as a server agent on your NAS, render box, or web server, and your AI characters can answer questions about them in chat — “did last night’s exports finish?”, “how many people visited the portfolio today?” — computed on your machine, with raw logs and file inventories never leaving it. Outbound-only long-polling: no open ports, works behind NAT.
# On the server: ingest a log into a queryable dataset, then serve
5am data ingest --dataset requests --schema requests.schema.json \
--file /var/log/nginx/access.log --format combined
5am serve agent --name portfolioWhat’s in the box
JSON by default
Every command returns parseable JSON on stdout. Pipe to jq and chain.
Meaningful exit codes
2 auth, 3 validation, 4 network, 5 server. Branch on them.
Parallel uploads & downloads
Worker pool, presigned URLs, no client-side size limit on video.
AI characters & webhooks
Spin up scoped characters, chat with them, route their events to your services.
Local-machine skills
Read/write files, run commands, process video with FFmpeg — all local.
No dependencies
Single static binary. CGO_ENABLED=0. Drop it in /usr/local/bin and go.
Examples on GitHub
The scripts above are downloadable individually, but digvan/5am-cli collects them with the pieces that don’t fit in a single file — a systemd installer that puts a server agent under supervision, a metrics sampler with its schema, ready-made schemas for nginx logs, and a full server-agent deployment guide. Apache-2.0, so copy and adapt freely.
examples/install-agent.sh— writes and starts the systemd units so an agent survives rebootsexamples/sysmetrics.sh— one CPU/memory/disk sample per run, ready to ingestexamples/podcast_to_video.py— the helper above, with its test suiteSKILL.md— the agent reference, with install steps for Claude Code, Gemini CLI, and Codex
Need details? See the launch post or the full command reference.