dev-setup 1.0.0__tar.gz → 1.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.
- {dev_setup-1.0.0 → dev_setup-1.1.0}/PKG-INFO +35 -12
- {dev_setup-1.0.0 → dev_setup-1.1.0}/README.md +34 -11
- dev_setup-1.1.0/dev-setup +66 -0
- dev_setup-1.1.0/install.sh +67 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/pyproject.toml +1 -4
- {dev_setup-1.0.0 → dev_setup-1.1.0}/uv.lock +1 -1
- dev_setup-1.0.0/dev-setup +0 -26
- dev_setup-1.0.0/install.sh +0 -25
- {dev_setup-1.0.0 → dev_setup-1.1.0}/.gitignore +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/__init__.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/__main__.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/base.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/cli.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/commands/__init__.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/commands/add_cmd.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/commands/delete_cmd.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/commands/help_cmd.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/commands/install_cmd.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/commands/list_cmd.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/commands/remove_cmd.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/generic.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/packages/__init__.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/packages/aws_cli.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/packages/docker.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/packages/htop.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/packages/nvm.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/packages/php.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/packages/saml2aws.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/packages/starship.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/packages/uv_tool.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/registry.py +0 -0
- {dev_setup-1.0.0 → dev_setup-1.1.0}/src/dev_setup/ui.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dev-setup
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Development environment setup CLI for Linux
|
|
5
5
|
Project-URL: Repository, https://github.com/thesawdawg/dev-setup-py
|
|
6
6
|
Author-email: Sawyer <sawyerksu@gmail.com>
|
|
@@ -30,29 +30,52 @@ A Python-based CLI for managing your Linux development environment. Install, rem
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Installation
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
### From PyPI (recommended)
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
2. Runs `uv run --project <dir> python -m dev_setup` — uv provisions Python 3.11+ if needed
|
|
39
|
-
3. All further logic (commands, UI, installs) is pure Python
|
|
37
|
+
The simplest install — no git clone required, Python 3.11+ is the only prerequisite:
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
```bash
|
|
40
|
+
# pipx gives the tool its own isolated environment (preferred)
|
|
41
|
+
pipx install dev-setup
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
# or plain pip
|
|
44
|
+
pip install dev-setup
|
|
45
|
+
```
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
After install, `dev-setup` is available as a command. Run `dev-setup --help` to verify.
|
|
48
|
+
|
|
49
|
+
### From source (development)
|
|
46
50
|
|
|
47
51
|
```bash
|
|
48
52
|
git clone <repo-url> ~/dev-setup-py
|
|
49
53
|
cd ~/dev-setup-py
|
|
50
|
-
bash install.sh
|
|
54
|
+
bash install.sh # installs from PyPI via pipx or pip
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Or to run directly from the cloned repo without installing:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
./dev-setup list # creates a .venv on first run, then stays fast
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The `./dev-setup` bash script requires Python 3.11+ and creates a local `.venv` automatically. On Debian/Ubuntu, if `python3-venv` is not installed, it falls back to `uv venv` if uv is available.
|
|
64
|
+
|
|
65
|
+
For editable development installs:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install -e .
|
|
69
|
+
dev-setup list
|
|
51
70
|
```
|
|
52
71
|
|
|
53
|
-
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## How it works
|
|
75
|
+
|
|
76
|
+
When installed from PyPI (via `pip` or `pipx`), the `dev-setup` command is a standard Python entry point — Python is the only runtime dependency. The `[project.scripts]` entry in `pyproject.toml` maps `dev-setup` directly to `dev_setup.__main__:main`.
|
|
54
77
|
|
|
55
|
-
|
|
78
|
+
The bash `./dev-setup` script in the repo is a convenience runner for the git-clone workflow. It creates a `.venv` using `python3 -m venv` (falling back to `uv venv` on systems where `python3-venv` is a separate package) and installs the project in editable mode on first run.
|
|
56
79
|
|
|
57
80
|
---
|
|
58
81
|
|
|
@@ -4,29 +4,52 @@ A Python-based CLI for managing your Linux development environment. Install, rem
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### From PyPI (recommended)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
2. Runs `uv run --project <dir> python -m dev_setup` — uv provisions Python 3.11+ if needed
|
|
13
|
-
3. All further logic (commands, UI, installs) is pure Python
|
|
11
|
+
The simplest install — no git clone required, Python 3.11+ is the only prerequisite:
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
```bash
|
|
14
|
+
# pipx gives the tool its own isolated environment (preferred)
|
|
15
|
+
pipx install dev-setup
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
# or plain pip
|
|
18
|
+
pip install dev-setup
|
|
19
|
+
```
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
After install, `dev-setup` is available as a command. Run `dev-setup --help` to verify.
|
|
22
|
+
|
|
23
|
+
### From source (development)
|
|
20
24
|
|
|
21
25
|
```bash
|
|
22
26
|
git clone <repo-url> ~/dev-setup-py
|
|
23
27
|
cd ~/dev-setup-py
|
|
24
|
-
bash install.sh
|
|
28
|
+
bash install.sh # installs from PyPI via pipx or pip
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or to run directly from the cloned repo without installing:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
./dev-setup list # creates a .venv on first run, then stays fast
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The `./dev-setup` bash script requires Python 3.11+ and creates a local `.venv` automatically. On Debian/Ubuntu, if `python3-venv` is not installed, it falls back to `uv venv` if uv is available.
|
|
38
|
+
|
|
39
|
+
For editable development installs:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install -e .
|
|
43
|
+
dev-setup list
|
|
25
44
|
```
|
|
26
45
|
|
|
27
|
-
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## How it works
|
|
49
|
+
|
|
50
|
+
When installed from PyPI (via `pip` or `pipx`), the `dev-setup` command is a standard Python entry point — Python is the only runtime dependency. The `[project.scripts]` entry in `pyproject.toml` maps `dev-setup` directly to `dev_setup.__main__:main`.
|
|
28
51
|
|
|
29
|
-
|
|
52
|
+
The bash `./dev-setup` script in the repo is a convenience runner for the git-clone workflow. It creates a `.venv` using `python3 -m venv` (falling back to `uv venv` on systems where `python3-venv` is a separate package) and installs the project in editable mode on first run.
|
|
30
53
|
|
|
31
54
|
---
|
|
32
55
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Local runner for development / git-clone installs.
|
|
3
|
+
# For production: pip install dev-setup or pipx install dev-setup
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
DEVSETUP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
VENV="$DEVSETUP_DIR/.venv"
|
|
8
|
+
|
|
9
|
+
# Common locations where pip/pipx/uv install binaries
|
|
10
|
+
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
|
|
11
|
+
|
|
12
|
+
_find_python() {
|
|
13
|
+
local py
|
|
14
|
+
for py in python3.13 python3.12 python3.11 python3; do
|
|
15
|
+
if command -v "$py" &>/dev/null; then
|
|
16
|
+
if "$py" -c "import sys; exit(0 if sys.version_info >= (3,11) else 1)" 2>/dev/null; then
|
|
17
|
+
echo "$py"
|
|
18
|
+
return 0
|
|
19
|
+
fi
|
|
20
|
+
fi
|
|
21
|
+
done
|
|
22
|
+
echo " ✖ Python 3.11+ is required." >&2
|
|
23
|
+
echo " Install from https://www.python.org/downloads/ or via your package manager." >&2
|
|
24
|
+
exit 1
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_setup_venv() {
|
|
28
|
+
local python="$1"
|
|
29
|
+
echo " ❯ Creating virtual environment..."
|
|
30
|
+
|
|
31
|
+
if "$python" -m venv "$VENV" &>/dev/null; then
|
|
32
|
+
"$VENV/bin/pip" install --quiet -e "$DEVSETUP_DIR"
|
|
33
|
+
echo " ✔ Ready"
|
|
34
|
+
return 0
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# python3 -m venv may leave a partial directory behind on failure — clean it up
|
|
38
|
+
rm -rf "$VENV"
|
|
39
|
+
|
|
40
|
+
# Debian/Ubuntu ships python3 without python3-venv by default.
|
|
41
|
+
# uv can create venvs with a bundled pip, bypassing ensurepip entirely.
|
|
42
|
+
if command -v uv &>/dev/null; then
|
|
43
|
+
echo " ❯ python3-venv unavailable — falling back to uv venv..."
|
|
44
|
+
uv venv "$VENV" --quiet
|
|
45
|
+
VIRTUAL_ENV="$VENV" uv pip install -e "$DEVSETUP_DIR" --quiet
|
|
46
|
+
echo " ✔ Ready"
|
|
47
|
+
return 0
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
echo " ✖ Could not create virtual environment." >&2
|
|
51
|
+
echo "" >&2
|
|
52
|
+
echo " On Debian/Ubuntu, install the missing package:" >&2
|
|
53
|
+
echo " sudo apt install python3-venv" >&2
|
|
54
|
+
echo "" >&2
|
|
55
|
+
echo " Or install the tool directly (no venv needed):" >&2
|
|
56
|
+
echo " pip install dev-setup or pipx install dev-setup" >&2
|
|
57
|
+
exit 1
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
PYTHON=$(_find_python)
|
|
61
|
+
|
|
62
|
+
if [ ! -f "$VENV/bin/python" ] || ! "$VENV/bin/python" -c "import dev_setup" 2>/dev/null; then
|
|
63
|
+
_setup_venv "$PYTHON"
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
exec "$VENV/bin/python" -m dev_setup "$@"
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Installs dev-setup from PyPI using pipx (preferred) or pip.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
PACKAGE="dev-setup"
|
|
6
|
+
|
|
7
|
+
_find_python() {
|
|
8
|
+
local py
|
|
9
|
+
for py in python3.13 python3.12 python3.11 python3; do
|
|
10
|
+
if command -v "$py" &>/dev/null; then
|
|
11
|
+
if "$py" -c "import sys; exit(0 if sys.version_info >= (3,11) else 1)" 2>/dev/null; then
|
|
12
|
+
echo "$py"
|
|
13
|
+
return 0
|
|
14
|
+
fi
|
|
15
|
+
fi
|
|
16
|
+
done
|
|
17
|
+
echo " ✖ Python 3.11+ is required." >&2
|
|
18
|
+
echo " Install from https://www.python.org/downloads/ or via your package manager." >&2
|
|
19
|
+
exit 1
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
_ensure_local_bin_on_path() {
|
|
23
|
+
local dir="$HOME/.local/bin"
|
|
24
|
+
local bashrc="$HOME/.bashrc"
|
|
25
|
+
if ! grep -qF '.local/bin' "$bashrc" 2>/dev/null; then
|
|
26
|
+
printf '\n# dev-setup\nexport PATH="%s:$PATH"\n' "$dir" >> "$bashrc"
|
|
27
|
+
echo " ✔ Added $dir to PATH in $bashrc"
|
|
28
|
+
NEED_RELOAD=1
|
|
29
|
+
fi
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
PYTHON=$(_find_python)
|
|
33
|
+
NEED_RELOAD=0
|
|
34
|
+
echo " ✔ Python: $($PYTHON --version)"
|
|
35
|
+
|
|
36
|
+
# --- pipx path (preferred: isolated env, clean uninstall) ---
|
|
37
|
+
if command -v pipx &>/dev/null || "$PYTHON" -m pipx --version &>/dev/null 2>&1; then
|
|
38
|
+
PIPX=$(command -v pipx 2>/dev/null || echo "$PYTHON -m pipx")
|
|
39
|
+
echo " ❯ Installing $PACKAGE via pipx..."
|
|
40
|
+
$PIPX install "$PACKAGE"
|
|
41
|
+
echo ""
|
|
42
|
+
echo " ✔ Done. Run: dev-setup --help"
|
|
43
|
+
exit 0
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# --- bootstrap pipx then use it ---
|
|
47
|
+
if "$PYTHON" -m pip --version &>/dev/null 2>&1; then
|
|
48
|
+
echo " ❯ pipx not found — installing pipx first..."
|
|
49
|
+
"$PYTHON" -m pip install --user pipx --quiet
|
|
50
|
+
"$PYTHON" -m pipx ensurepath --quiet 2>/dev/null || true
|
|
51
|
+
_ensure_local_bin_on_path
|
|
52
|
+
|
|
53
|
+
echo " ❯ Installing $PACKAGE via pipx..."
|
|
54
|
+
"$PYTHON" -m pipx install "$PACKAGE"
|
|
55
|
+
echo ""
|
|
56
|
+
echo " ✔ Done. Run: dev-setup --help"
|
|
57
|
+
[ "$NEED_RELOAD" -eq 1 ] && echo " (run 'source ~/.bashrc' first if the command isn't found)"
|
|
58
|
+
exit 0
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
# --- last resort: pip --user ---
|
|
62
|
+
echo " ❯ Installing $PACKAGE via pip..."
|
|
63
|
+
"$PYTHON" -m pip install --user "$PACKAGE" --quiet
|
|
64
|
+
_ensure_local_bin_on_path
|
|
65
|
+
echo ""
|
|
66
|
+
echo " ✔ Done. Run: dev-setup --help"
|
|
67
|
+
[ "$NEED_RELOAD" -eq 1 ] && echo " (run 'source ~/.bashrc' first if the command isn't found)"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dev-setup"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.1.0"
|
|
4
4
|
description = "Development environment setup CLI for Linux"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -41,6 +41,3 @@ build-backend = "hatchling.build"
|
|
|
41
41
|
|
|
42
42
|
[tool.hatch.build.targets.wheel]
|
|
43
43
|
packages = ["src/dev_setup"]
|
|
44
|
-
|
|
45
|
-
[tool.uv]
|
|
46
|
-
package = true
|
dev_setup-1.0.0/dev-setup
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
|
|
5
|
-
|
|
6
|
-
_ensure_uv() {
|
|
7
|
-
command -v uv &>/dev/null && return 0
|
|
8
|
-
|
|
9
|
-
echo " ❯ uv not found — installing..."
|
|
10
|
-
if ! curl -LsSf https://astral.sh/uv/install.sh | sh; then
|
|
11
|
-
echo " ✖ uv installation failed." >&2
|
|
12
|
-
echo " Install manually: https://docs.astral.sh/uv/getting-started/installation/" >&2
|
|
13
|
-
exit 1
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
if ! command -v uv &>/dev/null; then
|
|
17
|
-
echo " ✖ uv not found after installation. Add ~/.local/bin to PATH and retry." >&2
|
|
18
|
-
exit 1
|
|
19
|
-
fi
|
|
20
|
-
echo " ✔ uv installed"
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
_ensure_uv
|
|
24
|
-
|
|
25
|
-
DEVSETUP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
26
|
-
exec uv run --project "$DEVSETUP_DIR" python -m dev_setup "$@"
|
dev_setup-1.0.0/install.sh
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
DEVSETUP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
-
BIN_DIR="${HOME}/.local/bin"
|
|
6
|
-
LINK="$BIN_DIR/dev-setup"
|
|
7
|
-
|
|
8
|
-
mkdir -p "$BIN_DIR"
|
|
9
|
-
chmod +x "$DEVSETUP_DIR/dev-setup"
|
|
10
|
-
ln -sf "$DEVSETUP_DIR/dev-setup" "$LINK"
|
|
11
|
-
|
|
12
|
-
echo " ✔ Installed: $LINK → $DEVSETUP_DIR/dev-setup"
|
|
13
|
-
|
|
14
|
-
BASHRC="$HOME/.bashrc"
|
|
15
|
-
PATH_LINE='export PATH="$HOME/.local/bin:$PATH"'
|
|
16
|
-
if ! grep -qF '.local/bin' "$BASHRC" 2>/dev/null; then
|
|
17
|
-
printf '\n# dev-setup\n%s\n' "$PATH_LINE" >> "$BASHRC"
|
|
18
|
-
echo " ✔ Added ~/.local/bin to PATH in $BASHRC"
|
|
19
|
-
echo " Run: source ~/.bashrc (or open a new terminal)"
|
|
20
|
-
else
|
|
21
|
-
echo " ✔ ~/.local/bin already on PATH in $BASHRC"
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
echo ""
|
|
25
|
-
echo " Run 'dev-setup --help' to get started."
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|