localargo 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.
- localargo-0.1.0/.github/workflows/ci.yml +115 -0
- localargo-0.1.0/.github/workflows/python-publish.yml +70 -0
- localargo-0.1.0/.gitignore +72 -0
- localargo-0.1.0/LICENSE +21 -0
- localargo-0.1.0/PKG-INFO +149 -0
- localargo-0.1.0/README.md +117 -0
- localargo-0.1.0/clusters.yaml +20 -0
- localargo-0.1.0/docs/README.md +52 -0
- localargo-0.1.0/docs/book.toml +23 -0
- localargo-0.1.0/docs/src/SUMMARY.md +8 -0
- localargo-0.1.0/docs/src/contributing.md +152 -0
- localargo-0.1.0/docs/src/installation.md +121 -0
- localargo-0.1.0/docs/src/introduction.md +53 -0
- localargo-0.1.0/docs/src/testing.md +115 -0
- localargo-0.1.0/docs/src/usage.md +320 -0
- localargo-0.1.0/docs/src/usage_eye_candy.md +133 -0
- localargo-0.1.0/mise.toml +54 -0
- localargo-0.1.0/pyproject.toml +119 -0
- localargo-0.1.0/src/localargo/__about__.py +6 -0
- localargo-0.1.0/src/localargo/__init__.py +6 -0
- localargo-0.1.0/src/localargo/__main__.py +11 -0
- localargo-0.1.0/src/localargo/cli/__init__.py +49 -0
- localargo-0.1.0/src/localargo/cli/commands/__init__.py +5 -0
- localargo-0.1.0/src/localargo/cli/commands/app.py +150 -0
- localargo-0.1.0/src/localargo/cli/commands/cluster.py +312 -0
- localargo-0.1.0/src/localargo/cli/commands/debug.py +478 -0
- localargo-0.1.0/src/localargo/cli/commands/port_forward.py +311 -0
- localargo-0.1.0/src/localargo/cli/commands/secrets.py +300 -0
- localargo-0.1.0/src/localargo/cli/commands/sync.py +291 -0
- localargo-0.1.0/src/localargo/cli/commands/template.py +288 -0
- localargo-0.1.0/src/localargo/cli/commands/up.py +341 -0
- localargo-0.1.0/src/localargo/config/__init__.py +15 -0
- localargo-0.1.0/src/localargo/config/manifest.py +520 -0
- localargo-0.1.0/src/localargo/config/store.py +66 -0
- localargo-0.1.0/src/localargo/core/__init__.py +6 -0
- localargo-0.1.0/src/localargo/core/apps.py +330 -0
- localargo-0.1.0/src/localargo/core/argocd.py +509 -0
- localargo-0.1.0/src/localargo/core/catalog.py +284 -0
- localargo-0.1.0/src/localargo/core/cluster.py +149 -0
- localargo-0.1.0/src/localargo/core/k8s.py +140 -0
- localargo-0.1.0/src/localargo/eyecandy/__init__.py +15 -0
- localargo-0.1.0/src/localargo/eyecandy/progress_steps.py +283 -0
- localargo-0.1.0/src/localargo/eyecandy/table_renderer.py +154 -0
- localargo-0.1.0/src/localargo/eyecandy/tables.py +57 -0
- localargo-0.1.0/src/localargo/logging.py +99 -0
- localargo-0.1.0/src/localargo/manager.py +232 -0
- localargo-0.1.0/src/localargo/providers/__init__.py +6 -0
- localargo-0.1.0/src/localargo/providers/base.py +146 -0
- localargo-0.1.0/src/localargo/providers/k3s.py +206 -0
- localargo-0.1.0/src/localargo/providers/kind.py +326 -0
- localargo-0.1.0/src/localargo/providers/registry.py +52 -0
- localargo-0.1.0/src/localargo/utils/__init__.py +4 -0
- localargo-0.1.0/src/localargo/utils/cli.py +231 -0
- localargo-0.1.0/src/localargo/utils/proc.py +148 -0
- localargo-0.1.0/src/localargo/utils/retry.py +58 -0
- localargo-0.1.0/tests/__init__.py +3 -0
- localargo-0.1.0/tests/conftest.py +306 -0
- localargo-0.1.0/tests/test_utils.py +288 -0
- localargo-0.1.0/tests/unit/__init__.py +0 -0
- localargo-0.1.0/tests/unit/test_argocd_facade.py +106 -0
- localargo-0.1.0/tests/unit/test_catalog_loader.py +76 -0
- localargo-0.1.0/tests/unit/test_cli_cluster.py +150 -0
- localargo-0.1.0/tests/unit/test_cli_eye_candy.py +129 -0
- localargo-0.1.0/tests/unit/test_cluster_manager.py +146 -0
- localargo-0.1.0/tests/unit/test_config_store.py +57 -0
- localargo-0.1.0/tests/unit/test_k3s_provider.py +248 -0
- localargo-0.1.0/tests/unit/test_k8s_helpers.py +23 -0
- localargo-0.1.0/tests/unit/test_kind_provider.py +270 -0
- localargo-0.1.0/tests/unit/test_manifest_loader.py +251 -0
- localargo-0.1.0/tests/unit/test_progress_steps.py +261 -0
- localargo-0.1.0/tests/unit/test_provider_registry.py +58 -0
- localargo-0.1.0/tests/unit/test_state_tracking.py +178 -0
- localargo-0.1.0/tests/unit/test_table_renderer.py +178 -0
@@ -0,0 +1,115 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- '**'
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- '**'
|
10
|
+
|
11
|
+
permissions:
|
12
|
+
contents: read
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
fmt:
|
16
|
+
name: hatch fmt
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
steps:
|
19
|
+
- name: Checkout
|
20
|
+
uses: actions/checkout@v4
|
21
|
+
- name: Set up Python
|
22
|
+
uses: actions/setup-python@v5
|
23
|
+
with:
|
24
|
+
python-version: '3.12'
|
25
|
+
cache: 'pip'
|
26
|
+
- name: Install Hatch
|
27
|
+
run: python -m pip install --upgrade pip hatch
|
28
|
+
- name: Run formatter
|
29
|
+
run: hatch fmt
|
30
|
+
- name: Fail if formatting changed files
|
31
|
+
run: |
|
32
|
+
git add -A
|
33
|
+
git diff --cached --exit-code
|
34
|
+
|
35
|
+
typecheck:
|
36
|
+
name: hatch run typecheck
|
37
|
+
runs-on: ubuntu-latest
|
38
|
+
steps:
|
39
|
+
- name: Checkout
|
40
|
+
uses: actions/checkout@v4
|
41
|
+
- name: Set up Python
|
42
|
+
uses: actions/setup-python@v5
|
43
|
+
with:
|
44
|
+
python-version: '3.12'
|
45
|
+
cache: 'pip'
|
46
|
+
- name: Install Hatch
|
47
|
+
run: python -m pip install --upgrade pip hatch
|
48
|
+
- name: Type check
|
49
|
+
run: hatch run typecheck
|
50
|
+
|
51
|
+
test:
|
52
|
+
name: hatch run test
|
53
|
+
runs-on: ubuntu-latest
|
54
|
+
steps:
|
55
|
+
- name: Checkout
|
56
|
+
uses: actions/checkout@v4
|
57
|
+
- name: Set up Python
|
58
|
+
uses: actions/setup-python@v5
|
59
|
+
with:
|
60
|
+
python-version: '3.12'
|
61
|
+
cache: 'pip'
|
62
|
+
- name: Install Hatch
|
63
|
+
run: python -m pip install --upgrade pip hatch
|
64
|
+
- name: Run tests
|
65
|
+
run: hatch run test
|
66
|
+
|
67
|
+
pylint:
|
68
|
+
name: hatch run pylint
|
69
|
+
runs-on: ubuntu-latest
|
70
|
+
steps:
|
71
|
+
- name: Checkout
|
72
|
+
uses: actions/checkout@v4
|
73
|
+
- name: Set up Python
|
74
|
+
uses: actions/setup-python@v5
|
75
|
+
with:
|
76
|
+
python-version: '3.12'
|
77
|
+
cache: 'pip'
|
78
|
+
- name: Install Hatch
|
79
|
+
run: python -m pip install --upgrade pip hatch
|
80
|
+
- name: Run pylint
|
81
|
+
run: hatch run pylint
|
82
|
+
|
83
|
+
pydoclint:
|
84
|
+
name: hatch run pydoclint
|
85
|
+
runs-on: ubuntu-latest
|
86
|
+
steps:
|
87
|
+
- name: Checkout
|
88
|
+
uses: actions/checkout@v4
|
89
|
+
- name: Set up Python
|
90
|
+
uses: actions/setup-python@v5
|
91
|
+
with:
|
92
|
+
python-version: '3.12'
|
93
|
+
cache: 'pip'
|
94
|
+
- name: Install Hatch
|
95
|
+
run: python -m pip install --upgrade pip hatch
|
96
|
+
- name: Run pydoclint
|
97
|
+
run: hatch run pydoclint
|
98
|
+
|
99
|
+
lizard:
|
100
|
+
name: hatch run lizard
|
101
|
+
runs-on: ubuntu-latest
|
102
|
+
steps:
|
103
|
+
- name: Checkout
|
104
|
+
uses: actions/checkout@v4
|
105
|
+
- name: Set up Python
|
106
|
+
uses: actions/setup-python@v5
|
107
|
+
with:
|
108
|
+
python-version: '3.12'
|
109
|
+
cache: 'pip'
|
110
|
+
- name: Install Hatch
|
111
|
+
run: python -m pip install --upgrade pip hatch
|
112
|
+
- name: Run lizard
|
113
|
+
run: hatch run lizard
|
114
|
+
|
115
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# This workflow will upload a Python Package to PyPI when a release is created
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
3
|
+
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
5
|
+
# They are provided by a third-party and are governed by
|
6
|
+
# separate terms of service, privacy policy, and support
|
7
|
+
# documentation.
|
8
|
+
|
9
|
+
name: Upload Python Package
|
10
|
+
|
11
|
+
on:
|
12
|
+
release:
|
13
|
+
types: [published]
|
14
|
+
|
15
|
+
permissions:
|
16
|
+
contents: read
|
17
|
+
|
18
|
+
jobs:
|
19
|
+
release-build:
|
20
|
+
runs-on: ubuntu-latest
|
21
|
+
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v4
|
24
|
+
|
25
|
+
- uses: actions/setup-python@v5
|
26
|
+
with:
|
27
|
+
python-version: "3.x"
|
28
|
+
|
29
|
+
- name: Build release distributions
|
30
|
+
run: |
|
31
|
+
# NOTE: put your own distribution build steps here.
|
32
|
+
python -m pip install build
|
33
|
+
python -m build
|
34
|
+
|
35
|
+
- name: Upload distributions
|
36
|
+
uses: actions/upload-artifact@v4
|
37
|
+
with:
|
38
|
+
name: release-dists
|
39
|
+
path: dist/
|
40
|
+
|
41
|
+
pypi-publish:
|
42
|
+
runs-on: ubuntu-latest
|
43
|
+
needs:
|
44
|
+
- release-build
|
45
|
+
permissions:
|
46
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
47
|
+
id-token: write
|
48
|
+
|
49
|
+
# Dedicated environments with protections for publishing are strongly recommended.
|
50
|
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
|
51
|
+
environment:
|
52
|
+
name: pypi
|
53
|
+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
|
54
|
+
# url: https://pypi.org/p/YOURPROJECT
|
55
|
+
#
|
56
|
+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
|
57
|
+
# ALTERNATIVE: exactly, uncomment the following line instead:
|
58
|
+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
|
59
|
+
|
60
|
+
steps:
|
61
|
+
- name: Retrieve release distributions
|
62
|
+
uses: actions/download-artifact@v4
|
63
|
+
with:
|
64
|
+
name: release-dists
|
65
|
+
path: dist/
|
66
|
+
|
67
|
+
- name: Publish release distributions to PyPI
|
68
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
69
|
+
with:
|
70
|
+
packages-dir: dist/
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# Python
|
2
|
+
__pycache__/
|
3
|
+
*.py[cod]
|
4
|
+
*$py.class
|
5
|
+
*.so
|
6
|
+
.Python
|
7
|
+
build/
|
8
|
+
develop-eggs/
|
9
|
+
dist/
|
10
|
+
downloads/
|
11
|
+
eggs/
|
12
|
+
.eggs/
|
13
|
+
lib/
|
14
|
+
lib64/
|
15
|
+
parts/
|
16
|
+
sdist/
|
17
|
+
var/
|
18
|
+
wheels/
|
19
|
+
*.egg-info/
|
20
|
+
.installed.cfg
|
21
|
+
*.egg
|
22
|
+
MANIFEST
|
23
|
+
|
24
|
+
# Virtual environments
|
25
|
+
.env
|
26
|
+
.venv
|
27
|
+
env/
|
28
|
+
venv/
|
29
|
+
ENV/
|
30
|
+
env.bak/
|
31
|
+
venv.bak/
|
32
|
+
|
33
|
+
# Testing
|
34
|
+
.coverage
|
35
|
+
htmlcov/
|
36
|
+
.tox/
|
37
|
+
.nox/
|
38
|
+
.pytest_cache/
|
39
|
+
|
40
|
+
# IDEs
|
41
|
+
.vscode/
|
42
|
+
.idea/
|
43
|
+
*.swp
|
44
|
+
*.swo
|
45
|
+
*~
|
46
|
+
|
47
|
+
# OS
|
48
|
+
.DS_Store
|
49
|
+
.DS_Store?
|
50
|
+
._*
|
51
|
+
.__*
|
52
|
+
.Spotlight-V100
|
53
|
+
.Trashes
|
54
|
+
ehthumbs.db
|
55
|
+
Thumbs.db
|
56
|
+
|
57
|
+
# Documentation build output
|
58
|
+
docs/book/
|
59
|
+
|
60
|
+
# Hatch
|
61
|
+
.hatch/
|
62
|
+
dist/
|
63
|
+
build/
|
64
|
+
|
65
|
+
# Mise
|
66
|
+
.mise/
|
67
|
+
|
68
|
+
# tarballs
|
69
|
+
*.tar.gz
|
70
|
+
*.tar
|
71
|
+
|
72
|
+
.localargo/
|
localargo-0.1.0/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 williamkborn
|
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.
|
localargo-0.1.0/PKG-INFO
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: localargo
|
3
|
+
Version: 0.1.0
|
4
|
+
Project-URL: Documentation, https://github.com/williamkborn/localargo#readme
|
5
|
+
Project-URL: Issues, https://github.com/williamkborn/localargo/issues
|
6
|
+
Project-URL: Source, https://github.com/williamkborn/localargo
|
7
|
+
Author-email: William Born <william.born.git@gmail.com>
|
8
|
+
License-Expression: MIT
|
9
|
+
License-File: LICENSE
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
11
|
+
Classifier: Programming Language :: Python
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
15
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
16
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
17
|
+
Requires-Python: >=3.10
|
18
|
+
Requires-Dist: click
|
19
|
+
Requires-Dist: pyyaml
|
20
|
+
Requires-Dist: rich
|
21
|
+
Requires-Dist: rich-click
|
22
|
+
Provides-Extra: dev
|
23
|
+
Requires-Dist: lizard; extra == 'dev'
|
24
|
+
Requires-Dist: mypy; extra == 'dev'
|
25
|
+
Requires-Dist: pydoclint; extra == 'dev'
|
26
|
+
Requires-Dist: pylint; extra == 'dev'
|
27
|
+
Requires-Dist: pytest; extra == 'dev'
|
28
|
+
Requires-Dist: types-pyyaml; extra == 'dev'
|
29
|
+
Provides-Extra: watch
|
30
|
+
Requires-Dist: watchdog>=2.0.0; extra == 'watch'
|
31
|
+
Description-Content-Type: text/markdown
|
32
|
+
|
33
|
+
# localargo
|
34
|
+
|
35
|
+
[](https://pypi.org/project/localargo)
|
36
|
+
[](https://pypi.org/project/localargo)
|
37
|
+
|
38
|
+
**Convenient ArgoCD local development tool**
|
39
|
+
|
40
|
+
Localargo is a command-line tool that makes ArgoCD development workflows faster and more convenient. It provides streamlined commands for managing local clusters, applications, secrets, port forwarding, and debugging - all designed specifically for ArgoCD development.
|
41
|
+
|
42
|
+
## Features
|
43
|
+
|
44
|
+
- 🚀 **Cluster Management**: Set up and switch between local/remote Kubernetes clusters
|
45
|
+
- 📦 **Application Management**: Create, sync, and manage ArgoCD applications
|
46
|
+
- 🌐 **Port Forwarding**: Easily access services running in your applications
|
47
|
+
- 🔐 **Secrets Management**: Create and manage secrets for local development
|
48
|
+
- 🔄 **Sync Operations**: Sync applications with watch mode for continuous development
|
49
|
+
- 📋 **Templates**: Quick-start applications from common templates
|
50
|
+
- 🔍 **Debug Tools**: Comprehensive debugging and troubleshooting utilities
|
51
|
+
|
52
|
+
## Quick Start
|
53
|
+
|
54
|
+
```bash
|
55
|
+
# Install localargo
|
56
|
+
pip install localargo
|
57
|
+
|
58
|
+
# Initialize a local cluster with ArgoCD (uses KinD by default)
|
59
|
+
localargo cluster init
|
60
|
+
|
61
|
+
# Create an application from a template
|
62
|
+
localargo template create my-app --repo https://github.com/myorg/myrepo
|
63
|
+
|
64
|
+
# Port forward services for easy access
|
65
|
+
localargo port-forward start my-service
|
66
|
+
|
67
|
+
# Sync and watch for changes
|
68
|
+
localargo sync my-app --watch
|
69
|
+
```
|
70
|
+
|
71
|
+
## Table of Contents
|
72
|
+
|
73
|
+
- [Installation](#installation)
|
74
|
+
- [Documentation](#documentation)
|
75
|
+
- [License](#license)
|
76
|
+
|
77
|
+
## Installation
|
78
|
+
|
79
|
+
```console
|
80
|
+
pip install localargo
|
81
|
+
```
|
82
|
+
|
83
|
+
### Development Setup
|
84
|
+
|
85
|
+
For contributors and development, we recommend using [Mise](https://mise.jdx.dev/) to set up the complete development environment:
|
86
|
+
|
87
|
+
```bash
|
88
|
+
# Install Mise (macOS with Homebrew)
|
89
|
+
brew install mise
|
90
|
+
|
91
|
+
# Install all development tools
|
92
|
+
mise install
|
93
|
+
|
94
|
+
# Create Hatch environment
|
95
|
+
hatch env create
|
96
|
+
|
97
|
+
# All tools will be automatically available
|
98
|
+
```
|
99
|
+
|
100
|
+
### 🧩 Git Hook Setup
|
101
|
+
|
102
|
+
To ensure code quality before every commit, enable the mise-managed pre-commit hook:
|
103
|
+
|
104
|
+
```bash
|
105
|
+
mise generate git-pre-commit --write --task=precommit
|
106
|
+
```
|
107
|
+
|
108
|
+
This creates `.git/hooks/pre-commit`, which automatically runs:
|
109
|
+
|
110
|
+
- `hatch fmt`
|
111
|
+
- `hatch run typecheck`
|
112
|
+
- `hatch run test`
|
113
|
+
|
114
|
+
If any step fails, the commit will be blocked until fixed.
|
115
|
+
|
116
|
+
You can also run it manually at any time:
|
117
|
+
|
118
|
+
```bash
|
119
|
+
mise run precommit
|
120
|
+
```
|
121
|
+
|
122
|
+
### Optional Dependencies
|
123
|
+
|
124
|
+
For file watching functionality:
|
125
|
+
```console
|
126
|
+
pip install localargo[watch]
|
127
|
+
```
|
128
|
+
|
129
|
+
## Documentation
|
130
|
+
|
131
|
+
📖 Full documentation is available at [docs/](docs/) and can be built locally using mdBook.
|
132
|
+
|
133
|
+
To build the documentation:
|
134
|
+
|
135
|
+
```console
|
136
|
+
# Install mdBook (if not already installed)
|
137
|
+
cargo install mdbook
|
138
|
+
|
139
|
+
# Build the docs
|
140
|
+
cd docs && mdbook build
|
141
|
+
|
142
|
+
# Or using Hatch
|
143
|
+
hatch run docs:build
|
144
|
+
```
|
145
|
+
|
146
|
+
## License
|
147
|
+
|
148
|
+
`localargo` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
149
|
+
# Test comment for precommit hook
|
@@ -0,0 +1,117 @@
|
|
1
|
+
# localargo
|
2
|
+
|
3
|
+
[](https://pypi.org/project/localargo)
|
4
|
+
[](https://pypi.org/project/localargo)
|
5
|
+
|
6
|
+
**Convenient ArgoCD local development tool**
|
7
|
+
|
8
|
+
Localargo is a command-line tool that makes ArgoCD development workflows faster and more convenient. It provides streamlined commands for managing local clusters, applications, secrets, port forwarding, and debugging - all designed specifically for ArgoCD development.
|
9
|
+
|
10
|
+
## Features
|
11
|
+
|
12
|
+
- 🚀 **Cluster Management**: Set up and switch between local/remote Kubernetes clusters
|
13
|
+
- 📦 **Application Management**: Create, sync, and manage ArgoCD applications
|
14
|
+
- 🌐 **Port Forwarding**: Easily access services running in your applications
|
15
|
+
- 🔐 **Secrets Management**: Create and manage secrets for local development
|
16
|
+
- 🔄 **Sync Operations**: Sync applications with watch mode for continuous development
|
17
|
+
- 📋 **Templates**: Quick-start applications from common templates
|
18
|
+
- 🔍 **Debug Tools**: Comprehensive debugging and troubleshooting utilities
|
19
|
+
|
20
|
+
## Quick Start
|
21
|
+
|
22
|
+
```bash
|
23
|
+
# Install localargo
|
24
|
+
pip install localargo
|
25
|
+
|
26
|
+
# Initialize a local cluster with ArgoCD (uses KinD by default)
|
27
|
+
localargo cluster init
|
28
|
+
|
29
|
+
# Create an application from a template
|
30
|
+
localargo template create my-app --repo https://github.com/myorg/myrepo
|
31
|
+
|
32
|
+
# Port forward services for easy access
|
33
|
+
localargo port-forward start my-service
|
34
|
+
|
35
|
+
# Sync and watch for changes
|
36
|
+
localargo sync my-app --watch
|
37
|
+
```
|
38
|
+
|
39
|
+
## Table of Contents
|
40
|
+
|
41
|
+
- [Installation](#installation)
|
42
|
+
- [Documentation](#documentation)
|
43
|
+
- [License](#license)
|
44
|
+
|
45
|
+
## Installation
|
46
|
+
|
47
|
+
```console
|
48
|
+
pip install localargo
|
49
|
+
```
|
50
|
+
|
51
|
+
### Development Setup
|
52
|
+
|
53
|
+
For contributors and development, we recommend using [Mise](https://mise.jdx.dev/) to set up the complete development environment:
|
54
|
+
|
55
|
+
```bash
|
56
|
+
# Install Mise (macOS with Homebrew)
|
57
|
+
brew install mise
|
58
|
+
|
59
|
+
# Install all development tools
|
60
|
+
mise install
|
61
|
+
|
62
|
+
# Create Hatch environment
|
63
|
+
hatch env create
|
64
|
+
|
65
|
+
# All tools will be automatically available
|
66
|
+
```
|
67
|
+
|
68
|
+
### 🧩 Git Hook Setup
|
69
|
+
|
70
|
+
To ensure code quality before every commit, enable the mise-managed pre-commit hook:
|
71
|
+
|
72
|
+
```bash
|
73
|
+
mise generate git-pre-commit --write --task=precommit
|
74
|
+
```
|
75
|
+
|
76
|
+
This creates `.git/hooks/pre-commit`, which automatically runs:
|
77
|
+
|
78
|
+
- `hatch fmt`
|
79
|
+
- `hatch run typecheck`
|
80
|
+
- `hatch run test`
|
81
|
+
|
82
|
+
If any step fails, the commit will be blocked until fixed.
|
83
|
+
|
84
|
+
You can also run it manually at any time:
|
85
|
+
|
86
|
+
```bash
|
87
|
+
mise run precommit
|
88
|
+
```
|
89
|
+
|
90
|
+
### Optional Dependencies
|
91
|
+
|
92
|
+
For file watching functionality:
|
93
|
+
```console
|
94
|
+
pip install localargo[watch]
|
95
|
+
```
|
96
|
+
|
97
|
+
## Documentation
|
98
|
+
|
99
|
+
📖 Full documentation is available at [docs/](docs/) and can be built locally using mdBook.
|
100
|
+
|
101
|
+
To build the documentation:
|
102
|
+
|
103
|
+
```console
|
104
|
+
# Install mdBook (if not already installed)
|
105
|
+
cargo install mdbook
|
106
|
+
|
107
|
+
# Build the docs
|
108
|
+
cd docs && mdbook build
|
109
|
+
|
110
|
+
# Or using Hatch
|
111
|
+
hatch run docs:build
|
112
|
+
```
|
113
|
+
|
114
|
+
## License
|
115
|
+
|
116
|
+
`localargo` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
117
|
+
# Test comment for precommit hook
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Example cluster manifest for LocalArgo
|
2
|
+
# This file defines clusters that can be managed declaratively
|
3
|
+
|
4
|
+
clusters:
|
5
|
+
# Development cluster using KinD
|
6
|
+
- name: dev-cluster
|
7
|
+
provider: kind
|
8
|
+
# Additional provider-specific options can be added here
|
9
|
+
# For example, you could specify Kubernetes version, node configuration, etc.
|
10
|
+
|
11
|
+
# Staging cluster using k3s
|
12
|
+
- name: staging-cluster
|
13
|
+
provider: k3s
|
14
|
+
# Provider-specific configuration would go here
|
15
|
+
# For k3s, you might specify server configuration, networking options, etc.
|
16
|
+
|
17
|
+
# Production-like cluster for testing
|
18
|
+
- name: prod-like-cluster
|
19
|
+
provider: kind
|
20
|
+
# Multiple clusters of the same provider type are supported
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Localargo Documentation
|
2
|
+
|
3
|
+
This directory contains the documentation for Localargo, built using [mdBook](https://rust-lang.github.io/mdBook/).
|
4
|
+
|
5
|
+
## Building the Documentation
|
6
|
+
|
7
|
+
### Prerequisites
|
8
|
+
|
9
|
+
Install mdBook:
|
10
|
+
|
11
|
+
```bash
|
12
|
+
# Using cargo (recommended)
|
13
|
+
cargo install mdbook
|
14
|
+
|
15
|
+
# Or download pre-built binaries from:
|
16
|
+
# https://github.com/rust-lang/mdBook/releases
|
17
|
+
```
|
18
|
+
|
19
|
+
### Build
|
20
|
+
|
21
|
+
```bash
|
22
|
+
# From the docs directory
|
23
|
+
./build.sh
|
24
|
+
|
25
|
+
# Or manually
|
26
|
+
mdbook build
|
27
|
+
```
|
28
|
+
|
29
|
+
### Serve Locally
|
30
|
+
|
31
|
+
To serve the documentation with live reloading during development:
|
32
|
+
|
33
|
+
```bash
|
34
|
+
mdbook serve
|
35
|
+
```
|
36
|
+
|
37
|
+
Then open http://localhost:3000 in your browser.
|
38
|
+
|
39
|
+
## Documentation Structure
|
40
|
+
|
41
|
+
- `book.toml`: mdBook configuration
|
42
|
+
- `src/`: Markdown source files
|
43
|
+
- `SUMMARY.md`: Table of contents
|
44
|
+
- `introduction.md`: Project introduction
|
45
|
+
- `installation.md`: Installation instructions
|
46
|
+
- `usage.md`: Usage guide
|
47
|
+
- `contributing.md`: Contributing guidelines
|
48
|
+
- `build.sh`: Build script
|
49
|
+
|
50
|
+
## Output
|
51
|
+
|
52
|
+
Built documentation will be available in the `book/` directory.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
[book]
|
2
|
+
title = "Localargo Documentation"
|
3
|
+
authors = ["William Born"]
|
4
|
+
description = "Documentation for Localargo, a Python CLI tool"
|
5
|
+
language = "en"
|
6
|
+
|
7
|
+
[build]
|
8
|
+
build-dir = "book"
|
9
|
+
create-missing = false
|
10
|
+
|
11
|
+
[output.html]
|
12
|
+
default-theme = "ayu"
|
13
|
+
preferred-dark-theme = "ayu"
|
14
|
+
smart-punctuation = true
|
15
|
+
mathjax-support = false
|
16
|
+
copy-fonts = true
|
17
|
+
additional-css = []
|
18
|
+
additional-js = []
|
19
|
+
no-section-label = false
|
20
|
+
git-repository-url = "https://github.com/William Born/localargo"
|
21
|
+
git-repository-icon = "fa-github"
|
22
|
+
edit-url-template = "https://github.com/William Born/localargo/edit/main/docs/{path}"
|
23
|
+
site-url = "/localargo/"
|