fujin-cli 0.9.1__tar.gz → 0.10.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.

Potentially problematic release.


This version of fujin-cli might be problematic. Click here for more details.

Files changed (81) hide show
  1. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/CHANGELOG.md +6 -0
  2. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/PKG-INFO +1 -1
  3. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/server.rst +0 -10
  4. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/index.rst +0 -1
  5. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/installation.rst +1 -1
  6. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/secrets.rst +23 -1
  7. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/pyproject.toml +2 -2
  8. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/prune.py +1 -1
  9. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/config.py +2 -0
  10. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/secrets/__init__.py +2 -0
  11. fujin_cli-0.10.0/src/fujin/secrets/dopppler.py +31 -0
  12. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/uv.lock +1 -1
  13. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/.github/workflows/publish.yml +0 -0
  14. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/.gitignore +0 -0
  15. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/.pre-commit-config.yaml +0 -0
  16. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/.readthedocs.yaml +0 -0
  17. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/LICENSE.txt +0 -0
  18. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/README.md +0 -0
  19. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/Vagrantfile +0 -0
  20. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/changelog.rst +0 -0
  21. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/app.rst +0 -0
  22. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/config.rst +0 -0
  23. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/deploy.rst +0 -0
  24. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/docs.rst +0 -0
  25. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/down.rst +0 -0
  26. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/index.rst +0 -0
  27. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/init.rst +0 -0
  28. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/printenv.rst +0 -0
  29. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/proxy.rst +0 -0
  30. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/prune.rst +0 -0
  31. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/redeploy.rst +0 -0
  32. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/rollback.rst +0 -0
  33. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/commands/up.rst +0 -0
  34. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/conf.py +0 -0
  35. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/configuration.rst +0 -0
  36. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/hooks.rst +0 -0
  37. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/requirements.txt +0 -0
  38. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/docs/tutorial.rst +0 -0
  39. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/README.md +0 -0
  40. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/bookstore/__init__.py +0 -0
  41. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/bookstore/__main__.py +0 -0
  42. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/bookstore/asgi.py +0 -0
  43. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/bookstore/settings.py +0 -0
  44. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/bookstore/urls.py +0 -0
  45. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/bookstore/wsgi.py +0 -0
  46. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/fujin.toml +0 -0
  47. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/manage.py +0 -0
  48. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/pyproject.toml +0 -0
  49. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/django/bookstore/requirements.txt +0 -0
  50. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/golang/pocketbase/.env.prod +0 -0
  51. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/examples/golang/pocketbase/fujin.toml +0 -0
  52. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/justfile +0 -0
  53. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/__init__.py +0 -0
  54. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/__main__.py +0 -0
  55. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/__init__.py +0 -0
  56. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/_base.py +0 -0
  57. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/app.py +0 -0
  58. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/config.py +0 -0
  59. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/deploy.py +0 -0
  60. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/docs.py +0 -0
  61. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/down.py +0 -0
  62. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/init.py +0 -0
  63. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/printenv.py +0 -0
  64. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/proxy.py +0 -0
  65. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/redeploy.py +0 -0
  66. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/rollback.py +0 -0
  67. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/server.py +0 -0
  68. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/commands/up.py +0 -0
  69. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/connection.py +0 -0
  70. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/errors.py +0 -0
  71. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/hooks.py +0 -0
  72. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/proxies/__init__.py +0 -0
  73. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/proxies/caddy.py +0 -0
  74. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/proxies/dummy.py +0 -0
  75. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/proxies/nginx.py +0 -0
  76. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/secrets/bitwarden.py +0 -0
  77. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/secrets/onepassword.py +0 -0
  78. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/systemd.py +0 -0
  79. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/templates/simple.service +0 -0
  80. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/templates/web.service +0 -0
  81. {fujin_cli-0.9.1 → fujin_cli-0.10.0}/src/fujin/templates/web.socket +0 -0
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.10.0] - 2024-11-24
8
+
9
+ ### 🚀 Features
10
+
11
+ - Add doppler support to secrets
12
+
7
13
  ## [0.9.1] - 2024-11-23
8
14
 
9
15
  ### 🚜 Refactor
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fujin-cli
3
- Version: 0.9.1
3
+ Version: 0.10.0
4
4
  Summary: Get your project up and running in a few minutes on your own vps.
5
5
  Project-URL: Documentation, https://github.com/falcopackages/fujin#readme
6
6
  Project-URL: Issues, https://github.com/falcopackages/fujin/issues
@@ -4,13 +4,3 @@ server
4
4
  .. cappa:: fujin.commands.up.Server
5
5
  :style: terminal
6
6
  :terminal-width: 0
7
-
8
-
9
- bootstrap
10
- ---------
11
-
12
- exec
13
- ----
14
-
15
- create-user
16
- -----------
@@ -17,7 +17,6 @@ fujin documentation
17
17
 
18
18
  .. toctree::
19
19
  :maxdepth: 2
20
- :caption: Contents:
21
20
  :hidden:
22
21
 
23
22
  installation
@@ -20,4 +20,4 @@ Here is an example of how to install the binary on x86 macOS:
20
20
 
21
21
  .. note::
