@postmov/cli
v0.1.1
Published
Post's Media storage from the command line: sign in, list, upload and download.
Maintainers
Readme
post
Post's Media storage from the command line: sign in through your browser, then list, upload, download, organize and delete your projects' folders and files. It works with Media storage only.
npm install -g @postmov/cliNeeds Node.js 22.12 or newer.
Signing in
post loginYour browser opens post.mov/cli. Sign in as usual, type the code your terminal shows, and click
Approve. The terminal gets a sign-in of its own: post logout signs out only that
terminal. On a computer without a browser (over SSH, say), post login --no-browser prints the
address to open on any device.
The sign-in is kept in the macOS Keychain on a Mac, and elsewhere in ~/.config/post/credentials.json,
readable only by you.
Paths
A path names a project, then its folders, then a file, the way Media storage shows them:
"Acme Ad/Assets/Camera Masters/A001.mov". Quote paths that have spaces. A file can be named
with or without its extension. Where two things share a name, use the id that --json shows.
Commands
post whoami # who's signed in, and the workspace you work in
post workspace list # your workspaces
post workspace use "757 Films" # work in another workspace
post ls # the workspace's projects
post ls "Acme Ad/Assets" -l # what's in a folder
post info "Acme Ad/Edit.mov" # a file's details and versions
post upload ./Day\ 1 "Acme Ad/Assets" # a folder, with everything in it
post upload cut.mov "Acme Ad/Edit.mov" --new-version
post download "Acme Ad/Assets" ~/Downloads # a folder, file by file
post download "Acme Ad/Assets" --zip # a folder as one zip
post download "Acme Ad/Edit.mov" --proxy 720 # the 720p copy
post project create "Acme Ad"
post mkdir -p "Acme Ad/VFX/Plates"
post mv "Acme Ad/old.mov" "Acme Ad/Edit/new.mov"
post rm -r "Acme Ad/VFX/Plates" # asks first; -y doesn'tUploads skip files the project already has (the same name, size and date) unless --force, and
carry on where they stopped when you run the same command again (new versions too). Every command takes --json
for scripts, and post help <command> explains it.
What the tool sends to Post
So that nobody has to ask you for your terminal's output when something goes wrong, the tool tells Post about it:
- A command that failed because of Post, the connection or the tool itself (not your own
mistakes, like a path that isn't there): the command, the tool's version, your system and Node.js
version, the error, the HTTP status, how long it ran, and the Post path it was about (for example
Acme Ad/Assets). A crash also sends its stack, with your computer's folders taken out. - Uploads and downloads in trouble: when parts fail and are retried, an upload stalls for 3 minutes or starts over, or a transfer fails, with sizes and what storage answered.
It never sends your files, the names of folders on your computer, or what's in your files. Reports are tied to your Post account (or to nobody, before you've signed in) and kept for 30 days.
To turn this off, set POST_NO_REPORTS=1 (for example in your shell's profile).
Settings
| Variable | What it does |
| ------------------ | ---------------------------------------------------------- |
| POST_API_URL | Another Post to talk to (post login --api-url saves one) |
| POST_CONFIG_DIR | Where settings and the file-kept sign-in go |
| POST_CREDENTIALS | file: keep the sign-in in the file on a Mac too |
| POST_DEBUG | Print the stack of an unexpected error |
| POST_NO_REPORTS | 1: don't tell Post when something goes wrong |
Licence
Proprietary: Post customers may install and use it with their Post accounts, including in their own scripts. See LICENSE.
