odoo-cli-official 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. odoo_cli_official-0.1.0/.gitignore +14 -0
  2. odoo_cli_official-0.1.0/LICENSE +21 -0
  3. odoo_cli_official-0.1.0/PKG-INFO +89 -0
  4. odoo_cli_official-0.1.0/README.md +67 -0
  5. odoo_cli_official-0.1.0/docs/architecture.md +901 -0
  6. odoo_cli_official-0.1.0/docs/requirements.md +735 -0
  7. odoo_cli_official-0.1.0/docs/requirements_v2.md +68 -0
  8. odoo_cli_official-0.1.0/docs/requirements_v3.md +95 -0
  9. odoo_cli_official-0.1.0/docs/usecase.md +372 -0
  10. odoo_cli_official-0.1.0/docs/usecase_v2.md +119 -0
  11. odoo_cli_official-0.1.0/odoo_cli/__init__.py +3 -0
  12. odoo_cli_official-0.1.0/odoo_cli/__main__.py +8 -0
  13. odoo_cli_official-0.1.0/odoo_cli/_vendor/__init__.py +7 -0
  14. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/LICENSE.txt +28 -0
  15. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/__init__.py +126 -0
  16. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/_compat.py +627 -0
  17. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/_termui_impl.py +929 -0
  18. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/_textwrap.py +188 -0
  19. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/_utils.py +36 -0
  20. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/_winconsole.py +297 -0
  21. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/core.py +3542 -0
  22. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/decorators.py +551 -0
  23. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/exceptions.py +347 -0
  24. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/formatting.py +315 -0
  25. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/globals.py +67 -0
  26. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/parser.py +533 -0
  27. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/py.typed +0 -0
  28. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/shell_completion.py +680 -0
  29. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/termui.py +941 -0
  30. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/testing.py +736 -0
  31. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/types.py +1309 -0
  32. odoo_cli_official-0.1.0/odoo_cli/_vendor/click/utils.py +641 -0
  33. odoo_cli_official-0.1.0/odoo_cli/cli/__init__.py +1 -0
  34. odoo_cli_official-0.1.0/odoo_cli/cli/_click.py +18 -0
  35. odoo_cli_official-0.1.0/odoo_cli/cli/context.py +104 -0
  36. odoo_cli_official-0.1.0/odoo_cli/cli/main.py +50 -0
  37. odoo_cli_official-0.1.0/odoo_cli/cli/output.py +26 -0
  38. odoo_cli_official-0.1.0/odoo_cli/commands/__init__.py +39 -0
  39. odoo_cli_official-0.1.0/odoo_cli/commands/config.py +55 -0
  40. odoo_cli_official-0.1.0/odoo_cli/commands/db.py +39 -0
  41. odoo_cli_official-0.1.0/odoo_cli/commands/init.py +152 -0
  42. odoo_cli_official-0.1.0/odoo_cli/commands/module.py +27 -0
  43. odoo_cli_official-0.1.0/odoo_cli/commands/repo.py +108 -0
  44. odoo_cli_official-0.1.0/odoo_cli/commands/shell.py +27 -0
  45. odoo_cli_official-0.1.0/odoo_cli/commands/start.py +58 -0
  46. odoo_cli_official-0.1.0/odoo_cli/commands/test.py +32 -0
  47. odoo_cli_official-0.1.0/odoo_cli/commands/update.py +23 -0
  48. odoo_cli_official-0.1.0/odoo_cli/commands/venv.py +18 -0
  49. odoo_cli_official-0.1.0/odoo_cli/commands/where.py +60 -0
  50. odoo_cli_official-0.1.0/odoo_cli/commands/worktree.py +80 -0
  51. odoo_cli_official-0.1.0/odoo_cli/core/__init__.py +5 -0
  52. odoo_cli_official-0.1.0/odoo_cli/core/addons.py +51 -0
  53. odoo_cli_official-0.1.0/odoo_cli/core/config_service.py +59 -0
  54. odoo_cli_official-0.1.0/odoo_cli/core/database.py +107 -0
  55. odoo_cli_official-0.1.0/odoo_cli/core/errors.py +110 -0
  56. odoo_cli_official-0.1.0/odoo_cli/core/models.py +128 -0
  57. odoo_cli_official-0.1.0/odoo_cli/core/modules.py +46 -0
  58. odoo_cli_official-0.1.0/odoo_cli/core/odoo_bin.py +197 -0
  59. odoo_cli_official-0.1.0/odoo_cli/core/odoo_conf.py +113 -0
  60. odoo_cli_official-0.1.0/odoo_cli/core/paths.py +37 -0
  61. odoo_cli_official-0.1.0/odoo_cli/core/postgres.py +105 -0
  62. odoo_cli_official-0.1.0/odoo_cli/core/release.py +97 -0
  63. odoo_cli_official-0.1.0/odoo_cli/core/repositories.py +259 -0
  64. odoo_cli_official-0.1.0/odoo_cli/core/server.py +202 -0
  65. odoo_cli_official-0.1.0/odoo_cli/core/shell.py +52 -0
  66. odoo_cli_official-0.1.0/odoo_cli/core/target.py +109 -0
  67. odoo_cli_official-0.1.0/odoo_cli/core/testing.py +77 -0
  68. odoo_cli_official-0.1.0/odoo_cli/core/venvs.py +143 -0
  69. odoo_cli_official-0.1.0/odoo_cli/core/workspace.py +72 -0
  70. odoo_cli_official-0.1.0/odoo_cli/core/worktrees.py +455 -0
  71. odoo_cli_official-0.1.0/odoo_cli/util/__init__.py +1 -0
  72. odoo_cli_official-0.1.0/odoo_cli/util/git.py +171 -0
  73. odoo_cli_official-0.1.0/odoo_cli/util/net.py +30 -0
  74. odoo_cli_official-0.1.0/odoo_cli/util/process.py +89 -0
  75. odoo_cli_official-0.1.0/pyproject.toml +57 -0
  76. odoo_cli_official-0.1.0/tests/__init__.py +0 -0
  77. odoo_cli_official-0.1.0/tests/cli/__init__.py +0 -0
  78. odoo_cli_official-0.1.0/tests/cli/test_config.py +82 -0
  79. odoo_cli_official-0.1.0/tests/cli/test_init.py +255 -0
  80. odoo_cli_official-0.1.0/tests/cli/test_main.py +70 -0
  81. odoo_cli_official-0.1.0/tests/cli/test_module_update_db.py +92 -0
  82. odoo_cli_official-0.1.0/tests/cli/test_repo_worktree.py +163 -0
  83. odoo_cli_official-0.1.0/tests/cli/test_start_where.py +129 -0
  84. odoo_cli_official-0.1.0/tests/cli/test_test_shell.py +128 -0
  85. odoo_cli_official-0.1.0/tests/e2e/__init__.py +0 -0
  86. odoo_cli_official-0.1.0/tests/e2e/test_workflows.py +309 -0
  87. odoo_cli_official-0.1.0/tests/fixtures/__init__.py +0 -0
  88. odoo_cli_official-0.1.0/tests/fixtures/process.py +78 -0
  89. odoo_cli_official-0.1.0/tests/fixtures/workspace.py +75 -0
  90. odoo_cli_official-0.1.0/tests/integration/__init__.py +0 -0
  91. odoo_cli_official-0.1.0/tests/integration/test_git.py +107 -0
  92. odoo_cli_official-0.1.0/tests/integration/test_process.py +42 -0
  93. odoo_cli_official-0.1.0/tests/unit/__init__.py +0 -0
  94. odoo_cli_official-0.1.0/tests/unit/test_addons.py +98 -0
  95. odoo_cli_official-0.1.0/tests/unit/test_database.py +137 -0
  96. odoo_cli_official-0.1.0/tests/unit/test_git.py +64 -0
  97. odoo_cli_official-0.1.0/tests/unit/test_linked_worktrees.py +272 -0
  98. odoo_cli_official-0.1.0/tests/unit/test_models.py +33 -0
  99. odoo_cli_official-0.1.0/tests/unit/test_odoo_bin.py +161 -0
  100. odoo_cli_official-0.1.0/tests/unit/test_odoo_conf.py +69 -0
  101. odoo_cli_official-0.1.0/tests/unit/test_postgres.py +69 -0
  102. odoo_cli_official-0.1.0/tests/unit/test_release.py +54 -0
  103. odoo_cli_official-0.1.0/tests/unit/test_repositories.py +361 -0
  104. odoo_cli_official-0.1.0/tests/unit/test_server.py +151 -0
  105. odoo_cli_official-0.1.0/tests/unit/test_target.py +137 -0
  106. odoo_cli_official-0.1.0/tests/unit/test_vendoring.py +22 -0
  107. odoo_cli_official-0.1.0/tests/unit/test_venvs.py +127 -0
  108. odoo_cli_official-0.1.0/tests/unit/test_workspace.py +86 -0
  109. odoo_cli_official-0.1.0/tests/unit/test_worktree_service.py +190 -0
