CLI reference¶
Every command of osh with its arguments and options, generated from the application.
The guide has what a command's help does not say: how the project and the branch are
found, the output, the exit codes and the environment variables.
Every command also takes --help.
osh¶
Work with Odoo.sh projects from the command line (unofficial).
| Option | Description | Environment |
|---|---|---|
--version |
Show the version and exit. | |
--debug |
Show the traceback when a command fails. | OSH_DEBUG |
--format FORMAT |
How to print the result. One of table, json. Default: table. |
|
--install-completion |
Install completion for the current shell. | |
--show-completion |
Show completion for the current shell, to copy it or customize the installation. |
| Command | Description |
|---|---|
osh auth |
Log in to Odoo.sh, log out, and show the session in use. |
osh backups |
List the backups of an Odoo.sh project, take one, download one, and copy one over SSH. |
osh branches |
List the branches of an Odoo.sh project, a branch's history, show and change its settings, the revision a build runs, and move a branch between development and staging. |
osh builds |
List, show and watch the builds of a branch, start a new one, open its panels and read the mails it caught. |
osh logs |
Print the end of a build's log: the install or odoo log of the branch's latest build, or another. |
osh projects |
List the Odoo.sh projects you can reach, show one's overview, show and change its settings, check it, read its audit log, and list its members, add one and change one's role. |
osh ssh |
Open a shell on the branch's latest build, with your own ssh, its configuration and its keys. |
osh auth¶
Log in to Odoo.sh, log out, and show the session in use.
| Command | Description |
|---|---|
osh auth login |
Sign in with GitHub in a browser and store the session in the keyring. |
osh auth status |
Show where the session comes from and how long it lasts, without asking Odoo.sh. Exits 3 when there is none. |
osh auth logout |
End the stored session on Odoo.sh and remove it from the keyring. Exits 0 when there is none. |
osh auth login¶
Sign in with GitHub in a browser and store the session in the keyring.
Where no browser can be launched, it asks for the session_id cookie in a prompt that does not echo it.
Example:
osh auth status¶
Show where the session comes from and how long it lasts, without asking Odoo.sh. Exits 3 when there is none.
| Option | Description | Environment |
|---|---|---|
--check |
Ask Odoo.sh whether it still accepts the session, and who it belongs to. |
Example:
osh auth logout¶
End the stored session on Odoo.sh and remove it from the keyring. Exits 0 when there is none.
Example:
osh backups¶
List the backups of an Odoo.sh project, take one, download one, and copy one over SSH.
| Command | Description |
|---|---|
osh backups list |
List a project's backups on every branch, newest first, with the time that names each one, in UTC. |
osh backups create |
Change state on Odoo.sh: take a manual backup of a branch's latest build, which Odoo.sh keeps for 3 days. |
osh backups download |
Change state on Odoo.sh: have it prepare a backup's file, then write it to --output, or print its link. |
osh backups pull |
Copy the daily backup of production, or a manual one, from the production build with your own rsync or scp. |
osh backups list¶
List a project's backups on every branch, newest first, with the time that names each one, in UTC.
Odoo.sh keeps a daily backup off-site as well, under the same time: that copy is remote, and cannot be downloaded.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
List only the backups taken on this branch. Default: every branch. |
Example:
osh backups create¶
Change state on Odoo.sh: take a manual backup of a branch's latest build, which Odoo.sh keeps for 3 days.
Only a staging or a production branch is backed up. It asks first, unless --yes is given.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--comment COMMENT |
The comment Odoo.sh keeps with the backup, as the page's dialog asks. | |
--yes, -y |
Take the backup without asking. Needed when stdin or stderr is not a terminal. | |
--wait |
Wait until Odoo.sh has listed and finished the backup, which takes about a minute, and show it. | |
--timeout SECONDS |
The longest to wait for the backup to be listed. Goes with --wait only. At least 1. Default: 600. |
Example:
osh backups download¶
Change state on Odoo.sh: have it prepare a backup's file, then write it to --output, or print its link.
The file is a zip of the database, neutralized unless --exact is given, and of its filestore unless
--no-filestore is. It is customer data: it is written readable by its owner alone, and deleting it is yours to do.
It asks first, unless --yes is given.
| Argument | Description |
|---|---|
[BACKUP] |
The time that names the backup, in UTC, as osh backups list shows it, or latest: the newest that can be downloaded. Default: latest. |
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--output PATH, -o PATH |
The file to write, which must not exist yet. Needed unless --link is given. |
|
--link |
Print the page's link to the prepared file instead of downloading it. It opens only in a browser signed in to Odoo.sh. | |
--exact |
The exact database, rather than the neutralized one the page offers first. | |
--no-filestore |
Leave the filestore out of the file. | |
--new |
Take a backup of the branch's latest build first, and download that one. | |
--yes, -y |
Change state without asking. Needed when stdin or stderr is not a terminal. | |
--timeout SECONDS |
The longest to wait for the backup, with --new, and for the file, each. At least 1. Default: 600. |
Example:
osh backups pull¶
Copy the daily backup of production, or a manual one, from the production build with your own rsync or scp.
The file is the database's SQL, gzipped, without the filestore. It is customer data: it is written readable by its
owner alone, and deleting it is yours to do. When ssh does not get in, it changes state on Odoo.sh as osh ssh
does: it asks to allow this machine's address, unless declined.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The production branch, whose build holds the backups: any other is refused. Default: the project's production branch, whatever is checked out. | |
--manual TIMESTAMP |
Copy the manual backup taken at this time, in UTC, as osh backups list shows it, on any branch, rather than the daily one. |
|
--output PATH, -o PATH |
The file to write, which must not exist yet. | |
--yes, -y |
Allow this machine's address without asking, when ssh does not get in. Needed then when stdin or stderr is not a terminal. |
Example:
osh branches¶
List the branches of an Odoo.sh project, a branch's history, show and change its settings, the revision a build runs, and move a branch between development and staging.
| Command | Description |
|---|---|
osh branches list |
List a project's branches with their stage: production, staging, then development, each sorted by name. |
osh branches history |
List a branch's history, newest first: each push with its commits, each rebuild and each move between stages. |
osh branches move |
Change state on Odoo.sh: move a branch between development and staging. |
osh branches revision |
Show what a build of a branch runs: its head commit, its Odoo version, and the Odoo revision the branch has selected. The latest build, or --build. |
osh branches settings |
Show a branch's settings, or change them. |
osh branches list¶
List a project's branches with their stage: production, staging, then development, each sorted by name.
A stage osh does not know is shown as Odoo.sh names it, after the others. In the table, * marks the branch checked out, when the project comes from the git checkout.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--stage STAGE |
List only the branches in this stage. Can be given more than once. unknown is any stage osh does not know. One of production, staging, development, unknown. |
Example:
osh branches history¶
List a branch's history, newest first: each push with its commits, each rebuild and each move between stages.
A push lists each commit by its short hash and the first line of its message, and --commits prints them in full. The build is the one the event made, as it is now: osh builds show has the rest of it.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--limit LIMIT |
The most events to list, 200 at most. From 1 to 200. Default: 10. |
|
--commits |
Print each commit in full: its whole hash, its address and its whole message. |
Example:
osh branches move¶
Change state on Odoo.sh: move a branch between development and staging.
A move to staging starts a build of the branch on a copy of production's data. A move to development drops its staging builds, which are not backed up. A production branch is not moved. It asks first, unless --yes is given.
| Option | Description | Environment |
|---|---|---|
--to TO |
The stage to move the branch to. A branch is moved to or from production in the Odoo.sh page. Required. One of staging, development. |
|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--yes, -y |
Change without asking. Needed when stdin or stderr is not a terminal. |
Example:
osh branches revision¶
Show what a build of a branch runs: its head commit, its Odoo version, and the Odoo revision the branch has selected. The latest build, or --build.
Odoo.sh ties no Odoo revision to a build: the branch's is the one it has selected now, which the build may not run. Odoo.sh gives no commit for a submodule, and a line on stderr says so.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--build BUILD_ID |
The build's number, among the branch's latest builds. Default: the latest one. At least 1. |
Example:
osh branches settings¶
Show a branch's settings, or change them.
| Command | Description |
|---|---|
osh branches settings show |
Show a branch's settings, one per line, as its Settings tab has them. |
osh branches settings set |
Change state on Odoo.sh: change a branch's settings, sending only those given. |
osh branches settings show¶
Show a branch's settings, one per line, as its Settings tab has them.
The new build options, from Project defaults to AI agent, apply to a development branch only, and not while it uses the project's defaults.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
Example:
osh branches settings set¶
Change state on Odoo.sh: change a branch's settings, sending only those given.
The others keep their value. NAME is one of push_behavior, project_defaults, module_install, modules, tests, test_tags, demo_data and ai_agent. A choice takes a value show --format json prints, a yes or no takes yes or no, modules takes names separated by commas, and test_tags= clears the tags. Only a development branch has new build options, and while the project's defaults apply they are changed with project_defaults=no too. What a new commit does is not changed on a production branch. It asks first, unless --yes is given.
| Argument | Description |
|---|---|
NAME=VALUE... |
A setting and its new value, named as osh branches settings show --format json prints them. Required. |
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--yes, -y |
Change without asking. Needed when stdin or stderr is not a terminal. |
Example:
osh builds¶
List, show and watch the builds of a branch, start a new one, open its panels and read the mails it caught.
| Command | Description |
|---|---|
osh builds list |
List a branch's latest builds, newest first, with their status, result and commit. |
osh builds show |
Show one build of a branch, with its commit and the address of its database: its latest, or BUILD_ID. |
osh builds watch |
Watch a build until it finishes, and exit with its result: the build of HEAD, or BUILD_ID. |
osh builds rebuild |
Change state on Odoo.sh: start a new build of a branch, which replaces its latest one. |
osh builds open |
Print the URL of a build's monitor, shell or editor: of its latest build, or BUILD_ID. |
osh builds mails |
List the mails a build of a development or a staging branch caught: of its latest build, or BUILD_ID. |
osh builds list¶
List a branch's latest builds, newest first, with their status, result and commit.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--limit LIMIT |
The most builds to list. Odoo.sh has only been seen to answer up to 4: older builds are out of reach. At least 1. Default: 4. |
Example:
osh builds show¶
Show one build of a branch, with its commit and the address of its database: its latest, or BUILD_ID.
| Argument | Description |
|---|---|
BUILD_ID |
The build's number, among the branch's latest builds. Default: the latest one. At least 1. |
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
Example:
osh builds watch¶
Watch a build until it finishes, and exit with its result: the build of HEAD, or BUILD_ID.
| Argument | Description |
|---|---|
BUILD_ID |
The build's number, among the branch's latest builds. Default: the build of HEAD when the project and the branch are the checkout's, the latest build otherwise. At least 1. |
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--timeout SECONDS |
The longest to wait for the build to appear and to finish. At least 1. Default: 1800. |
|
--commit SHA |
Wait for a build of this commit, given as the first 7 to 64 digits of its hash. Default: the git checkout's HEAD, when the project and the branch are the checkout's. Goes with neither BUILD_ID nor --no-wait. |
|
--no-wait |
Watch the branch's latest build, whatever its commit. |
Example:
osh builds rebuild¶
Change state on Odoo.sh: start a new build of a branch, which replaces its latest one.
Only a development or a staging branch is rebuilt. It asks first, unless --yes is given.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--yes, -y |
Rebuild without asking. Needed when stdin or stderr is not a terminal. | |
--watch |
Watch the new build until it finishes, and exit with its result. | |
--timeout SECONDS |
The longest to wait for the new build to finish. Goes with --watch only. At least 1. Default: 1800. |
Example:
osh builds open¶
Print the URL of a build's monitor, shell or editor: of its latest build, or BUILD_ID.
The monitor is the branch's, for a staging or a production branch, and takes no BUILD_ID.
| Argument | Description |
|---|---|
PANEL |
The panel: the branch's monitor, or the shell or the editor on the build's own host. Required. One of monitor, shell, editor. |
BUILD_ID |
The build's number, among the branch's latest builds. Default: the latest one. At least 1. |
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--open |
Open the panel in your default browser rather than print its URL. The browser signs in to Odoo.sh on its own. |
Example:
osh builds mails¶
List the mails a build of a development or a staging branch caught: of its latest build, or BUILD_ID.
Odoo.sh catches them rather than sending them. --mail shows one with its body. Their text is
the build's: it is printed without escape sequences or control characters.
| Argument | Description |
|---|---|
BUILD_ID |
The build's number, among the branch's latest builds. Default: the latest one. At least 1. |
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--mail MAIL_ID |
Show this mail with its body, rather than list. | |
--limit LIMIT |
The most mails to list, newest first. Goes without --mail. At least 1. Default: 20. |
Example:
osh logs¶
Print the end of a build's log: the install or odoo log of the branch's latest build, or another.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--build BUILD_ID |
The build's number, among the branch's latest builds. Default: the latest one. At least 1. | |
--kind NAME |
Which log to print, by its name. --kinds lists them. Default: install when the build has it, odoo otherwise. |
|
--kinds |
List the logs the build has, and print none. Goes with none of the options that print a log. | |
--tail LINES |
Print the last lines, out of the log's last mebibyte: a large tail can print fewer. At least 1. Default: 100. |
|
--all |
Print the whole log. Does not go with --tail. |
|
--follow, -f |
Keep printing the lines as they are written, until interrupted. With --all, from the first line. |
|
--strip, --no-strip |
Remove the escape sequences and control characters from the lines, or leave them. Default: remove them when stdout is a terminal. | |
--timeout SECONDS |
The longest to follow the log: the command then exits 8. Goes with --follow only. Default: no limit. At least 1. |
Example:
osh projects¶
List the Odoo.sh projects you can reach, show one's overview, show and change its settings, check it, read its audit log, and list its members, add one and change one's role.
| Command | Description |
|---|---|
osh projects list |
List the projects you can reach, with their repository and address. |
osh projects show |
Show a project's overview, one fact per line: its subscription, Odoo version, hosting, production build and branches by stage. |
osh projects audit |
List a project's audit log, newest first: who did what, when, on which stage, and what Odoo.sh adds about it. |
osh projects check |
Check a project's subscription, production build, storage and branches, and exit 30 when one fails, 31 when one warns. |
osh projects settings |
Show a project's settings, or change them. |
osh projects members |
List a project's members, add one, or change one's role. |
osh projects list¶
List the projects you can reach, with their repository and address.
Example:
osh projects show¶
Show a project's overview, one fact per line: its subscription, Odoo version, hosting, production build and branches by stage.
Storage, workers and staging branches are on the project's Settings page, which Odoo.sh shows to an admin of the project only: anyone else gets admins only.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
Example:
osh projects audit¶
List a project's audit log, newest first: who did what, when, on which stage, and what Odoo.sh adds about it.
Odoo.sh sends the last 30 days in one answer, and shows the log to an admin of the project only: anyone else gets exit code 5. Nothing older than 30 days can be read, whatever --since says.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--limit LIMIT |
The most entries to list, 200 at most. From 1 to 200. Default: 20. |
|
--since DATE |
List only the entries at or after this moment, in UTC, such as 2026-10-01 or 2026-10-01T09:30:00. |
Example:
osh projects check¶
Check a project's subscription, production build, storage and branches, and exit 30 when one fails, 31 when one warns.
Each check is a row: its name, pass, warn, fail or skip, and the fact it was judged on. Storage is on the project's Settings page, which Odoo.sh shows to an admin of the project only: anyone else gets skip, which does not count in the exit code.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--storage-margin PERCENT |
Warn when the storage used is within this share of the quota. 0 never warns, 100 warns on any use. From 0 to 100. Default: 10. |
Example:
osh projects settings¶
Show a project's settings, or change them.
| Command | Description |
|---|---|
osh projects settings show |
Show a project's settings, one per line, as its Settings page has them. |
osh projects settings set |
Change state on Odoo.sh: change a project's settings, sending only those given. |
osh projects settings show¶
Show a project's settings, one per line, as its Settings page has them.
Odoo.sh shows them to an admin of the project only: anyone else gets exit code 5. The rows from Dev install to Dev AI agent are the defaults of new development branches. A submodule's public deploy key is in --format json only.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
Example:
osh projects settings set¶
Change state on Odoo.sh: change a project's settings, sending only those given.
The others keep their value. NAME is one of session_lifetime, public, http_timeout_seconds, cron_timeout_seconds, module_install, modules, tests, test_tags, demo_data and ai_agent, the last six being the defaults of new development branches. A choice takes a value show --format json prints, a yes or no takes yes or no, a timeout takes seconds, a multiple of 60, and is changed on a dedicated server only, modules takes names separated by commas, and test_tags= clears the tags. The IP allow list, which SSH and PostgreSQL to production and staging go through, is changed by entry with --add-ip and --remove-ip, ten entries at most. Only an admin of the project can change them: anyone else gets exit code 5. It asks first, saying when the change is to who can reach the project, unless --yes is given.
| Argument | Description |
|---|---|
[NAME=VALUE]... |
A setting and its new value, named as osh projects settings show --format json prints them. |
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--add-ip IP |
An IPv4 address to add to the IP allow list. Can be given more than once. | |
--remove-ip ENTRY |
An address or a network to remove from the IP allow list, as osh projects settings show lists it. Can be given more than once. |
|
--yes, -y |
Change without asking. Needed when stdin or stderr is not a terminal. |
Example:
osh projects members¶
List a project's members, add one, or change one's role.
| Command | Description |
|---|---|
osh projects members list |
List a project's members with their role, highest role first, then by login. |
osh projects members add |
Change state on Odoo.sh: add a GitHub user to a project's members, as a developer unless --role says otherwise. |
osh projects members role |
Change state on Odoo.sh: give a member of a project another role. |
osh projects members list¶
List a project's members with their role, highest role first, then by login.
Odoo.sh lists them to an admin of the project only: anyone else gets exit code 5. Logged in is no for a member invited who has not logged in to Odoo.sh yet. It changes nothing.
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
Example:
osh projects members add¶
Change state on Odoo.sh: add a GitHub user to a project's members, as a developer unless --role says otherwise.
Odoo.sh sends them no invitation, and push access to the repository is given on GitHub. Only an admin of the project can add one: anyone else gets exit code 5, as does a session whose grant on GitHub does not cover the search of users, until a user is searched once in the Collaborators item of the project's Settings page. A login GitHub does not have exits 4, and a user already a member exits 9, both with nothing sent. It asks first, unless --yes is given.
| Argument | Description |
|---|---|
LOGIN |
The GitHub login of the user. Required. |
| Option | Description | Environment |
|---|---|---|
--role ROLE |
The new member's role. One of developer, tester, admin. Default: developer. |
|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--yes, -y |
Change without asking. Needed when stdin or stderr is not a terminal. |
Example:
osh projects members role¶
Change state on Odoo.sh: give a member of a project another role.
Only an admin of the project can change one: anyone else gets exit code 5. A login that is not a member exits 4, and lowering the last admin who has logged in to Odoo.sh exits 9, both with nothing sent. A member who already has the role exits 0 with nothing sent. It asks first, unless --yes is given.
| Argument | Description |
|---|---|
LOGIN |
The member's login, as list prints it, in any case. Required. |
ROLE |
The member's new role. Required. One of developer, tester, admin. |
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--yes, -y |
Change without asking. Needed when stdin or stderr is not a terminal. |
Example:
osh ssh¶
Open a shell on the branch's latest build, with your own ssh, its configuration and its keys.
It first tries ssh with no prompt. When that does not get in, it changes state on Odoo.sh: it
asks Odoo.sh to allow this machine's address for one hour, unless declined, and tries again
for up to ten minutes.
| Argument | Description |
|---|---|
[SSH_ARGS]... |
What to give ssh after the host: its own options, or a command to run on the build. Everything from the first one on is ssh's. Put -- before it when it starts with a dash. |
| Option | Description | Environment |
|---|---|---|
--project PROJECT |
The project's name. Default: the git checkout's. | OSH_PROJECT |
--branch BRANCH |
The branch's name. Default: the git checkout's. | OSH_BRANCH |
--yes, -y |
Allow this machine's address without asking, when ssh does not get in. Needed then when stdin or stderr is not a terminal. |
Example: