cloudx-proxy 0.3.0__tar.gz → 0.3.2__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.
Files changed (22) hide show
  1. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/CHANGELOG.md +9 -0
  2. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/PKG-INFO +47 -13
  3. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/README.md +46 -12
  4. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy/_version.py +2 -2
  5. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy/core.py +6 -7
  6. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy.egg-info/PKG-INFO +47 -13
  7. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/.github/workflows/release.yml +0 -0
  8. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/.gitignore +0 -0
  9. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/.releaserc +0 -0
  10. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/CONTRIBUTING.md +0 -0
  11. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/LICENSE +0 -0
  12. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy/__init__.py +0 -0
  13. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy/cli.py +0 -0
  14. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy/setup.py +0 -0
  15. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy.egg-info/SOURCES.txt +0 -0
  16. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy.egg-info/dependency_links.txt +0 -0
  17. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy.egg-info/entry_points.txt +0 -0
  18. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy.egg-info/requires.txt +0 -0
  19. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/cloudx_proxy.egg-info/top_level.txt +0 -0
  20. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/package.json +0 -0
  21. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/pyproject.toml +0 -0
  22. {cloudx_proxy-0.3.0 → cloudx_proxy-0.3.2}/setup.cfg +0 -0
@@ -1,3 +1,12 @@
1
+ ## [0.3.2](https://github.com/easytocloud/cloudX-proxy/compare/v0.3.1...v0.3.2) (2025-02-09)
2
+
3
+ ## [0.3.1](https://github.com/easytocloud/cloudX-proxy/compare/v0.3.0...v0.3.1) (2025-02-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * align ssh key parameter name in core module ([e121280](https://github.com/easytocloud/cloudX-proxy/commit/e121280213e9c762677882283324a382250b2a79))
9
+
1
10
  # [0.3.0](https://github.com/easytocloud/cloudX-proxy/compare/v0.2.0...v0.3.0) (2025-02-09)
2
11
 
3
12
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: SSH proxy command to connect VSCode with Cloud9/CloudX instance using AWS Systems Manager
5
5
  Author-email: easytocloud <info@easytocloud.com>
6
6
  License: MIT License
@@ -163,28 +163,62 @@ When adding new instances to an existing environment, the setup command will onl
163
163
 
164
164
  ## Usage
165
165
 
166
- ### Command Line
166
+ ### Command Line Options
167
167
 
168
+ #### Setup Command
168
169
  ```bash
169
- # Setup new environment and instance
170
- uvx cloudx-proxy setup --profile myprofile --aws-env prod
170
+ uvx cloudx-proxy setup [OPTIONS]
171
+ ```
172
+
173
+ Options:
174
+ - `--profile` (default: vscode): AWS profile to use. The profile's IAM user should follow the format cloudX-{env}-{user}. The environment part will be used as the default environment during setup.
175
+ - `--ssh-key` (default: vscode): Name of the SSH key to create/use. The key will be stored in ~/.ssh/vscode/{name}. This same name can be used in the connect command.
176
+ - `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
177
+
178
+ Example usage:
179
+ ```bash
180
+ # Basic setup with defaults
181
+ uvx cloudx-proxy setup
171
182
 
172
- # Add instance to existing environment
183
+ # Setup with custom profile and key
184
+ uvx cloudx-proxy setup --profile myprofile --ssh-key mykey
185
+
186
+ # Setup with AWS environment
173
187
  uvx cloudx-proxy setup --profile myprofile --aws-env prod
188
+ ```
174
189
 
175
- # Connect to instance
176
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
190
+ #### Connect Command
191
+ ```bash
192
+ uvx cloudx-proxy connect INSTANCE_ID [PORT] [OPTIONS]
193
+ ```
194
+
195
+ Arguments:
196
+ - `INSTANCE_ID`: The EC2 instance ID to connect to (e.g., i-0123456789abcdef0)
197
+ - `PORT` (default: 22): The port to forward for SSH connection
177
198
 
178
- # Connect with custom port
179
- uvx cloudx-proxy connect i-0123456789abcdef0 2222 --profile myprofile
199
+ Options:
200
+ - `--profile` (default: vscode): AWS profile to use. Should match the profile used in setup.
201
+ - `--ssh-key` (default: vscode): Name of the SSH key to use. Should match the key name used in setup.
202
+ - `--region` (optional): AWS region to use. If not specified, uses the region from the AWS profile.
203
+ - `--aws-env` (optional): AWS environment directory to use. Should match the environment used in setup.
180
204
 
181
- # Connect with different region
182
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --region us-east-1
205
+ Example usage:
206
+ ```bash
207
+ # Connect using defaults
208
+ uvx cloudx-proxy connect i-0123456789abcdef0
209
+
210
+ # Connect with custom profile and key
211
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --ssh-key mykey
212
+
213
+ # Connect with custom port and region
214
+ uvx cloudx-proxy connect i-0123456789abcdef0 2222 --region us-east-1
183
215
 