22
22
 
23
- If you install ``fujin`` via the GitHub release, you can keep it up to date with ``fujin self update``.
23
+ If you install ``fujin`` using the binary file, you can keep it up to date with ``fujin self update``.
@@ -47,4 +47,26 @@ Update your ``fujin.toml`` file with the following configuration:
47
47
 
48
48
  DEBUG=False
49
49
  AWS_ACCESS_KEY_ID=$op://personal/aws-access-key-id/password
50
- AWS_SECRET_ACCESS_KEY=$op://personal/aws-secret-access-key/password
50
+ AWS_SECRET_ACCESS_KEY=$op://personal/aws-secret-access-key/password
51
+
52
+ Doppler
53
+ -------
54
+
55
+ Download and install the `Doppler CLI <https://docs.doppler.com/docs/cli>`_, and sign in to your account.
56
+ Move to your project root directory and run ``doppler setup`` to configure your project.
57
+
58
+ Update your ``fujin.toml`` file with the following configuration:
59
+
60
+ .. code-block:: toml
61
+
62
+ [secrets]
63
+ adapter = "doppler"
64
+
65
+ .. code-block:: text
66
+ :caption: Example of an environment file with doppler secrets
67
+
68
+ DEBUG=False
69
+ AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
70
+ AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
71
+
72
+
@@ -7,7 +7,7 @@ requires = [
7
7
 
8
8
  [project]
9
9
  name = "fujin-cli"
10
- version = "0.9.1"
10
+ version = "0.10.0"
11
11
  description = "Get your project up and running in a few minutes on your own vps."
12
12
  readme = "README.md"
13
13
  keywords = [
@@ -154,7 +154,7 @@ lint.isort.required-imports = [
154
154
  lint.pyupgrade.keep-runtime-typing = true
155
155
 
156
156
  [tool.bumpversion]
157
- current_version = "0.9.1"
157
+ current_version = "0.10.0"
158
158
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
159
159
  serialize = [
160
160
  "{major}.{minor}.{patch}",
@@ -8,7 +8,7 @@ from fujin.commands import BaseCommand
8
8
 
9
9
 
10
10
  @cappa.command(
11
- help="Prune old version artifacts, keeping only the specified number of recent versions"
11
+ help="Prune old artifacts, keeping only the specified number of recent versions"
12
12
  )
13
13
  @dataclass
14
14
  class Prune(BaseCommand):
@@ -55,6 +55,7 @@ The secret management service to use. Available options:
55
55
 
56
56
  - ``bitwarden``
57
57
  - ``1password``
58
+ - ``doppler``
58
59
 
59
60
  password_env
60
61
  ~~~~~~~~~~~~
@@ -221,6 +222,7 @@ class InstallationMode(StrEnum):
221
222
  class SecretAdapter(StrEnum):
222
223
  BITWARDEN = "bitwarden"
223
224
  ONE_PASSWORD = "1password"
225
+ DOPPLER = "doppler"
224
226
 
225
227
 
226
228
  class SecretConfig(msgspec.Struct):
@@ -10,6 +10,7 @@ from dotenv import dotenv_values
10
10
  from fujin.config import SecretAdapter
11
11
  from fujin.config import SecretConfig
12
12
  from .bitwarden import bitwarden
13
+ from .dopppler import doppler
13
14
  from .onepassword import one_password
14
15
 
15
16
  secret_reader = Callable[[str], str]
@@ -18,6 +19,7 @@ secret_adapter_context = Callable[[SecretConfig], ContextManager[secret_reader]]
18
19
  adapter_to_context: dict[SecretAdapter, secret_adapter_context] = {
19
20
  SecretAdapter.BITWARDEN: bitwarden,
20
21
  SecretAdapter.ONE_PASSWORD: one_password,
22
+ SecretAdapter.DOPPLER: doppler,
21
23
  }
22
24
 
23
25
 
@@ -0,0 +1,31 @@
1
+ from __future__ import annotations
2
+
3
+ import subprocess
4
+ from contextlib import contextmanager
5
+ from typing import Generator
6
+ from typing import TYPE_CHECKING
7
+
8
+ import cappa
9
+
10
+ from fujin.config import SecretConfig
11
+
12
+ if TYPE_CHECKING:
13
+ from . import secret_reader
14
+
15
+
16
+ @contextmanager
17
+ def doppler(_: SecretConfig) -> Generator[secret_reader, None, None]:
18
+ def read_secret(name: str) -> str:
19
+ result = subprocess.run(
20
+ ["doppler", "run", "--command", f"echo ${name}"],
21
+ capture_output=True,
22
+ text=True,
23
+ )
24
+ if result.returncode != 0:
25
+ raise cappa.Exit(result.stderr)
26
+ return result.stdout.strip()
27
+
28
+ try:
29
+ yield read_secret
30
+ finally:
31
+ pass
@@ -477,7 +477,7 @@ wheels = [
477
477
 
478
478
  [[package]]
479
479
  name = "fujin-cli"
480
- version = "0.9.1"
480
+ version = "0.10.0"
481
481
  source = { editable = "." }
482
482
  dependencies = [
483
483
  { name = "cappa" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes