Metadata-Version: 2.4
Name: doploy-cli
Version: 0.2.1
Summary: doploy CLI: watch builds, read logs, and drive Odoo deployments from a terminal
License: MIT
Project-URL: Homepage, https://doploy.io
Project-URL: Documentation, https://docs.doploy.io
Project-URL: Dashboard, https://cloud.doploy.io
Keywords: doploy,odoo,deploy,ci,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27
Dynamic: license-file

# doploy CLI

[![PyPI](https://img.shields.io/pypi/v/doploy-cli.svg)](https://pypi.org/project/doploy-cli/)
[![Python](https://img.shields.io/pypi/pyversions/doploy-cli.svg)](https://pypi.org/project/doploy-cli/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)

The command line for [doploy](https://doploy.io), the Odoo hosting and CI platform.
Watch builds, read test results and logs, and drive deployments from your terminal.

```console
$ doploy builds acme --type development
ID    TYPE         STATUS        FQDN                        COMMIT_SHA  CREATED
418   development  Active Error  doploy-k3j9x2.doploy.site   9f1c2ab     2026-09-11T14:02:11

$ doploy tests 418
build 418 [Active Error] — 1 errors, 0 failures, 2 warnings

[ERROR] sale_custom.test_discounts
```

## Install

```bash
pipx install doploy-cli
```

or with `pip`, `uv`, or `pip install --user`:

```bash
pip install doploy-cli
uv tool install doploy-cli
```

Requires Python 3.10 or newer.

## Sign in

```bash
doploy login
```

Your browser opens, you sign in with your doploy account, and the CLI is connected.
Sessions renew themselves. Sign out with `doploy logout`.

What the CLI may do is decided per app in **Settings → Connected apps** on the doploy
dashboard: read only, or read and deploy, on all projects or only some. Change it there at any
time; the change applies on the CLI's next command.

## Quick start

```bash
doploy projects                              # your projects and their ids
doploy builds <project-id> --type staging    # recent builds
doploy build <build-id>                      # one build in full
doploy tests <build-id> --details            # test failures with tracebacks
doploy logs <build-id> --source test -f      # follow the test log until the build settles
```

## Commands

| Command | Description |
|---|---|
| `login` | Sign in with your browser |
| `logout` | Forget the saved session |
| `projects` | List your projects |
| `builds <project>` | Recent builds for a project. `--type development\|staging\|production`, `--limit` |
| `build <id>` | One build: status, commit, versions, error summary |
| `tests <build>` | Test failures for a build. `--details` prints tracebacks, `--warnings` includes warnings |
| `logs <build>` | Tail logs. `--source build\|test\|odoo`, `--lines`, `--filter TEXT`, `-f` to follow |
| `branch create <project> <name>` | Fork a development branch on GitHub and queue its build. `--from <branch-id>` |
| `rebuild <build>` | Queue a rebuild of a deployment |
| `restart <build>` | Restart the Odoo service |
| `update-modules <build> [modules]` | Run `odoo-bin -u` on the modules doploy detected as changed, or the ones you list. `--theme`, `--no-theme`, `--wait` |
| `operation <id>` | Check a queued module update. `--wait` |
| `backup <build>` | Take a database and filestore backup. `--comment`, `--wait` |

Commands that print tables accept `--json` for machine-readable output.

Anything aimed at a **production** deployment requires `--confirm`. Nothing destructive is
available: no deletes, no restores, no domain changes.

## Examples

**Why did my build fail?**

```bash
doploy builds acme --type development --limit 1
doploy tests 418 --details
doploy logs 418 --source test --filter ERROR
```

**Follow a build as it runs**

```bash
doploy logs 419 --source test -f
```

Exits on its own when the build settles. `--source odoo` follows the running container's log
instead and runs until Ctrl-C.

**Ship a change to staging**

```bash
doploy update-modules 302 --wait
```

Updates exactly the modules doploy saw change in the last code update, waits for Odoo to finish,
and exits non-zero if the update failed. Add `--theme` to rebuild website theme assets, or leave it
out and doploy decides from the module list.

**Take a backup first**

```bash
doploy backup 301 --confirm --wait --comment "before v2.4"
```

## Log sources

| `--source` | What you get |
|---|---|
| `build` | doploy's own build log and error summary. Fast, default. |
| `test` | The Odoo test run output of a development build. What actually failed. |
| `odoo` | The running Odoo container's log. Runtime tracebacks on staging and production. |

## Links

- Documentation: https://docs.doploy.io/agents/cli
- Dashboard: https://cloud.doploy.io
- Support: support@doploy.io

## License

MIT
