thronetools 1.0.4__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.
@@ -0,0 +1,14 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ commit-message:
8
+ prefix: ⬆
9
+ - package-ecosystem: uv
10
+ directory: /
11
+ schedule:
12
+ interval: weekly
13
+ commit-message:
14
+ prefix: ⬆
@@ -0,0 +1,48 @@
1
+ name: Build and Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+ id-token: write
12
+
13
+ jobs:
14
+ release:
15
+ runs-on: ubuntu-latest
16
+ environment:
17
+ name: pypi
18
+
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4
22
+ with:
23
+ fetch-depth: 0
24
+
25
+ - name: Set up UV
26
+ uses: astral-sh/setup-uv@v7
27
+ with:
28
+ python-version: "3.14"
29
+
30
+ - name: Install dependencies
31
+ run: |
32
+ uv tool install python-semantic-release
33
+
34
+ - name: Configure Git
35
+ run: |
36
+ git config user.name ${{ github.actor }}
37
+ git config user.email ${{ github.actor }}@users.noreply.github.com
38
+
39
+ - name: Semantic Release (Version, Tag, GitHub Release)
40
+ id: semantic-release
41
+ env:
42
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43
+ run: |
44
+ semantic-release version --changelog --tag
45
+ - name: Build
46
+ run: uv build
47
+ - name: Publish package distributions to PyPI
48
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,12 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+ .ruff_cache/
12
+ .python-version
@@ -0,0 +1,41 @@
1
+ # <type>(<scope>): <subject>
2
+ #
3
+ # <body>
4
+ #
5
+ # <footer>
6
+
7
+ # Type should be one of the following:
8
+ # * feat: A new feature
9
+ # * fix: A bug fix
10
+ # * docs: Documentation only changes
11
+ # * style: Changes that do not affect the meaning of the code
12
+ # * refactor: A code change that neither fixes a bug nor adds a feature
13
+ # * perf: A code change that improves performance
14
+ # * test: Adding missing tests or correcting existing tests
15
+ # * build: Changes that affect the build system or external dependencies
16
+ # * ci: Changes to our CI configuration files and scripts
17
+ # * chore: Other changes that don't modify src or test files
18
+ # * revert: Reverts a previous commit
19
+
20
+ # Scope is optional and should be the name of the package affected
21
+ # (as perceived by the person reading the changelog)
22
+
23
+ # Subject line should:
24
+ # * use the imperative, present tense: "change" not "changed" nor "changes"
25
+ # * not capitalize the first letter
26
+ # * not end with a dot (.)
27
+
28
+ # Body should include the motivation for the change and contrast this with previous behavior
29
+
30
+ # Footer should contain:
31
+ # * Information about Breaking Changes
32
+ # * Reference GitHub issues that this commit closes
33
+
34
+ # Examples:
35
+ # feat(parser): add ability to parse arrays
36
+ # fix(release): need to depend on latest rxjs and zone.js
37
+ # docs(changelog): update changelog to beta.5
38
+ # fix(release): need to depend on latest rxjs and zone.js
39
+ # feat(lang): add polish language
40
+ # perf(core): improve bundle size by removing debug code
41
+ # BREAKING CHANGE: The graphiteWidth option has been removed.
@@ -0,0 +1 @@
1
+ # CHANGELOG
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: thronetools
3
+ Version: 1.0.4
4
+ Summary: Cross-platform installer and management CLI for Throne
5
+ Project-URL: Homepage, https://github.com/arian24b/thronetools
6
+ Project-URL: Repository, https://github.com/arian24b/thronetools
7
+ Project-URL: Issues, https://github.com/arian24b/thronetools/issues
8
+ Author-email: Arian Omrani <arian24b@gmail.com>
9
+ License-Expression: MIT
10
+ Keywords: cli,hotspot,installer,proxy,throne
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: typer>=0.24.0
22
+ Description-Content-Type: text/markdown
23
+
24
+ # ThroneTools
25
+
26
+ Cross-platform CLI to install, reinstall, uninstall, and manage configuration for **Throne** and **NekoRay** on Linux, macOS, and Windows.
27
+
28
+ ## Requirements
29
+
30
+ - Python 3.10+
31
+ - [uv](https://docs.astral.sh/uv/)
32
+
33
+ ## Quick Start (uv)
34
+
35
+ ```bash
36
+ # from repo root
37
+ uv sync
38
+ uv run thronetools --help
39
+ ```
40
+
41
+ ### Interactive mode
42
+
43
+ Run without subcommands to open the interactive menu:
44
+
45
+ ```bash
46
+ uv run python thronetools.py
47
+ ```
48
+
49
+ ## Commands
50
+
51
+ ```bash
52
+ thronetools install
53
+ thronetools backup --app {throne|nekoray} [--output <path-or-dir>]
54
+ thronetools restore --app {throne|nekoray} --zip <backup.zip>
55
+ thronetools remove --app {throne|nekoray}
56
+ thronetools reinstall --app {throne|nekoray} [--backup] [--output <path-or-dir>] [--force]
57
+ thronetools info --app {throne|nekoray}
58
+ thronetools hotspot enable [--iface <iface>] [--ssid <name>] [--password <pass>] [--dry-run]
59
+ thronetools hotspot disable [--dry-run]
60
+ ```
61
+
62
+ ## Common Examples
63
+
64
+ ```bash
65
+ # Install Throne
66
+ uv run thronetools install
67
+
68
+ # Backup Throne config to current directory
69
+ uv run thronetools backup --app throne
70
+
71
+ # Backup NekoRay config to a specific folder
72
+ uv run thronetools backup --app nekoray --output ~/Backups
73
+
74
+ # Restore Throne config
75
+ uv run thronetools restore --app throne --zip ~/Backups/throne-backup-2026-02-17.zip
76
+
77
+ # Reinstall with backup + restore flow
78
+ uv run thronetools reinstall --app throne --backup
79
+
80
+ # Show installed app details
81
+ uv run thronetools info --app throne
82
+
83
+ # Preview hotspot commands without applying changes
84
+ uv run thronetools hotspot enable --iface wlp2s0 --dry-run
85
+ ```
86
+
87
+ ## Notes
88
+
89
+ - `hotspot` commands are supported on Linux and macOS. On Windows, hotspot subcommands are not available.
90
+ - Some operations require elevated privileges depending on platform/package manager.
91
+
92
+ ## Development
93
+
94
+ ```bash
95
+ # Lint/format (Ruff is configured in pyproject.toml)
96
+ uv run ruff check .
97
+ uv run ruff format .
98
+
99
+ # Build package
100
+ uv build
101
+ ```
102
+
103
+ ## Install as a tool (optional)
104
+
105
+ If you want a globally available command via `uv`:
106
+
107
+ ```bash
108
+ uv tool install .
109
+ thronetools --help
110
+ ```
111
+
112
+ To update later:
113
+
114
+ ```bash
115
+ uv tool upgrade thronetools
116
+ ```
@@ -0,0 +1,93 @@
1
+ # ThroneTools
2
+
3
+ Cross-platform CLI to install, reinstall, uninstall, and manage configuration for **Throne** and **NekoRay** on Linux, macOS, and Windows.
4
+
5
+ ## Requirements
6
+
7
+ - Python 3.10+
8
+ - [uv](https://docs.astral.sh/uv/)
9
+
10
+ ## Quick Start (uv)
11
+
12
+ ```bash
13
+ # from repo root
14
+ uv sync
15
+ uv run thronetools --help
16
+ ```
17
+
18
+ ### Interactive mode
19
+
20
+ Run without subcommands to open the interactive menu:
21
+
22
+ ```bash
23
+ uv run python thronetools.py
24
+ ```
25
+
26
+ ## Commands
27
+
28
+ ```bash
29
+ thronetools install
30
+ thronetools backup --app {throne|nekoray} [--output <path-or-dir>]
31
+ thronetools restore --app {throne|nekoray} --zip <backup.zip>
32
+ thronetools remove --app {throne|nekoray}
33
+ thronetools reinstall --app {throne|nekoray} [--backup] [--output <path-or-dir>] [--force]
34
+ thronetools info --app {throne|nekoray}
35
+ thronetools hotspot enable [--iface <iface>] [--ssid <name>] [--password <pass>] [--dry-run]
36
+ thronetools hotspot disable [--dry-run]
37
+ ```
38
+
39
+ ## Common Examples
40
+
41
+ ```bash
42
+ # Install Throne
43
+ uv run thronetools install
44
+
45
+ # Backup Throne config to current directory
46
+ uv run thronetools backup --app throne
47
+
48
+ # Backup NekoRay config to a specific folder
49
+ uv run thronetools backup --app nekoray --output ~/Backups
50
+
51
+ # Restore Throne config
52
+ uv run thronetools restore --app throne --zip ~/Backups/throne-backup-2026-02-17.zip
53
+
54
+ # Reinstall with backup + restore flow
55
+ uv run thronetools reinstall --app throne --backup
56
+
57
+ # Show installed app details
58
+ uv run thronetools info --app throne
59
+
60
+ # Preview hotspot commands without applying changes
61
+ uv run thronetools hotspot enable --iface wlp2s0 --dry-run
62
+ ```
63
+
64
+ ## Notes
65
+
66
+ - `hotspot` commands are supported on Linux and macOS. On Windows, hotspot subcommands are not available.
67
+ - Some operations require elevated privileges depending on platform/package manager.
68
+
69
+ ## Development
70
+
71
+ ```bash
72
+ # Lint/format (Ruff is configured in pyproject.toml)
73
+ uv run ruff check .
74
+ uv run ruff format .
75
+
76
+ # Build package
77
+ uv build
78
+ ```
79
+
80
+ ## Install as a tool (optional)
81
+
82
+ If you want a globally available command via `uv`:
83
+
84
+ ```bash
85
+ uv tool install .
86
+ thronetools --help
87
+ ```
88
+
89
+ To update later:
90
+
91
+ ```bash
92
+ uv tool upgrade thronetools
93
+ ```
@@ -0,0 +1,80 @@
1
+ [project]
2
+ name = "thronetools"
3
+ version = "1.0.4"
4
+ description = "Cross-platform installer and management CLI for Throne"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ authors = [
8
+ {name = "Arian Omrani", email = "arian24b@gmail.com"}
9
+ ]
10
+ license = "MIT"
11
+ classifiers = [
12
+ "Development Status :: 5 - Production/Stable",
13
+ "Intended Audience :: Developers",
14
+ "Operating System :: OS Independent",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.10",
17
+ "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Programming Language :: Python :: 3.14",
21
+ ]
22
+ keywords = ["throne", "cli", "installer", "hotspot", "proxy"]
23
+ dependencies = [
24
+ "typer>=0.24.0",
25
+ ]
26
+
27
+ [project.scripts]
28
+ thronetools = "thronetools:main"
29
+
30
+ [project.urls]
31
+ Homepage = "https://github.com/arian24b/thronetools"
32
+ Repository = "https://github.com/arian24b/thronetools"
33
+ Issues = "https://github.com/arian24b/thronetools/issues"
34
+
35
+ [build-system]
36
+ requires = ["hatchling"]
37
+ build-backend = "hatchling.build"
38
+
39
+ [tool.semantic_release]
40
+ commit_parser = "conventional"
41
+ commit_author = "Arian Omrani <arian24b@gmail.com>"
42
+ branch = "main"
43
+ version_toml = ["pyproject.toml:project.version"]
44
+ upload_to_vcs_release = false
45
+ build_command = "uv build"
46
+
47
+ [tool.ruff]
48
+ line-length = 120
49
+ indent-width = 4
50
+ respect-gitignore = true
51
+ fix = true
52
+ show-fixes = true
53
+
54
+ [tool.ruff.format]
55
+ docstring-code-format = true
56
+ docstring-code-line-length = "dynamic"
57
+
58
+ [tool.ruff.lint]
59
+ select = [
60
+ "E", # pycodestyle errors
61
+ "W", # pycodestyle warnings
62
+ "F", # Pyflakes
63
+ "I", # isort
64
+ "N", # pep8-naming
65
+ "UP", # pyupgrade
66
+ "S", # bandit
67
+ "B", # flake8-bugbear
68
+ "A", # flake8-builtins
69
+ "C4", # flake8-comprehensions
70
+ "DTZ", # flake8-datetimez
71
+ "T20", # flake8-print
72
+ "SIM", # flake8-simplify
73
+ "LOG", # flake8-logging
74
+ "RUF", # Ruff-specific rules
75
+ ]
76
+ ignore = [
77
+ "S101", # Use of assert detected (needed for tests)
78
+ "T20", # print statements (CLI tool)
79
+ "A003", # Class attribute shadows builtin
80
+ ]