@@ -0,0 +1,14 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .ruff_cache/
6
+ dist/
7
+ build/
8
+ .DS_Store
9
+
10
+ # Virtual environment
11
+ .venv/
12
+
13
+ # Ondeck
14
+ .ondeck
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Frederic van der Essen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: odoo-cli-official
3
+ Version: 0.1.0
4
+ Summary: CLI tool to manage and develop local Odoo instances
5
+ Project-URL: Homepage, https://github.com/fvdsn/odoo-cli
6
+ Project-URL: Repository, https://github.com/fvdsn/odoo-cli
7
+ Project-URL: Issues, https://github.com/fvdsn/odoo-cli/issues
8
+ Author: Frederic van der Essen
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: cli,development,odoo,postgresql
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+
23
+ # odoo-cli
24
+
25
+ A CLI tool to manage and develop local Odoo instances: one workspace, git
26
+ worktrees for multitasking across versions, shared venvs, derived database
27
+ names, and automatic port allocation — with the filesystem, the database, and
28
+ `odoo/odoo/release.py` as the only sources of truth. The full design lives in
29
+ [`docs/`](docs/) (`requirements.md`, `architecture.md`, `usecase.md`).
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ uv tool install odoo-cli-official # installs the `odoo` executable
35
+ ```
36
+
37
+ Runtime is the Python standard library plus a vendored
38
+ [click](https://click.palletsprojects.com) (Python 3.11+); nothing else.
39
+
40
+ ## Quick start
41
+
42
+ ```bash
43
+ odoo init # workspace at ~/odoo, latest stable, empty db
44
+ odoo module install crm
45
+ odoo start # foreground; Ctrl-C to stop
46
+ ```
47
+
48
+ The workspace looks like:
49
+
50
+ ```text
51
+ ~/.config/odoo/odoo.conf <- the only config file (Odoo's own format/location)
52
+ ~/odoo/
53
+ .repositories/ <- shared bare clones (presence = enabled)
54
+ .venvs/19.0/ <- one venv per detected Odoo version
55
+ .run/19.0/19.0/ports <- allocated ports per (worktree, database)
56
+ 19.0/ <- a worktree: odoo/, documentation/, ...
57
+ ```
58
+
59
+ ## Daily commands
60
+
61
+ | Command | Description |
62
+ |---|---|
63
+ | `odoo start [-d DB] [--new-port] [--prod]` | Start the server (foreground) |
64
+ | `odoo where [--json]` | Show the resolved context + exact odoo-bin command |
65
+ | `odoo update [modules]` | Update modules (default: all installed) |
66
+ | `odoo module install <modules>` | Install modules (creates the db if needed) |
67
+ | `odoo test <module\|installed\|all> [-t tag]` | Run tests in `{db}-test` |
68
+ | `odoo shell [-c CODE]` | Odoo Python REPL / one-shot execution |
69
+ | `odoo db reset` | Drop + recreate, reinstalling the db's module set |
70
+ | `odoo config get/set/list` | Edit the shared odoo.conf |
71
+ | `odoo repo enable <enterprise\|themes\|upgrade>` | Enable an optional repo |
72
+ | `odoo repo add <name> <url>` | Clone a custom addon repository |
73
+ | `odoo worktree create <name> [version] [--linked-from SRC --addon REPO]` | New worktree |
74
+ | `odoo venv` | Rebuild the venv for the current worktree |
75
+
76
+ Commands infer their target from the current directory (or `-w`/`-d`); the
77
+ database defaults to the worktree name.
78
+
79
+ ## Development
80
+
81
+ ```bash
82
+ # any Python >= 3.11 (a bare `python` may resolve to an older interpreter)
83
+ python3 -m unittest discover # unit + cli + integration (fast, no network)
84
+ ODOO_CLI_E2E=1 ODOO_CLI_E2E_ODOO_REPO=~/src/odoo \
85
+ python3 -m unittest discover tests/e2e -v # real-Odoo flows (slow, opt-in)
86
+ ```
87
+
88
+ Architecture, layering rules, and the testing strategy are documented in
89
+ [`docs/architecture.md`](docs/architecture.md).
@@ -0,0 +1,67 @@
1
+ # odoo-cli
2
+
3
+ A CLI tool to manage and develop local Odoo instances: one workspace, git
4
+ worktrees for multitasking across versions, shared venvs, derived database
5
+ names, and automatic port allocation — with the filesystem, the database, and
6
+ `odoo/odoo/release.py` as the only sources of truth. The full design lives in
7
+ [`docs/`](docs/) (`requirements.md`, `architecture.md`, `usecase.md`).
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ uv tool install odoo-cli-official # installs the `odoo` executable
13
+ ```
14
+
15
+ Runtime is the Python standard library plus a vendored
16
+ [click](https://click.palletsprojects.com) (Python 3.11+); nothing else.
17
+
18
+ ## Quick start
19
+
20
+ ```bash
21
+ odoo init # workspace at ~/odoo, latest stable, empty db
22
+ odoo module install crm
23
+ odoo start # foreground; Ctrl-C to stop
24
+ ```
25
+
26
+ The workspace looks like:
27
+
28
+ ```text
29
+ ~/.config/odoo/odoo.conf <- the only config file (Odoo's own format/location)
30
+ ~/odoo/
31
+ .repositories/ <- shared bare clones (presence = enabled)
32
+ .venvs/19.0/ <- one venv per detected Odoo version
33
+ .run/19.0/19.0/ports <- allocated ports per (worktree, database)
34
+ 19.0/ <- a worktree: odoo/, documentation/, ...
35
+ ```
36
+
37
+ ## Daily commands
38
+
39
+ | Command | Description |
40
+ |---|---|
41
+ | `odoo start [-d DB] [--new-port] [--prod]` | Start the server (foreground) |
42
+ | `odoo where [--json]` | Show the resolved context + exact odoo-bin command |
43
+ | `odoo update [modules]` | Update modules (default: all installed) |
44
+ | `odoo module install <modules>` | Install modules (creates the db if needed) |
45
+ | `odoo test <module\|installed\|all> [-t tag]` | Run tests in `{db}-test` |
46
+ | `odoo shell [-c CODE]` | Odoo Python REPL / one-shot execution |
47
+ | `odoo db reset` | Drop + recreate, reinstalling the db's module set |
48
+ | `odoo config get/set/list` | Edit the shared odoo.conf |
49
+ | `odoo repo enable <enterprise\|themes\|upgrade>` | Enable an optional repo |
50
+ | `odoo repo add <name> <url>` | Clone a custom addon repository |
51
+ | `odoo worktree create <name> [version] [--linked-from SRC --addon REPO]` | New worktree |
52
+ | `odoo venv` | Rebuild the venv for the current worktree |
53
+
54
+ Commands infer their target from the current directory (or `-w`/`-d`); the
55
+ database defaults to the worktree name.
56
+
57
+ ## Development
58
+
59
+ ```bash
60
+ # any Python >= 3.11 (a bare `python` may resolve to an older interpreter)
61
+ python3 -m unittest discover # unit + cli + integration (fast, no network)
62
+ ODOO_CLI_E2E=1 ODOO_CLI_E2E_ODOO_REPO=~/src/odoo \
63
+ python3 -m unittest discover tests/e2e -v # real-Odoo flows (slow, opt-in)
64
+ ```
65
+
66
+ Architecture, layering rules, and the testing strategy are documented in
67
+ [`docs/architecture.md`](docs/architecture.md).