184
- # Connect with custom key
185
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --key-path ~/.ssh/custom_key.pub
216
+ # Connect with AWS environment
217
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
186
218
  ```
187
219
 
220
+ Note: The connect command is typically used through the SSH ProxyCommand configuration set up by the setup command. You rarely need to run it directly unless testing the connection.
221
+
188
222
  ### VSCode
189
223
 
190
224
  1. Click the "Remote Explorer" icon in the VSCode sidebar
@@ -113,28 +113,62 @@ When adding new instances to an existing environment, the setup command will onl
113
113
 
114
114
  ## Usage
115
115
 
116
- ### Command Line
116
+ ### Command Line Options
117
117
 
118
+ #### Setup Command
118
119
  ```bash
119
- # Setup new environment and instance
120
- uvx cloudx-proxy setup --profile myprofile --aws-env prod
120
+ uvx cloudx-proxy setup [OPTIONS]
121
+ ```
122
+
123
+ Options:
124
+ - `--profile` (default: vscode): AWS profile to use. The profile's IAM user should follow the format cloudX-{env}-{user}. The environment part will be used as the default environment during setup.
125
+ - `--ssh-key` (default: vscode): Name of the SSH key to create/use. The key will be stored in ~/.ssh/vscode/{name}. This same name can be used in the connect command.
126
+ - `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
127
+
128
+ Example usage:
129
+ ```bash
130
+ # Basic setup with defaults
131
+ uvx cloudx-proxy setup
121
132
 
122
- # Add instance to existing environment
133
+ # Setup with custom profile and key
134
+ uvx cloudx-proxy setup --profile myprofile --ssh-key mykey
135
+
136
+ # Setup with AWS environment
123
137
  uvx cloudx-proxy setup --profile myprofile --aws-env prod
138
+ ```
124
139
 
125
- # Connect to instance
126
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
140
+ #### Connect Command
141
+ ```bash
142
+ uvx cloudx-proxy connect INSTANCE_ID [PORT] [OPTIONS]
143
+ ```
144
+
145
+ Arguments:
146
+ - `INSTANCE_ID`: The EC2 instance ID to connect to (e.g., i-0123456789abcdef0)
147
+ - `PORT` (default: 22): The port to forward for SSH connection
127
148
 
128
- # Connect with custom port
129
- uvx cloudx-proxy connect i-0123456789abcdef0 2222 --profile myprofile
149
+ Options:
150
+ - `--profile` (default: vscode): AWS profile to use. Should match the profile used in setup.
151
+ - `--ssh-key` (default: vscode): Name of the SSH key to use. Should match the key name used in setup.
152
+ - `--region` (optional): AWS region to use. If not specified, uses the region from the AWS profile.
153
+ - `--aws-env` (optional): AWS environment directory to use. Should match the environment used in setup.
130
154
 
131
- # Connect with different region
132
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --region us-east-1
155
+ Example usage:
156
+ ```bash
157
+ # Connect using defaults
158
+ uvx cloudx-proxy connect i-0123456789abcdef0
159
+
160
+ # Connect with custom profile and key
161
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --ssh-key mykey
162
+
163
+ # Connect with custom port and region
164
+ uvx cloudx-proxy connect i-0123456789abcdef0 2222 --region us-east-1
133
165
 
134
- # Connect with custom key
135
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --key-path ~/.ssh/custom_key.pub
166
+ # Connect with AWS environment
167
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
136
168
  ```
137
169
 
170
+ Note: The connect command is typically used through the SSH ProxyCommand configuration set up by the setup command. You rarely need to run it directly unless testing the connection.
171
+
138
172
  ### VSCode
139
173
 
140
174
  1. Click the "Remote Explorer" icon in the VSCode sidebar
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.3.0'
16
- __version_tuple__ = version_tuple = (0, 3, 0)
15
+ __version__ = version = '0.3.2'
16
+ __version_tuple__ = version_tuple = (0, 3, 2)
@@ -7,7 +7,7 @@ from botocore.exceptions import ClientError
7
7
 
8
8
  class CloudXClient:
9
9
  def __init__(self, instance_id: str, port: int = 22, profile: str = "vscode",
10
- region: str = None, public_key_path: str = None, aws_env: str = None):
10
+ region: str = None, ssh_key: str = "vscode", aws_env: str = None):
11
11
  """Initialize CloudX client for SSH tunneling via AWS SSM.
12
12
 
13
13
  Args:
@@ -15,7 +15,7 @@ class CloudXClient:
15
15
  port: SSH port number (default: 22)
16
16
  profile: AWS profile to use (default: "vscode")
17
17
  region: AWS region (default: from profile)
18
- public_key_path: Path to SSH public key (default: ~/.ssh/vscode/vscode.pub)
18
+ ssh_key: SSH key name to use (default: "vscode")
19
19
  aws_env: AWS environment directory (default: None, uses ~/.aws)
20
20
  """
21
21
  self.instance_id = instance_id
@@ -39,10 +39,9 @@ class CloudXClient:
39
39
  self.ec2 = self.session.client('ec2')
