devs-cli 1.1.3__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.
devs_cli-1.1.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Dan Lester
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,185 @@
1
+ Metadata-Version: 2.4
2
+ Name: devs-cli
3
+ Version: 1.1.3
4
+ Summary: DevContainer Management Tool - Manage multiple named devcontainers for any project
5
+ Author: Dan Lester
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/ideonate/devs
8
+ Project-URL: Repository, https://github.com/ideonate/devs
9
+ Project-URL: Issues, https://github.com/ideonate/devs/issues
10
+ Project-URL: Documentation, https://github.com/ideonate/devs/tree/main/packages/cli
11
+ Keywords: devcontainer,docker,vscode,development
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Topic :: System :: Systems Administration
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: click>=8.0.0
28
+ Requires-Dist: devs-common>=0.1.0
29
+ Requires-Dist: rich>=12.0.0
30
+ Requires-Dist: pathspec>=0.10.0
31
+ Requires-Dist: PyYAML>=6.0
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=6.0; extra == "dev"
34
+ Requires-Dist: pytest-cov; extra == "dev"
35
+ Requires-Dist: black; extra == "dev"
36
+ Requires-Dist: mypy; extra == "dev"
37
+ Requires-Dist: flake8; extra == "dev"
38
+ Requires-Dist: build>=0.10.0; extra == "dev"
39
+ Requires-Dist: twine>=4.0.0; extra == "dev"
40
+ Dynamic: license-file
41
+
42
+ # devs - DevContainer Management Tool
43
+
44
+ A Python command-line tool that simplifies managing multiple named devcontainers for any project.
45
+
46
+ ## Features
47
+
48
+ - **Multiple Named Containers**: Start multiple devcontainers with custom names (e.g., "sally", "bob", "charlie")
49
+ - **VS Code Integration**: Open containers in separate VS Code windows with clear titles
50
+ - **Project Isolation**: Containers are prefixed with git repository names (org-repo format)
51
+ - **Environment Variable Management**: Layered DEVS.yml configuration with user-specific overrides
52
+ - **Shared Authentication**: Claude credentials are shared between containers for the same project
53
+ - **Cross-Platform**: Works on any project with devcontainer configuration
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ pip install devs
59
+ ```
60
+
61
+ ## Usage
62
+
63
+ ```bash
64
+ # Start development environments
65
+ devs start frontend backend
66
+
67
+ # Open both in VS Code (separate windows)
68
+ devs vscode frontend backend
69
+
70
+ # Work in a specific container
71
+ devs shell frontend
72
+
73
+ # Run Claude in a container
74
+ devs claude frontend "Summarize this codebase"
75
+
76
+ # Run tests in a container
77
+ devs runtests frontend
78
+
79
+ # Environment variables support
80
+ devs start frontend --env DEBUG=true --env API_URL=http://localhost:3000
81
+ devs claude frontend "Fix the tests" --env NODE_ENV=test
82
+
83
+ # Set up Claude authentication (once per host)
84
+ devs claude --auth
85
+ # Or with API key
86
+ devs claude --auth --api-key <YOUR_API_KEY>
87
+
88
+ # Clean up when done
89
+ devs stop frontend backend
90
+
91
+ # List active containers
92
+ devs list
93
+ ```
94
+
95
+ ## Configuration
96
+
97
+ ### Environment Variables
98
+
99
+ devs supports layered environment variable configuration through DEVS.yml files:
100
+
101
+ **Priority order (highest to lowest):**
102
+ 1. CLI `--env` flags
103
+ 2. `~/.devs/envs/{org-repo}/DEVS.yml` (user-specific project overrides)
104
+ 3. `~/.devs/envs/default/DEVS.yml` (user defaults)
105
+ 4. `{project-root}/DEVS.yml` (repository configuration)
106
+
107
+ **Example DEVS.yml in your project:**
108
+ ```yaml
109
+ env_vars:
110
+ default:
111
+ NODE_ENV: development
112
+ API_URL: https://api.example.com
113
+ DEBUG: "false"
114
+
115
+ frontend: # Container-specific overrides
116
+ DEBUG: "true"
117
+ FRONTEND_PORT: "3000"
118
+
119
+ backend:
120
+ NODE_ENV: production
121
+ API_URL: https://prod-api.example.com
122
+ ```
123
+
124
+ **User-specific configuration:**
125
+ ```bash
126
+ # Global user defaults
127
+ mkdir -p ~/.devs/envs/default
128
+ echo 'env_vars:
129
+ default:
130
+ GLOBAL_SETTING: "user_preference"
131
+ MY_SECRET: "user_secret"' > ~/.devs/envs/default/DEVS.yml
132
+
133
+ # Project-specific overrides (org-repo format)
134
+ mkdir -p ~/.devs/envs/myorg-myproject
135
+ echo 'env_vars:
136
+ frontend:
137
+ DEBUG: "true"
138
+ LOCAL_SECRET: "dev_secret"' > ~/.devs/envs/myorg-myproject/DEVS.yml
139
+ ```
140
+
141
+ 📖 **[See ../../example-usage.md for detailed examples and scenarios](../../example-usage.md)**
142
+
143
+ ## Requirements
144
+
145
+ - **Docker**: Container runtime
146
+ - **VS Code**: With `code` command in PATH
147
+ - **DevContainer CLI**: `npm install -g @devcontainers/cli`
148
+ - **Project Requirements**: `.devcontainer/devcontainer.json` in target projects
149
+
150
+ ## Architecture
151
+
152
+ ### Container Naming
153
+ Containers follow the pattern: `dev-<org>-<repo>-<dev-name>`
154
+
155
+ Example: `dev-ideonate-devs-sally`, `dev-ideonate-devs-bob`
156
+
157
+ ### VS Code Window Management
158
+ Each container gets unique workspace paths to ensure VS Code treats them as separate sessions.
159
+
160
+ ### Claude Authentication Sharing
161
+ The tool creates symlinks so all containers for the same project share Claude authentication.
162
+
163
+ ## Development
164
+
165
+ ```bash
166
+ # Clone repository
167
+ git clone https://github.com/ideonate/devs.git
168
+ cd devs/python-devs
169
+
170
+ # Install in development mode
171
+ pip install -e ".[dev]"
172
+
173
+ # Run tests
174
+ pytest
175
+
176
+ # Format code
177
+ black devs tests
178
+
179
+ # Type checking
180
+ mypy devs
181
+ ```
182
+
183
+ ## License
184
+
185
+ MIT License
@@ -0,0 +1,144 @@
1
+ # devs - DevContainer Management Tool
2
+
3
+ A Python command-line tool that simplifies managing multiple named devcontainers for any project.
4
+
5
+ ## Features
6
+
7
+ - **Multiple Named Containers**: Start multiple devcontainers with custom names (e.g., "sally", "bob", "charlie")
8
+ - **VS Code Integration**: Open containers in separate VS Code windows with clear titles
9
+ - **Project Isolation**: Containers are prefixed with git repository names (org-repo format)
10
+ - **Environment Variable Management**: Layered DEVS.yml configuration with user-specific overrides
11
+ - **Shared Authentication**: Claude credentials are shared between containers for the same project
12
+ - **Cross-Platform**: Works on any project with devcontainer configuration
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ pip install devs
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```bash
23
+ # Start development environments
24
+ devs start frontend backend
25
+
26
+ # Open both in VS Code (separate windows)
27
+ devs vscode frontend backend
28
+
29
+ # Work in a specific container
30
+ devs shell frontend
31
+
32
+ # Run Claude in a container
33
+ devs claude frontend "Summarize this codebase"
34
+
35
+ # Run tests in a container
36
+ devs runtests frontend
37
+
38
+ # Environment variables support
39
+ devs start frontend --env DEBUG=true --env API_URL=http://localhost:3000
40
+ devs claude frontend "Fix the tests" --env NODE_ENV=test
41
+
42
+ # Set up Claude authentication (once per host)
43
+ devs claude --auth
44
+ # Or with API key
45
+ devs claude --auth --api-key <YOUR_API_KEY>
46
+
47
+ # Clean up when done
48
+ devs stop frontend backend
49
+
50
+ # List active containers
51
+ devs list
52
+ ```
53
+
54
+ ## Configuration
55
+
56
+ ### Environment Variables
57
+
58
+ devs supports layered environment variable configuration through DEVS.yml files:
59
+
60
+ **Priority order (highest to lowest):**
61
+ 1. CLI `--env` flags
62
+ 2. `~/.devs/envs/{org-repo}/DEVS.yml` (user-specific project overrides)
63
+ 3. `~/.devs/envs/default/DEVS.yml` (user defaults)
64
+ 4. `{project-root}/DEVS.yml` (repository configuration)
65
+
66
+ **Example DEVS.yml in your project:**
67
+ ```yaml
68
+ env_vars:
69
+ default:
70
+ NODE_ENV: development
71
+ API_URL: https://api.example.com
72
+ DEBUG: "false"
73
+
74
+ frontend: # Container-specific overrides
75
+ DEBUG: "true"
76
+ FRONTEND_PORT: "3000"
77
+
78
+ backend:
79
+ NODE_ENV: production
80
+ API_URL: https://prod-api.example.com
81
+ ```
82
+
83
+ **User-specific configuration:**
84
+ ```bash
85
+ # Global user defaults
86
+ mkdir -p ~/.devs/envs/default
87
+ echo 'env_vars:
88
+ default:
89
+ GLOBAL_SETTING: "user_preference"
90
+ MY_SECRET: "user_secret"' > ~/.devs/envs/default/DEVS.yml
91
+
92
+ # Project-specific overrides (org-repo format)
93
+ mkdir -p ~/.devs/envs/myorg-myproject
94
+ echo 'env_vars:
95
+ frontend:
96
+ DEBUG: "true"
97
+ LOCAL_SECRET: "dev_secret"' > ~/.devs/envs/myorg-myproject/DEVS.yml
98
+ ```
99
+
100
+ 📖 **[See ../../example-usage.md for detailed examples and scenarios](../../example-usage.md)**
101
+
102
+ ## Requirements
103
+
104
+ - **Docker**: Container runtime
105
+ - **VS Code**: With `code` command in PATH
106
+ - **DevContainer CLI**: `npm install -g @devcontainers/cli`
107
+ - **Project Requirements**: `.devcontainer/devcontainer.json` in target projects
108
+
109
+ ## Architecture
110
+
111
+ ### Container Naming
112
+ Containers follow the pattern: `dev-<org>-<repo>-<dev-name>`
113
+
114
+ Example: `dev-ideonate-devs-sally`, `dev-ideonate-devs-bob`
115
+
116
+ ### VS Code Window Management
117
+ Each container gets unique workspace paths to ensure VS Code treats them as separate sessions.
118
+
119
+ ### Claude Authentication Sharing
120
+ The tool creates symlinks so all containers for the same project share Claude authentication.
121
+
122
+ ## Development
123
+
124
+ ```bash
125
+ # Clone repository
126
+ git clone https://github.com/ideonate/devs.git
127
+ cd devs/python-devs
128
+
129
+ # Install in development mode
130
+ pip install -e ".[dev]"
131
+
132
+ # Run tests
133
+ pytest
134
+
135
+ # Format code
136
+ black devs tests
137
+
138
+ # Type checking
139
+ mypy devs
140
+ ```
141
+
142
+ ## License
143
+
144
+ MIT License
@@ -0,0 +1,18 @@
1
+ """DevContainer Management Tool
2
+
3
+ A command-line tool that simplifies managing multiple named devcontainers for any project.
4
+ """
5
+
6
+ __version__ = "0.1.0"
7
+ __author__ = "Dan Lester"
8
+ __email__ = "dan@ideonate.com"
9
+
10
+ from devs_common.core import Project, ContainerManager, WorkspaceManager
11
+ from .core.integration import VSCodeIntegration
12
+
13
+ __all__ = [
14
+ "Project",
15
+ "ContainerManager",
16
+ "WorkspaceManager",
17
+ "VSCodeIntegration",
18
+ ]