ic-code 1.0.0__py3-none-any.whl

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,354 @@
1
+ Metadata-Version: 2.4
2
+ Name: ic-code
3
+ Version: 1.0.0
4
+ Summary: Infrastructure CLI tool for managing AWS, CloudFlare, SSH, and more
5
+ Home-page: https://github.com/dgr009/ic
6
+ Author: SangYun Kim
7
+ Author-email: sykim <cruiser594@gmail.com>
8
+ Project-URL: Homepage, https://github.com/dgr009/ic
9
+ Project-URL: Bug Reports, https://github.com/dgr009/ic/issues
10
+ Project-URL: Source, https://github.com/dgr009/ic
11
+ Project-URL: Documentation, https://github.com/dgr009/ic#readme
12
+ Keywords: cli,infrastructure,aws,cloudflare,ssh,devops
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: System Administrators
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: System :: Systems Administration
24
+ Classifier: Topic :: Utilities
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: boto3>=1.26.0
29
+ Requires-Dist: botocore>=1.29.0
30
+ Requires-Dist: requests>=2.28.0
31
+ Requires-Dist: rich>=12.0.0
32
+ Requires-Dist: PyYAML>=6.0
33
+ Requires-Dist: paramiko>=2.11.0
34
+ Requires-Dist: python-dotenv>=0.19.0
35
+ Requires-Dist: cryptography>=3.4.8
36
+ Requires-Dist: ipaddress>=1.0.23
37
+ Requires-Dist: netifaces>=0.11.0
38
+ Requires-Dist: tqdm>=4.67.0
39
+ Provides-Extra: dev
40
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
41
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
42
+ Requires-Dist: black>=22.0.0; extra == "dev"
43
+ Requires-Dist: flake8>=5.0.0; extra == "dev"
44
+ Requires-Dist: mypy>=0.991; extra == "dev"
45
+ Dynamic: author
46
+ Dynamic: home-page
47
+ Dynamic: license-file
48
+ Dynamic: requires-python
49
+
50
+ # IC CLI Tool
51
+
52
+ [![Tests](https://github.com/yourusername/ic-cli/workflows/Tests/badge.svg)](https://github.com/yourusername/ic-cli/actions)
53
+ [![PyPI version](https://badge.fury.io/py/ic-code.svg)](https://badge.fury.io/py/ic-code)
54
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
55
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
56
+
57
+ Infrastructure Command Line Interface tool for managing various cloud services and infrastructure components.
58
+
59
+ ## Features
60
+
61
+ - **AWS Services**: EC2, S3, ECS, EKS, RDS, VPC, Load Balancers, MSK, and more
62
+ - **CloudFlare**: DNS record management with account/zone filtering
63
+ - **SSH**: Server information gathering and management with security filtering
64
+ - **OCI**: Oracle Cloud Infrastructure support
65
+ - **Multi-account/Multi-region**: Support for multiple AWS accounts and regions
66
+ - **Rich Output**: Beautiful terminal output with tables and colors
67
+ - **YAML Configuration**: Modern YAML-based configuration management
68
+ - **Security**: Separate secrets management with example templates
69
+
70
+ ## Installation
71
+
72
+ ### From PyPI (Recommended)
73
+
74
+ ```bash
75
+ pip install ic-code
76
+ ```
77
+
78
+ ### From Source
79
+
80
+ ```bash
81
+ # Clone the repository
82
+ git clone https://github.com/dgr009/ic.git
83
+ cd ic
84
+
85
+ # Create virtual environment
86
+ python -m venv ic-env
87
+ source ic-env/bin/activate # On Windows: ic-env\Scripts\activate
88
+
89
+ # Install in development mode
90
+ pip install -e .
91
+ ```
92
+
93
+ ## Configuration
94
+
95
+ ### YAML Configuration System
96
+
97
+ IC CLI uses a modern YAML-based configuration system with separate files for default settings and secrets.
98
+
99
+ #### 1. Create Configuration Files
100
+
101
+ ```bash
102
+ # Copy example files
103
+ cp config/secrets.yaml.example config/secrets.yaml
104
+
105
+ # Edit with your actual values
106
+ vim config/secrets.yaml
107
+ ```
108
+
109
+ #### 2. Configure Secrets (config/secrets.yaml)
110
+
111
+ ```yaml
112
+ # AWS Configuration
113
+ aws:
114
+ accounts:
115
+ - "123456789012" # Your AWS account IDs
116
+ - "987654321098"
117
+ profiles:
118
+ default: "your-aws-profile-name"
119
+
120
+ # CloudFlare Configuration
121
+ cloudflare:
122
+ email: "your-email@example.com"
123
+ api_token: "your-cloudflare-api-token"
124
+ cloudflare_accounts: "account1,account2" # Filter accounts
125
+ cloudflare_zones: "zone1,zone2" # Filter zones
126
+
127
+ # SSH Configuration (Security-sensitive)
128
+ ssh:
129
+ key_dir: "~/aws-key"
130
+ skip_prefixes: # Skip servers with these prefixes
131
+ - "git"
132
+ - "bastion"
133
+ - "jump"
134
+ - "proxy"
135
+
136
+ # OCI Configuration
137
+ oci:
138
+ config_file: "~/.oci/config"
139
+ profile: "DEFAULT"
140
+ ```
141
+
142
+ #### 3. Default Settings (config/default.yaml)
143
+
144
+ The default configuration is already provided and includes:
145
+ - AWS regions
146
+ - SSH connection settings
147
+ - Timeout values
148
+ - Other non-sensitive defaults
149
+
150
+ ### AWS Credentials
151
+
152
+ Ensure your AWS credentials are configured:
153
+
154
+ ```bash
155
+ # Using AWS CLI
156
+ aws configure
157
+
158
+ # Or use AWS profiles
159
+ aws configure --profile myprofile
160
+ ```
161
+
162
+ ## Usage
163
+
164
+ ### AWS Services
165
+
166
+ ```bash
167
+ # EC2 instances
168
+ ic aws ec2 info
169
+ ic aws ec2 info --account 123456789012 --regions us-east-1
170
+
171
+ # S3 buckets
172
+ ic aws s3 list_tags
173
+ ic aws s3 tag_check
174
+
175
+ # ECS services
176
+ ic aws ecs info
177
+ ic aws ecs service
178
+ ic aws ecs task
179
+
180
+ # EKS clusters
181
+ ic aws eks info
182
+ ic aws eks nodes
183
+ ic aws eks pods
184
+
185
+ # RDS instances
186
+ ic aws rds list_tags
187
+ ic aws rds tag_check
188
+
189
+ # Load Balancers
190
+ ic aws lb list_tags
191
+ ic aws lb tag_check
192
+
193
+ # VPC resources
194
+ ic aws vpc list_tags
195
+ ic aws vpc tag_check
196
+
197
+ # Security Groups
198
+ ic aws sg info
199
+
200
+ # MSK clusters
201
+ ic aws msk info
202
+ ic aws msk broker
203
+
204
+ # Fargate services
205
+ ic aws fargate info
206
+
207
+ # CodePipeline
208
+ ic aws codepipeline build
209
+ ic aws codepipeline deploy
210
+ ```
211
+
212
+ ### CloudFlare
213
+
214
+ ```bash
215
+ # DNS records (filtered by configured accounts/zones)
216
+ ic cf dns info
217
+ ic cf dns info --account specific-account
218
+ ic cf dns info --zone specific-zone
219
+ ```
220
+
221
+ ### SSH Management
222
+
223
+ ```bash
224
+ # Server information (with security filtering)
225
+ ic ssh info
226
+
227
+ # Auto-discover and register SSH servers
228
+ ic ssh reg
229
+ ```
230
+
231
+ ### OCI (Oracle Cloud Infrastructure)
232
+
233
+ ```bash
234
+ # OCI information
235
+ ic oci info
236
+
237
+ # VM instances
238
+ ic oci vm
239
+
240
+ # Load balancers
241
+ ic oci lb
242
+ ```
243
+
244
+ ### Configuration Management
245
+
246
+ ```bash
247
+ # View current configuration
248
+ ic config show
249
+
250
+ # Validate configuration
251
+ ic config validate
252
+
253
+ # Migrate from old configuration
254
+ ic config migrate
255
+ ```
256
+
257
+ ## Command Structure
258
+
259
+ The CLI follows a consistent structure:
260
+
261
+ ```
262
+ ic <platform> <service> <command> [options]
263
+ ```
264
+
265
+ - **platform**: aws, cf (CloudFlare), ssh, oci, config
266
+ - **service**: ec2, s3, ecs, eks, rds, etc.
267
+ - **command**: info, list_tags, tag_check, etc.
268
+ - **options**: --account, --regions, --name, etc.
269
+
270
+ ## Examples
271
+
272
+ ### Multi-account AWS EC2 Query
273
+
274
+ ```bash
275
+ # Query EC2 instances across multiple accounts and regions
276
+ ic aws ec2 info --account 123456789012,987654321098 --regions us-east-1,ap-northeast-2
277
+ ```
278
+
279
+ ### CloudFlare DNS Management
280
+
281
+ ```bash
282
+ # List all DNS records
283
+ ic cf dns info
284
+
285
+ # Filter by specific account
286
+ ic cf dns info --account production
287
+
288
+ # Filter by specific zone
289
+ ic cf dns info --zone example.com
290
+ ```
291
+
292
+ ### SSH Server Discovery
293
+
294
+ ```bash
295
+ # Get information about all registered SSH servers
296
+ ic ssh info
297
+
298
+ # Auto-discover new SSH servers in your network
299
+ ic ssh reg
300
+ ```
301
+
302
+ ## Development
303
+
304
+ ### Project Structure
305
+
306
+ ```
307
+ ic/
308
+ ├── src/ic/
309
+ │ ├── cli.py # Main CLI entry point
310
+ │ ├── config/ # Configuration management
311
+ │ └── core/ # Core utilities
312
+ ├── aws/ # AWS service modules
313
+ ├── cf/ # CloudFlare modules
314
+ ├── ssh/ # SSH management modules
315
+ ├── oci_module/ # OCI modules
316
+ ├── common/ # Common utilities
317
+ ├── config/ # Configuration files
318
+ ├── requirements.txt # Python dependencies
319
+ └── README.md # This file
320
+ ```
321
+
322
+ ### Adding New Services
323
+
324
+ 1. Create a new module directory (e.g., `gcp/`)
325
+ 2. Implement service-specific functions
326
+ 3. Add CLI integration in `src/ic/cli.py`
327
+ 4. Update documentation
328
+
329
+ ### Testing
330
+
331
+ ```bash
332
+ # Run tests
333
+ pytest
334
+
335
+ # Run with coverage
336
+ pytest --cov=src --cov-report=html
337
+ ```
338
+
339
+ ## Contributing
340
+
341
+ 1. Fork the repository
342
+ 2. Create a feature branch
343
+ 3. Make your changes
344
+ 4. Add tests
345
+ 5. Submit a pull request
346
+
347
+ ## License
348
+
349
+ MIT License - see LICENSE file for details.
350
+
351
+ ## Support
352
+
353
+ For issues and questions, please use the GitHub issue tracker.$`
354
+
@@ -0,0 +1,27 @@
1
+ ic/__init__.py,sha256=0OGyx8HAZpQgzhH_E_a0kNz4hrHdrzrrxm505Ugq3VI,807
2
+ ic/cli.py,sha256=6vy_G47qTpkgb3L9yKfP0PAPVEeBqqW2tBZsqR2JECo,39417
3
+ ic/commands/__init__.py,sha256=NAJZp7Tqw28-_1DKXoxnWXJBMs6pBaMCqF0YZP0AvpY,202
4
+ ic/commands/config.py,sha256=jVz2wnYsGtDj2HI6vhpTGavHXtxRHnn_KQaFoN-l5qA,26305
5
+ ic/compat/__init__.py,sha256=DxahvuHzgHmpnaBPEj-HfAlkPmtdr3rthxBAhsWpP38,7493
6
+ ic/compat/cli.py,sha256=mfmHgmYUvhKV8vefvgIPCxB1kS3SMdDmXHel2QNb4uc,9178
7
+ ic/compat/common.py,sha256=hBwsx9wLS2ACVZxxMXZjEWRibn4tdWCtIiJcW9QmXlk,6585
8
+ ic/config/__init__.py,sha256=sCHrAQZYN6FQdCXqf2tux-ozQTWtEXrv3m4FRKxLJ3w,249
9
+ ic/config/cleanup.py,sha256=a4nUMq0yPcwLRqin0lHJgdj88vkUY-jY4bawuuWUnkc,13931
10
+ ic/config/docs_organizer.py,sha256=nzgVZxSyBL-xgqAMoB0PuNMOSN2rD0Ha_cJuxwjEDpA,22729
11
+ ic/config/external.py,sha256=eQUkjaTampKv-djbMUAb8cn6pGUwG78wGRcsbSSg3qM,17146
12
+ ic/config/manager.py,sha256=bBnFRdRjeRq78N0tT08ZFxemJeOUW-8YfOD0jjtdy8Q,33652
13
+ ic/config/migration.py,sha256=oq2GEXgvWiY6ZKm3WtO6nxSu-X8lJWQbOCiJ2YqmnK8,24848
14
+ ic/config/schema.py,sha256=5FPMhxzN5d1SZBIBykU58oOJ9rpK9boUOLSbxPB0p-4,20702
15
+ ic/config/secrets.py,sha256=rSw6TXbR1JYeNwaKEog4CSQttz1LT8S4buibb4Uq6CQ,15298
16
+ ic/config/security.py,sha256=7XRNv8-Dc2VbJDMK1l8tMW_ge22MMMgikPySAP4vcYw,15287
17
+ ic/core/__init__.py,sha256=znRJCXSkQmATrimETinZsdx2iiWHz9oDENP_2enpUBA,351
18
+ ic/core/logging.py,sha256=79KFyCfTkxacXVrfCssvHKGeXtF6KtIg8gHYSFORkrU,11026
19
+ ic/core/mcp_manager.py,sha256=gxQDxSpM7oRl3_mrlAHD2AOIF-jiohbGmOLDbIGYeMU,33160
20
+ ic/core/session.py,sha256=LzCcIv6DkcHQlR4Ijc639j5IwltZZzt7NNCfkJs5ePo,14760
21
+ ic/core/silence_logging.py,sha256=XfdJLvlEagtrhXLw8b2MyL1ZIJXlak1-kf_zql31C2I,1983
22
+ ic_code-1.0.0.dist-info/licenses/LICENSE,sha256=hv8_h-ZY0-O0lgbWO0WsggQvBgoFAjaJetBwGcjISI0,1067
23
+ ic_code-1.0.0.dist-info/METADATA,sha256=V3_MDLPmeNGJs8Fg_TE389S9PL7uR4BYD7mdY1IQU2o,8161
24
+ ic_code-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ ic_code-1.0.0.dist-info/entry_points.txt,sha256=oFik4GWAH34VMH-whqMgGpoYivL8a2sVX51Q_zptmGw,35
26
+ ic_code-1.0.0.dist-info/top_level.txt,sha256=J08fCO2IqQ2IZql-SeMHSSpeMNk-ctBBV4VrfipjopU,3
27
+ ic_code-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ic = ic.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 IC CLI Tool
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 @@
1
+ ic