The command line
Install cohostly, sign in, learn the habits every command shares, and find the command you need.
cohostly is how you put an app online and look after it from your own computer. Think of it as a remote control for your projects. You press a button on your keyboard, and the platform does the work far away.
npm install -g cohostly cohostly
Run with no arguments, it prints the list of commands and exits with code 1. That is normal. It is the only built-in help there is.
Careful The command has no
--help, no-hand no--version. Typing one of them printsUnknown command: --help, then the command list, and exits with code1. Use the list you get from plaincohostly, and these pages.
Two names, one program
platform is the same program under its older name. Both names work. Some messages the CLI prints still say platform ..., for example Run "platform login". When you see that, type cohostly instead. The result is the same.
What you need
- Node.js 20 or later.
- macOS or Linux, Intel or Arm, for
snapshotandcheck. On Windows those two stop withCapture runs on macOS and Linux. On Windows, use WSL2.The other commands do not use the capture tool. - Docker, only for
cohostly check, which builds your app on your machine to prove it works. Nothing else needs it. - Railpack, the open-source tool that plans builds. The CLI downloads it once, the first time
snapshotorcheckneeds it, and checks it against a pinned checksum.
First five minutes
cohostly login # approve a code in your browser cohostly new express hello # a tiny starter app in ./hello cd hello cohostly deploy # build it and put it online cohostly open # print the address and open it
Every command, by what you want to do
login, logout, whoami, and what the saved key can do.Start a project from a templatenew and its six templates.Put an app onlinedeploy, manifest check, upload limits, .env files, approvals.Pack and inspectpack, inspect and deploying a sealed .cohostly file.Deploy what already runssnapshot, check, and deploying from the .cohostly/ folder.Look after projectsls, open, logs.Versions and rollbackversions, promote, rollback.Backup and restorebackup, backups, restore.Share and name itshare, domains, ship.Secretssecrets list, set, import, delete, share, request.Dev tokenstoken create --dev, list, revoke.AI keysai-keys list, set, check, delete.Build and test locallydev, types, bindings check.Costcost, a plain-words estimate of AI and hosting spend.Schedules and runschedules and run, the jobs on a clock.Approvalsapprovals, the inbox of requests waiting on a person.Exit codes and environment variableswhat each exit code means, every variable the CLI reads, and what Fatal: means.Habits shared by all commands
Project name--project <name>, some as a plain word (cohostly open hello), some as both. Each page shows the exact form.--jsonlogs, share, domains, schedules (and run), ship, approvals, cost. The others cannot.Secret valuessecrets set, ai-keys set) read it at a hidden prompt, or from a pipe. They never take it as an argument. The one exception is login --token, which puts a key on the command line.Plain error textCode: such as build_failed_dependency (see troubleshooting).Questionsdeploy ever asks a question. Everything else acts at once. That includes restore, promote, rollback, secrets delete and share remove. Read the command before you press Enter.Aliasesls is the same as list. run <schedule> is the same as schedules run.Which projects you can reach
The saved key is tied to one account. With it, cohostly ls lists the projects of that account only. A project that someone shared with you by invitation, from a different account, does not appear in the CLI. See sign in and keys for why.