{"id":51512003,"url":"https://github.com/helmedeiros/amp","last_synced_at":"2026-07-08T07:30:35.470Z","repository":{"id":8909863,"uuid":"10634636","full_name":"helmedeiros/amp","owner":"helmedeiros","description":"A terminal player for Apple Music on macOS — a Go CLI (am) that controls Music.app via AppleScript.","archived":false,"fork":false,"pushed_at":"2026-07-07T07:46:30.000Z","size":268,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-07-07T09:12:13.391Z","etag":null,"topics":["applescript","bash","cli","itunes","macos","shell"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helmedeiros.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-06-12T01:54:59.000Z","updated_at":"2026-07-07T07:46:32.000Z","dependencies_parsed_at":"2022-07-08T03:35:30.799Z","dependency_job_id":null,"html_url":"https://github.com/helmedeiros/amp","commit_stats":null,"previous_names":["helmedeiros/amp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/helmedeiros/amp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmedeiros%2Famp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmedeiros%2Famp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmedeiros%2Famp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmedeiros%2Famp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helmedeiros","download_url":"https://codeload.github.com/helmedeiros/amp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmedeiros%2Famp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35257082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["applescript","bash","cli","itunes","macos","shell"],"created_at":"2026-07-08T07:30:34.470Z","updated_at":"2026-07-08T07:30:35.457Z","avatar_url":"https://github.com/helmedeiros.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amp\n\nA terminal player for **Apple Music** on macOS: control playback and read what's\nplaying straight from the console — handy for hotkeys, remote shells, or\nscripting your music without leaving the keyboard.\n\n`amp` treats **Music.app as the engine** and drives it through AppleScript, so\nthere's no playback daemon to run and nothing to configure. The CLI binary is\n`amp`.\n\n## Install\n\nRequires Go 1.26+ and macOS with Music.app.\n\n```sh\ngo install github.com/helmedeiros/amp/cmd/amp@latest\n```\n\nOr build from a clone:\n\n```sh\ngit clone https://github.com/helmedeiros/amp.git\ncd amp\nmake build      # produces ./bin/amp\n```\n\n## Usage\n\n```sh\namp status            # show what's playing (add --json for scripts)\namp now               # the current track on one line\namp artwork -o cover.jpg   # save the current album art to a file\n\namp open              # launch Apple Music\namp play              # resume playback\namp play \"Discovery\"  # play a playlist, album, or search match (Tab-completes names)\namp pause\namp toggle            # play/pause\namp stop\namp next\namp prev\n\namp vol 60            # set volume to 60%\namp vol +10           # raise by 10\namp vol -10           # lower by 10\namp vol up | down     # ±10\namp mute              # silence, remembering the level\namp unmute            # restore it\n\namp shuffle           # toggle shuffle\namp shuffle on | off\namp repeat off | one | all\n\namp search daft punk        # search the library (--limit N, --json)\namp queue                   # show the play queue (--json)\namp queue add daft punk     # append search results without playing (--limit N)\namp queue clear             # empty the queue\namp playlists               # list your playlists (--json)\namp library artists         # distinct artists (--json)\namp library albums          # distinct albums (--json)\n\namp --version\n```\n\nRun `amp --help` for the full command list.\n\n`amp status` colorizes its output when writing to a terminal (the state word is\ncolored, labels are dimmed). Color is disabled automatically when the output is\npiped or redirected, and can be turned off explicitly with `--no-color` or the\n`NO_COLOR` environment variable. To keep color under `watch`, use\n`watch --color -n1 amp status`.\n\n## Daemon (optional)\n\n`amd` is a background daemon that polls Music.app and, over a Unix socket,\nserves the cached status and pushes change events. Run it and `amp status` /\n`amp now` are served from the cache almost instantly instead of querying\nMusic.app each time — handy under `watch`. When the daemon isn't running, amp\nfalls back to direct access automatically; nothing else changes.\n\n```sh\namd \u0026          # start the daemon (Ctrl-C or kill to stop)\namp status     # now served from the cache (~instant)\n```\n\n## TUI\n\n`amp tui` opens a full-screen live interface:\n\n- A now-playing header — state, track, progress bar, volume — that updates live\n  from the daemon's event stream (or polls when `amd` isn't running).\n- Tabs: **Queue, Playlists, Artists, Albums, Search** — switch with `Tab` /\n  `Shift-Tab` or number keys `1`–`5`.\n- `j`/`k` move, `Enter` plays the highlighted item, `space` toggles play/pause,\n  `/` types a search query, `r` refreshes, `q` quits.\n\n```sh\namd \u0026        # optional: event-driven updates\namp tui\n```\n\n## Shell completion\n\n`amp` generates completion scripts for bash, zsh, fish, and PowerShell. The zsh\nand bash scripts complete commands, flags, and arguments dynamically.\n\n```sh\n# zsh — place on your fpath (a directory compinit reads), then restart your shell\namp completion zsh \u003e \"${fpath[1]}/_amp\"\n\n# bash\namp completion bash | sudo tee /etc/bash_completion.d/amp \u003e/dev/null\n\n# fish\namp completion fish \u003e ~/.config/fish/completions/amp.fish\n```\n\nSee `amp completion --help` for per-shell details.\n\n## Architecture\n\n`amp` is built with a hexagonal (ports \u0026 adapters) architecture in Go:\n\n- **`internal/music`** — pure domain: player state, volume, repeat mode, track,\n  status.\n- **`internal/port`** — the ports: `Player` and `VolumeStore` (driven),\n  `Controller` (driving).\n- **`internal/app`** — the application service (use cases).\n- **`internal/adapter`** — the edges: `applescript` (the Music.app engine via\n  `osascript`), `store` (file-backed volume state), and `cli` (the command\n  tree).\n- **`cmd/amp`** — wiring.\n\nArchitectural decisions are recorded in [`docs/adr/`](docs/adr/). The design\nkeeps `osascript` behind a single seam, so the logic is covered by a wide base\nof fast unit tests with a thin layer of integration tests against the real\nbinary (`make integration`, requires Music.app).\n\n## Development\n\n```sh\nmake ci            # format check, vet, lint, race-enabled tests\nmake test          # tests only\nmake integration   # osascript integration tests (needs Music.app)\nmake build         # build ./bin/amp\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelmedeiros%2Famp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelmedeiros%2Famp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelmedeiros%2Famp/lists"}