40
40
  self.ec2_connect = self.session.client('ec2-instance-connect')
41
41
 
42
- # Default public key path if not provided
43
- if not public_key_path:
44
- public_key_path = os.path.expanduser("~/.ssh/vscode/vscode.pub")
45
- self.public_key_path = Path(public_key_path)
42
+ # Set up SSH key path
43
+ self.ssh_dir = os.path.expanduser("~/.ssh/vscode")
44
+ self.ssh_key = os.path.join(self.ssh_dir, f"{ssh_key}.pub")
46
45
 
47
46
  def log(self, message: str) -> None:
48
47
  """Log message to stderr to avoid interfering with SSH connection."""
@@ -88,7 +87,7 @@ class CloudXClient:
88
87
  def push_ssh_key(self) -> bool:
89
88
  """Push SSH public key to instance via EC2 Instance Connect."""
90
89
  try:
91
- with open(self.public_key_path) as f:
90
+ with open(self.ssh_key) as f:
92
91
  public_key = f.read()
93
92
 
94
93
  self.ec2_connect.send_ssh_public_key(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cloudx-proxy
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: SSH proxy command to connect VSCode with Cloud9/CloudX instance using AWS Systems Manager
5
5
  Author-email: easytocloud <info@easytocloud.com>
6
6
  License: MIT License
@@ -163,28 +163,62 @@ When adding new instances to an existing environment, the setup command will onl
163
163
 
164
164
  ## Usage
165
165
 
166
- ### Command Line
166
+ ### Command Line Options
167
167
 
168
+ #### Setup Command
168
169
  ```bash
169
- # Setup new environment and instance
170
- uvx cloudx-proxy setup --profile myprofile --aws-env prod
170
+ uvx cloudx-proxy setup [OPTIONS]
171
+ ```
172
+
173
+ Options:
174
+ - `--profile` (default: vscode): AWS profile to use. The profile's IAM user should follow the format cloudX-{env}-{user}. The environment part will be used as the default environment during setup.
175
+ - `--ssh-key` (default: vscode): Name of the SSH key to create/use. The key will be stored in ~/.ssh/vscode/{name}. This same name can be used in the connect command.
176
+ - `--aws-env` (optional): AWS environment directory to use. If specified, AWS configuration and credentials will be read from ~/.aws/aws-envs/{env}/.
177
+
178
+ Example usage:
179
+ ```bash
180
+ # Basic setup with defaults
181
+ uvx cloudx-proxy setup
171
182
 
172
- # Add instance to existing environment
183
+ # Setup with custom profile and key
184
+ uvx cloudx-proxy setup --profile myprofile --ssh-key mykey
185
+
186
+ # Setup with AWS environment
173
187
  uvx cloudx-proxy setup --profile myprofile --aws-env prod
188
+ ```
174
189
 
175
- # Connect to instance
176
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
190
+ #### Connect Command
191
+ ```bash
192
+ uvx cloudx-proxy connect INSTANCE_ID [PORT] [OPTIONS]
193
+ ```
194
+
195
+ Arguments:
196
+ - `INSTANCE_ID`: The EC2 instance ID to connect to (e.g., i-0123456789abcdef0)
197
+ - `PORT` (default: 22): The port to forward for SSH connection
177
198
 
178
- # Connect with custom port
179
- uvx cloudx-proxy connect i-0123456789abcdef0 2222 --profile myprofile
199
+ Options:
200
+ - `--profile` (default: vscode): AWS profile to use. Should match the profile used in setup.
201
+ - `--ssh-key` (default: vscode): Name of the SSH key to use. Should match the key name used in setup.
202
+ - `--region` (optional): AWS region to use. If not specified, uses the region from the AWS profile.
203
+ - `--aws-env` (optional): AWS environment directory to use. Should match the environment used in setup.
180
204
 
181
- # Connect with different region
182
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --region us-east-1
205
+ Example usage:
206
+ ```bash
207
+ # Connect using defaults
208
+ uvx cloudx-proxy connect i-0123456789abcdef0
209
+
210
+ # Connect with custom profile and key
211
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --ssh-key mykey
212
+
213
+ # Connect with custom port and region
214
+ uvx cloudx-proxy connect i-0123456789abcdef0 2222 --region us-east-1
183
215
 
184
- # Connect with custom key
185
- uvx cloudx-proxy connect i-0123456789abcdef0 22 --key-path ~/.ssh/custom_key.pub
216
+ # Connect with AWS environment
217
+ uvx cloudx-proxy connect i-0123456789abcdef0 22 --profile myprofile --aws-env prod
186
218
  ```
187
219
 
220
+ Note: The connect command is typically used through the SSH ProxyCommand configuration set up by the setup command. You rarely need to run it directly unless testing the connection.
221
+
188
222
  ### VSCode
189
223
 
190
224
  1. Click the "Remote Explorer" icon in the VSCode sidebar
File without changes
File without changes
File without changes
File without changes
File without changes