pspcli
v0.3.0
Published
Set up a PSP from the terminal: find the stick, install movies, music and games with proper metadata.
Maintainers
Readme
pspcli
Set up a PSP from the terminal. Finds the memory stick, then installs games, movies and music into the folders the PSP actually reads — with real titles, tags and thumbnails.
npx pspcliNo install, no config. Plug the PSP in with USB mode on and run it.
pspcli 0.2.3 /media/rika/PSP · ✔ FAT32
█████░░░░░░░░░░░░░░ 14% 198.9 GB free │ ◆ 4 ▶ 2 ♪ 31
────────────────────────────────────────────────────────
▌ ◇ Stick │ running · 2 waiting · about 25 min left
▌ ▤ Files │ ████████░░░░░░░░░░░░░░░░░░░░░░░░░ 26% started 11:04
▌ ≡ Queue ⠋ 3 │
▌ ↓ Import 2 │ ▌ ⚠ Encoding 2 films · ~3 h 10 min of video
▌ + Doctor ✔ │ ▌ it gets slow, hot and loud. keep it plugged in.
▌ ⚙ Settings │
│ ── now ────────────────────────────────────────────
running │ ▌ ▶ ▶ Arrival (2016) ███████████░░░░░░░░░░░ 52%
⠋ 1 of 3 │ ▌ encode 1000 kbps …(2016).MP4 ~11 min left
~25 min │ ▌ audio eng 6ch ‹2/3› │ subs eng · burned in ‹1/4›
│ ── waiting ────────────────────────────────────────
│ ▌ · ▶ Blade Runner (1982) ~14 min
│ ▌ encode 1000 kbps → ~1.2 GB …Runner (1982).MP4
│ ▌ · ♪ Queen — Bohemian Rhapsody ~3 s
│ ▌ + cover art → /MUSIC/Queen/…/11 Bohemian.mp3
────────────────────────────────────────────────────────────────────────────────
↑↓ item a audio s subs d remove ← sections ? help q quit↑/↓ pick a section, → or enter opens it, ← or esc goes back, tab switches side (same keys as torlink). r runs the queue, ? shows keys, q quits. The terminal needs to be at least 80×24.
Without ffmpeg or a stick, the app opens on Doctor: it lists what to fix and the key that fixes it. In Files, the line under the list shows what the selected file will become (the same line the Queue shows later), before you add it with a.
On the Stick screen, v adds every movie on the stick to the queue for a fix (PSP title, clean name, thumbnail) and m does the same for every song (tags, cover art). Files with nothing to fix are marked and skipped.
The Queue shows how long the work will take before you press r (the guess gets better after each run), and warns when films need encoding, because that works the CPU hard. The queue keeps running while soundcli or torlink are open. Pressing q while it runs asks first; a second q stops the encode and removes the half-written file.
Settings (stick path, TMDb key, preferred audio and subtitle language) are saved in ~/.config/pspcli/config.json. The stick is found automatically on Linux and macOS (/Volumes); a path pasted with quotes or brackets around it is fine.
Requirements
- Node 22+
- ffmpeg and ffprobe — all conversion and tag writing
- 7z (optional) — unpacks
.zip/.7z/.rargame archives - a TMDb API key (optional) — real movie titles and poster thumbnails
npx pspcli doctor tells you which of these are missing.
Commands
pspcli the app: browse, queue, install, import
pspcli doctor [--fix] check tools, stick, folders (--fix creates missing folders)
pspcli movie add <file..> convert + install into /VIDEO with a .THM thumbnail
pspcli movie fix give movies already on the stick a PSP title, clean name and .THM (no re-encode)
pspcli music add <file|dir..> tag via MusicBrainz, convert, install to /MUSIC/Artist/Album
pspcli music fix re-tag what is already on the stick, in place (ID3v2.3 + cover art)
pspcli game add <file|dir..> .iso/.cso → /ISO, .pbp → /PSP/GAME/<ID>/EBOOT.PBP
pspcli import [dir..] install whatever is NEW in a download folder, sorted by type
pspcli get music [link] run soundcli (npx sndcli), then import what it downloaded
pspcli get movie "<title>" run torlink search (npx torlnk), then import what it downloaded
pspcli watch [dir..] keep importing new files as they finish [--every 30]
pspcli config target <dir> remember a stick path
pspcli config tmdb <key> TMDb API key for titles + posters
-t, --target <dir> use this path instead of auto-detect
-y, --yes skip the confirm promptWhat it does
Movies are converted to the MP4 profile the PSP's own player accepts, written to /VIDEO, and given a matching .THM thumbnail so the XMB shows a picture instead of a grey box. They are encoded on your computer first and then copied, which is much faster than encoding onto the stick over USB. The PSP player has no subtitle switch, so subtitles are burned into the picture: embedded ones, or a Movie.srt / Movie.en.srt next to the file. In the Queue, a picks the audio track and s the subtitles for the selected movie; Settings holds a preferred audio and subtitle language (3-letter codes like eng, jpn).
Music is looked up on MusicBrainz (if the album tag or a title like "Song (Official Video)" gets no match, it tries again without them), converted to MP3, tagged ID3v2.3 (the only version the PSP reads), given embedded cover art, and filed as /MUSIC/Artist/Album/NN Title.mp3.
Games are read directly: PARAM.SFO inside an ISO9660, CSO or PBP image gives the real title and disc ID, so .iso/.cso land in /ISO and .pbp in /PSP/GAME/<ID>/EBOOT.PBP. Duplicates are refused by disc ID, not filename.
Import watches a downloads folder, sorts new files by type, and remembers what it already handled — so running it twice does nothing the second time.
No PSP handy?
Point it at any folder and it behaves the same:
pspcli doctor --fix -t ~/psp-out # creates the PSP folder tree
pspcli -t ~/psp-out # the app, against that folderdoctor will flag the filesystem as not FAT32. That is expected for a normal folder on disk.
Development
git clone https://github.com/k7zbf5nyr2-afk/pspcli
cd pspcli
npm install
npm run build
npm test # node:test, no framework
npm run dev # tsx, no build stepDependencies are ink + react, nothing else. ffmpeg does every conversion and writes every tag; MusicBrainz and TMDb are plain fetch; ISO9660 / CSO / PBP parsing is about 100 lines in src/game.ts.
License
MIT
