opsmith-cli 0.2.0b0__tar.gz → 0.2.2b0__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 (121) hide show
  1. opsmith_cli-0.2.2b0/PKG-INFO +282 -0
  2. opsmith_cli-0.2.2b0/README.md +243 -0
  3. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/git_repo.py +31 -0
  4. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/main.py +3 -0
  5. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/settings.py +1 -1
  6. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/pyproject.toml +2 -1
  7. opsmith_cli-0.2.0b0/PKG-INFO +0 -37
  8. opsmith_cli-0.2.0b0/README.md +0 -1
  9. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/.flake8 +0 -0
  10. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/.github/workflows/python-publish.yml +0 -0
  11. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/.gitignore +0 -0
  12. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/.pre-commit-config.yaml +0 -0
  13. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/CONVENTIONS.md +0 -0
  14. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/LICENSE.txt +0 -0
  15. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/__init__.py +0 -0
  16. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/agent.py +0 -0
  17. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/cloud_providers/__init__.py +0 -0
  18. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/cloud_providers/aws.py +0 -0
  19. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/cloud_providers/base.py +0 -0
  20. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/cloud_providers/gcp.py +0 -0
  21. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/constants.py +0 -0
  22. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/deployment_strategies/__init__.py +0 -0
  23. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/deployment_strategies/base.py +0 -0
  24. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/deployment_strategies/monolithic.py +0 -0
  25. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/exceptions.py +0 -0
  26. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/infra_provisioners/__init__.py +0 -0
  27. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/infra_provisioners/ansible_provisioner.py +0 -0
  28. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/infra_provisioners/base_provisioner.py +0 -0
  29. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/infra_provisioners/terraform_provisioner.py +0 -0
  30. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/models.py +0 -0
  31. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/prompts.py +0 -0
  32. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/README.md +0 -0
  33. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/arduino-tags.scm +0 -0
  34. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/c-tags.scm +0 -0
  35. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/c_sharp-tags.scm +0 -0
  36. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/chatito-tags.scm +0 -0
  37. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/commonlisp-tags.scm +0 -0
  38. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/cpp-tags.scm +0 -0
  39. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/csharp-tags.scm +0 -0
  40. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/d-tags.scm +0 -0
  41. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/dart-tags.scm +0 -0
  42. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/elisp-tags.scm +0 -0
  43. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/elixir-tags.scm +0 -0
  44. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/elm-tags.scm +0 -0
  45. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/gleam-tags.scm +0 -0
  46. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/go-tags.scm +0 -0
  47. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/hcl-tags.scm +0 -0
  48. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/java-tags.scm +0 -0
  49. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/javascript-tags.scm +0 -0
  50. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/kotlin-tags.scm +0 -0
  51. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/lua-tags.scm +0 -0
  52. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/ocaml-tags.scm +0 -0
  53. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/ocaml_interface-tags.scm +0 -0
  54. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/php-tags.scm +0 -0
  55. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/pony-tags.scm +0 -0
  56. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/properties-tags.scm +0 -0
  57. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/python-tags.scm +0 -0
  58. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/ql-tags.scm +0 -0
  59. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/r-tags.scm +0 -0
  60. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/racket-tags.scm +0 -0
  61. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/ruby-tags.scm +0 -0
  62. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/rust-tags.scm +0 -0
  63. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/scala-tags.scm +0 -0
  64. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/solidity-tags.scm +0 -0
  65. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/swift-tags.scm +0 -0
  66. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/typescript-tags.scm +0 -0
  67. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/queries/tree-sitter-languages/udev-tags.scm +0 -0
  68. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/repo_map.py +0 -0
  69. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/service_detector.py +0 -0
  70. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/cloud_storage_cleanup/aws/main.yml +0 -0
  71. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/cloud_storage_cleanup/gcp/main.yml +0 -0
  72. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/container_registry/aws/main.tf +0 -0
  73. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/container_registry/aws/outputs.tf +0 -0
  74. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/container_registry/aws/variables.tf +0 -0
  75. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/container_registry/gcp/main.tf +0 -0
  76. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/container_registry/gcp/outputs.tf +0 -0
  77. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/container_registry/gcp/variables.tf +0 -0
  78. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_build_push/aws/main.yml +0 -0
  79. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_build_push/gcp/main.yml +0 -0
  80. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_deploy/aws/main.yml +0 -0
  81. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_deploy/gcp/main.yml +0 -0
  82. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_run/common/main.yml +0 -0
  83. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/base.yml +0 -0
  84. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/elasticsearch.yml +0 -0
  85. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/kafka.yml +0 -0
  86. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/mongodb.yml +0 -0
  87. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/mysql.yml +0 -0
  88. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/postgresql.yml +0 -0
  89. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/rabbitmq.yml +0 -0
  90. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/redis.yml +0 -0
  91. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/services/backend_api.yml +0 -0
  92. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/services/backend_worker.yml +0 -0
  93. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/services/full_stack.yml +0 -0
  94. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/traefik.yml +0 -0
  95. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_compose_snippets/weaviate.yml +0 -0
  96. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_setup/aws/main.yml +0 -0
  97. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/docker_setup/gcp/main.yml +0 -0
  98. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/fetch_remote_files/common/main.yml +0 -0
  99. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_bucket_cert/aws/main.tf +0 -0
  100. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_bucket_cert/aws/outputs.tf +0 -0
  101. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_bucket_cert/aws/variables.tf +0 -0
  102. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_bucket_cert/gcp/main.tf +0 -0
  103. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_bucket_cert/gcp/outputs.tf +0 -0
  104. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_bucket_cert/gcp/variables.tf +0 -0
  105. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_cdn/aws/main.tf +0 -0
  106. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_cdn/aws/outputs.tf +0 -0
  107. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_cdn/aws/variables.tf +0 -0
  108. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_cdn/gcp/main.tf +0 -0
  109. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_cdn/gcp/outputs.tf +0 -0
  110. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_cdn/gcp/variables.tf +0 -0
  111. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_deploy/aws/main.yml +0 -0
  112. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/frontend_deploy/gcp/main.yml +0 -0
  113. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/virtual_machine/aws/main.tf +0 -0
  114. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/virtual_machine/aws/outputs.tf +0 -0
  115. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/virtual_machine/aws/variables.tf +0 -0
  116. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/virtual_machine/gcp/main.tf +0 -0
  117. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/virtual_machine/gcp/outputs.tf +0 -0
  118. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/templates/virtual_machine/gcp/variables.tf +0 -0
  119. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/types.py +0 -0
  120. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/opsmith/utils.py +0 -0
  121. {opsmith_cli-0.2.0b0 → opsmith_cli-0.2.2b0}/uv.lock +0 -0
@@ -0,0 +1,282 @@
1
+ Metadata-Version: 2.4
2
+ Name: opsmith-cli
3
+ Version: 0.2.2b0
4
+ Summary: Opsmith is an AI devops engineer in your terminal
5
+ License-Expression: GPL-3.0-only
6
+ License-File: LICENSE.txt
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Software Development
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: ansible>=10.7.0
19
+ Requires-Dist: black>=25.1.0
20
+ Requires-Dist: boto3-stubs==1.38.36
21
+ Requires-Dist: gitpython>=3.1.44
22
+ Requires-Dist: google-api-python-client>=2.175.0
23
+ Requires-Dist: google-cloud-compute>=1.31.0
24
+ Requires-Dist: google-cloud-resource-manager>=1.14.2
25
+ Requires-Dist: google-cloud-storage>=3.2.0
26
+ Requires-Dist: grep-ast>=0.9.0
27
+ Requires-Dist: inquirer>=3.4.0
28
+ Requires-Dist: jinja2>=3.1.6
29
+ Requires-Dist: networkx>=3.4.2
30
+ Requires-Dist: pick>=2.4.0
31
+ Requires-Dist: pydantic-ai[logfire]==0.4.2
32
+ Requires-Dist: pydantic>=2.11.5
33
+ Requires-Dist: python-dotenv>=1.1.0
34
+ Requires-Dist: pyyaml>=6.0.2
35
+ Requires-Dist: tqdm>=4.67.1
36
+ Requires-Dist: tree-sitter-language-pack>=0.7.3
37
+ Requires-Dist: typer>=0.16.0
38
+ Description-Content-Type: text/markdown
39
+
40
+ # Opsmith: An AI devops engineer in your terminal
41
+
42
+ Opsmith is a command-line tool that acts as an AI-powered DevOps assistant. It's designed to streamline the process of deploying your applications to the cloud, from analyzing your codebase to provisioning infrastructure and deploying your services.
43
+
44
+ Opsmith helps you with the following tasks:
45
+
46
+ - **Codebase Analysis**: It scans your repository to automatically detect services, programming languages, frameworks, and infrastructure dependencies (like databases or caches).
47
+ - **Configuration Generation**: Based on its analysis, Opsmith generates necessary deployment artifacts.
48
+ - **Infrastructure Provisioning**: It uses tools like Terraform and Ansible to provision and configure required cloud resources on supported providers (e.g., AWS, GCP).
49
+ - **Deployment**: It handles the deployment of your application using various strategies, such as a monolithic deployment on a single virtual machine for hobby projects.
50
+
51
+ The primary goal of Opsmith is to make cloud deployments accessible to all developers, regardless of their DevOps expertise. It achieves this by automating complex tasks through an interactive setup process, allowing you to focus on writing code. Opsmith is also designed to prevent cloud provider lock-in, which helps control long-term costs. The generated configurations are standard and maintainable, making it easy to hand over the deployment to an in-house DevOps team.
52
+
53
+ ## Table of Contents
54
+
55
+ - [Getting Started](#getting-started)
56
+ - [Installation](#installation)
57
+ - [Deployment Workflow](#deployment-workflow)
58
+ - [User Guide](#user-guide)
59
+ - [LLMs](#llms)
60
+ - [Supported Models](#supported-models)
61
+ - [Cloud Providers](#cloud-providers)
62
+ - [AWS](#aws-amazon-web-services)
63
+ - [GCP](#gcp-google-cloud-platform)
64
+ - [Deployment Strategies](#deployment-strategies)
65
+ - [Monolithic](#monolithic)
66
+ - [Deployments Directory](#deployments-directory)
67
+ - [Extending Opsmith](#extending-opsmith)
68
+ - [Adding a Cloud Provider](#adding-a-cloud-provider)
69
+ - [Adding a Deployment Strategy](#adding-a-deployment-strategy)
70
+ - [Contributing](#contributing)
71
+
72
+ ## Getting Started
73
+
74
+ ### Installation
75
+
76
+ 1. **Prerequisites**: Opsmith requires `Docker` and `Terraform` to be installed and available in your system's `PATH`.
77
+
78
+ - **macOS (with [Homebrew](https://brew.sh/))**:
79
+ ```shell
80
+ brew install --cask docker
81
+ brew install terraform
82
+ ```
83
+ After installation, make sure you start Docker Desktop.
84
+
85
+ - **Windows (with [Chocolatey](https://chocolatey.org/))**:
86
+ ```shell
87
+ choco install docker-desktop terraform
88
+ ```
89
+ After installation, make sure you start Docker Desktop.
90
+
91
+ - **Linux (Debian/Ubuntu)**:
92
+ Please follow the official installation guides for [Docker](https://docs.docker.com/engine/install/ubuntu/) and [Terraform](https://developer.hashicorp.com/terraform/install).
93
+
94
+ 2. **Install Opsmith**:
95
+ Once the prerequisites are installed, you can install Opsmith using `pip`:
96
+ ```shell
97
+ pip install opsmith-cli
98
+ ```
99
+ On macOS, you might need to use `pip3` if `pip` doesn't work.
100
+
101
+ ### Deployment Workflow
102
+
103
+ Deploying your application with Opsmith follows a straightforward workflow:
104
+
105
+ 1. **Setup Your Project**
106
+
107
+ Navigate to your project's root directory, which should be a Git repository, and run the `setup` command. This command initializes your deployment configuration by analyzing your codebase to detect services and infrastructure requirements.
108
+
109
+ ```shell
110
+ opsmith --model <your-llm-provider:model-name> --api-key <your-api-key> setup
111
+ ```
112
+
113
+ You will be prompted to:
114
+ - Provide an application name.
115
+ - Select a cloud provider (e.g., AWS, GCP — see [Cloud Providers](#cloud-providers) for setup).
116
+ - Review and confirm the services and infrastructure dependencies detected by the AI.
117
+ - Opsmith will then generate a `Dockerfile` for each of your services.
118
+
119
+ 2. **Deploy Your Application**
120
+
121
+ After setting up the configuration, deploy your application using the `deploy` command:
122
+
123
+ ```shell
124
+ opsmith --model <your-llm-provider:model-name> --api-key <your-api-key> deploy
125
+ ```
126
+
127
+ This will guide you through:
128
+ - Creating a new deployment environment (e.g., `dev`, `staging`, `production`).
129
+ - Selecting a cloud region.
130
+ - Choosing a deployment strategy (e.g., `Monolithic`).
131
+ - Configuring domain names for your services if needed.
132
+
133
+ Opsmith will then provision all the necessary cloud infrastructure and deploy your application.
134
+
135
+ 3. **Manage Your Deployments**
136
+
137
+ To manage an existing environment, run the `deploy` command again. You can select an environment and perform the following actions:
138
+ - `release`: Deploy a new version of your application.
139
+ - `run`: Execute a command on a specific service within your environment (e.g., run database migrations).
140
+ - `delete`: Tear down all the infrastructure and delete the environment.
141
+
142
+ ## User Guide
143
+
144
+ ### LLMs
145
+
146
+ Opsmith leverages Large Language Models (LLMs) to analyze your codebase, generate configurations, and make decisions about your infrastructure. To use Opsmith, you must provide an LLM model and a corresponding API key from the model's provider.
147
+
148
+ #### Supported Models
149
+
150
+ Opsmith supports a variety of models from different providers. Here is a list of the currently supported models:
151
+
152
+ - **OpenAI**:
153
+ - `openai:gpt-4.1`
154
+ - `openai:gpt-o3`
155
+ - **Anthropic**:
156
+ - `anthropic:claude-3-7-sonnet-20250219`
157
+ - `anthropic:claude-sonnet-4-20250514`
158
+ - **Google**:
159
+ - `google-gla:gemini-2.5-pro`
160
+
161
+ #### Usage
162
+
163
+ To specify which model to use, pass the `--model` option with the full model name, and provide your API key with the `--api-key` option.
164
+
165
+ **Example with OpenAI:**
166
+ ```shell
167
+ opsmith --model openai:gpt-4.1 --api-key YOUR_OPENAI_API_KEY COMMAND
168
+ ```
169
+
170
+ **Example with Anthropic:**
171
+ ```shell
172
+ opsmith --model anthropic:claude-3-7-sonnet-20250219 --api-key YOUR_ANTHROPIC_API_KEY COMMAND
173
+ ```
174
+
175
+ **Example with Google:**
176
+ ```shell
177
+ opsmith --model google-gla:gemini-2.5-pro --api-key YOUR_GEMINI_API_KEY COMMAND
178
+ ```
179
+
180
+ ### Cloud Providers
181
+
182
+ Opsmith uses your cloud provider's command-line tools to authenticate and manage resources. Before using Opsmith, you need to configure the credentials for your chosen cloud provider.
183
+
184
+ #### AWS (Amazon Web Services)
185
+
186
+ Opsmith uses the official AWS CLI to interact with your account.
187
+
188
+ 1. **Install the AWS CLI**: Follow the [official installation guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) for your operating system.
189
+
190
+ 2. **Configure Credentials**: Once installed, configure the CLI with your AWS credentials by running:
191
+ ```shell
192
+ aws configure
193
+ ```
194
+ You will be prompted to enter your `AWS Access Key ID`, `AWS Secret Access Key`, default region, and default output format. This will store your credentials in the `~/.aws/credentials` file, which Opsmith will use automatically.
195
+
196
+ #### GCP (Google Cloud Platform)
197
+
198
+ Opsmith uses the Google Cloud CLI to authenticate.
199
+
200
+ 1. **Install the gcloud CLI**: Follow the [official installation guide](https://cloud.google.com/sdk/docs/install) for your operating system.
201
+
202
+ 2. **Authenticate with Application Default Credentials (ADC)**: Run the following command to log in and create your ADC file:
203
+ ```shell
204
+ gcloud auth application-default login
205
+ ```
206
+ This command will open a browser window for you to log in to your Google account and authorize access. Once completed, your credentials will be stored locally, and Opsmith will use them to authenticate.
207
+
208
+ ### Deployment Strategies
209
+
210
+ Deployment strategies in Opsmith define the architecture and approach for deploying your application. When you create a new environment, you will be prompted to select a strategy that best fits your project's needs. Each strategy automates the provisioning of specific infrastructure and handles the deployment process accordingly.
211
+
212
+ #### Monolithic
213
+
214
+ The **Monolithic** strategy is designed for simplicity and is ideal for hobby projects, experiments, or small-scale applications. It deploys your entire application to a single virtual machine (VM).
215
+
216
+ Key features of the Monolithic strategy include:
217
+
218
+ - **Single Virtual Machine**: Provisions one VM to host all backend services and infrastructure dependencies.
219
+ - **Containerization**: Backend and full-stack services are containerized using Docker and managed with `docker-compose`. This isolates services and simplifies dependency management.
220
+ - **Frontend Deployment**: Frontend services are built and deployed to a cloud storage bucket (like AWS S3 or GCS) and served through a Content Delivery Network (CDN) for optimal performance.
221
+
222
+ This strategy is a great starting point for getting your application running in the cloud quickly with minimal complexity.
223
+
224
+ ### Deployments Directory
225
+
226
+ When you run `opsmith`, it creates a `.opsmith` directory in the root of your project. This directory stores all the configurations, generated artifacts, and state files required to manage your deployments. This directory is intended to be committed to your git repository so that your deployment configurations are versioned. Sensitive files like Terraform state are automatically ignored.
227
+
228
+ Here is an overview of what you can find inside the `.opsmith` directory:
229
+
230
+ - `deployments.yml`: The main configuration file for your application. It contains the list of services, infrastructure dependencies, cloud provider details, and environment configurations.
231
+ - `docker/`: Contains the generated `Dockerfile`s for each of your services, organized into subdirectories by service name.
232
+ - `environments/`: This directory holds the state and configuration for each of your deployment environments (e.g., `dev`, `staging`).
233
+ - `<environment-name>/`: A directory for each environment, containing Terraform state for provisioned infrastructure and other environment-specific files.
234
+ - `global/`: Contains configurations that are shared across environments within a specific region, such as container registries.
235
+
236
+ ### Extending Opsmith
237
+
238
+ Opsmith has been designed with extensibility in mind, allowing you to add your own cloud providers and deployment strategies. This is achieved through Python's entry points mechanism, which enables other packages to plug into Opsmith seamlessly.
239
+
240
+ #### Adding a Cloud Provider
241
+
242
+ To add a new cloud provider, you need to:
243
+
244
+ 1. Create a Python class that inherits from `opsmith.cloud_providers.base.BaseCloudProvider` and implements all its abstract methods (`name`, `description`, `get_detail_model`, `get_account_details`, `get_instance_types`, `get_regions`).
245
+ 2. Package your new provider class.
246
+ 3. In your package's `pyproject.toml`, add an entry point under the `[project.entry-points."opsmith.cloud_providers"]` group.
247
+
248
+ Example `pyproject.toml` entry:
249
+
250
+ ```toml
251
+ [project.entry-points."opsmith.cloud_providers"]
252
+ my-provider = "my_opsmith_plugin.providers:MyCloudProvider"
253
+ ```
254
+
255
+ Once your package is installed in the same environment as `opsmith-cli`, Opsmith will automatically discover and register your new provider.
256
+
257
+ #### Adding a Deployment Strategy
258
+
259
+ Similarly, you can add a new deployment strategy by:
260
+
261
+ 1. Creating a Python class that inherits from `opsmith.deployment_strategies.base.BaseDeploymentStrategy` and implements its abstract methods (`name`, `description`, `deploy`, `release`, `destroy`, `run`).
262
+ 2. Packaging your new strategy class.
263
+ 3. In your package's `pyproject.toml`, add an entry point under the `[project.entry-points."opsmith.deployment_strategies"]` group.
264
+
265
+ Example `pyproject.toml` entry:
266
+
267
+ ```toml
268
+ [project.entry-points."opsmith.deployment_strategies"]
269
+ my-strategy = "my_opsmith_plugin.strategies:MyStrategy"
270
+ ```
271
+
272
+ After installation, your custom deployment strategy will be available for selection when creating a new environment.
273
+
274
+ ## Contributing
275
+
276
+ We welcome contributions to Opsmith! If you're interested in helping improve the tool, here are a few ways to get started:
277
+
278
+ - **Reporting Bugs**: If you encounter a bug, please open an issue on our GitHub repository. Include as much detail as possible, such as your operating system, the command you ran, and the full error message.
279
+ - **Suggesting Enhancements**: Have an idea for a new feature or an improvement to an existing one? We'd love to hear it. Open an issue to start a discussion.
280
+ - **Submitting Pull Requests**: If you'd like to contribute code, please fork the repository and submit a pull request. For major changes, it's best to discuss your idea in an issue first.
281
+
282
+ When contributing, please follow our [engineering conventions](./CONVENTIONS.md) and ensure your code is formatted with `black`.
@@ -0,0 +1,243 @@
1
+ # Opsmith: An AI devops engineer in your terminal
2
+
3
+ Opsmith is a command-line tool that acts as an AI-powered DevOps assistant. It's designed to streamline the process of deploying your applications to the cloud, from analyzing your codebase to provisioning infrastructure and deploying your services.
4
+
5
+ Opsmith helps you with the following tasks:
6
+
7
+ - **Codebase Analysis**: It scans your repository to automatically detect services, programming languages, frameworks, and infrastructure dependencies (like databases or caches).
8
+ - **Configuration Generation**: Based on its analysis, Opsmith generates necessary deployment artifacts.
9
+ - **Infrastructure Provisioning**: It uses tools like Terraform and Ansible to provision and configure required cloud resources on supported providers (e.g., AWS, GCP).
10
+ - **Deployment**: It handles the deployment of your application using various strategies, such as a monolithic deployment on a single virtual machine for hobby projects.
11
+
12
+ The primary goal of Opsmith is to make cloud deployments accessible to all developers, regardless of their DevOps expertise. It achieves this by automating complex tasks through an interactive setup process, allowing you to focus on writing code. Opsmith is also designed to prevent cloud provider lock-in, which helps control long-term costs. The generated configurations are standard and maintainable, making it easy to hand over the deployment to an in-house DevOps team.
13
+
14
+ ## Table of Contents
15
+
16
+ - [Getting Started](#getting-started)
17
+ - [Installation](#installation)
18
+ - [Deployment Workflow](#deployment-workflow)
19
+ - [User Guide](#user-guide)
20
+ - [LLMs](#llms)
21
+ - [Supported Models](#supported-models)
22
+ - [Cloud Providers](#cloud-providers)
23
+ - [AWS](#aws-amazon-web-services)
24
+ - [GCP](#gcp-google-cloud-platform)
25
+ - [Deployment Strategies](#deployment-strategies)
26
+ - [Monolithic](#monolithic)
27
+ - [Deployments Directory](#deployments-directory)
28
+ - [Extending Opsmith](#extending-opsmith)
29
+ - [Adding a Cloud Provider](#adding-a-cloud-provider)
30
+ - [Adding a Deployment Strategy](#adding-a-deployment-strategy)
31
+ - [Contributing](#contributing)
32
+
33
+ ## Getting Started
34
+
35
+ ### Installation
36
+
37
+ 1. **Prerequisites**: Opsmith requires `Docker` and `Terraform` to be installed and available in your system's `PATH`.
38
+
39
+ - **macOS (with [Homebrew](https://brew.sh/))**:
40
+ ```shell
41
+ brew install --cask docker
42
+ brew install terraform
43
+ ```
44
+ After installation, make sure you start Docker Desktop.
45
+
46
+ - **Windows (with [Chocolatey](https://chocolatey.org/))**:
47
+ ```shell
48
+ choco install docker-desktop terraform
49
+ ```
50
+ After installation, make sure you start Docker Desktop.
51
+
52
+ - **Linux (Debian/Ubuntu)**:
53
+ Please follow the official installation guides for [Docker](https://docs.docker.com/engine/install/ubuntu/) and [Terraform](https://developer.hashicorp.com/terraform/install).
54
+
55
+ 2. **Install Opsmith**:
56
+ Once the prerequisites are installed, you can install Opsmith using `pip`:
57
+ ```shell
58
+ pip install opsmith-cli
59
+ ```
60
+ On macOS, you might need to use `pip3` if `pip` doesn't work.
61
+
62
+ ### Deployment Workflow
63
+
64
+ Deploying your application with Opsmith follows a straightforward workflow:
65
+
66
+ 1. **Setup Your Project**
67
+
68
+ Navigate to your project's root directory, which should be a Git repository, and run the `setup` command. This command initializes your deployment configuration by analyzing your codebase to detect services and infrastructure requirements.
69
+
70
+ ```shell
71
+ opsmith --model <your-llm-provider:model-name> --api-key <your-api-key> setup
72
+ ```
73
+
74
+ You will be prompted to:
75
+ - Provide an application name.
76
+ - Select a cloud provider (e.g., AWS, GCP — see [Cloud Providers](#cloud-providers) for setup).
77
+ - Review and confirm the services and infrastructure dependencies detected by the AI.
78
+ - Opsmith will then generate a `Dockerfile` for each of your services.
79
+
80
+ 2. **Deploy Your Application**
81
+
82
+ After setting up the configuration, deploy your application using the `deploy` command:
83
+
84
+ ```shell
85
+ opsmith --model <your-llm-provider:model-name> --api-key <your-api-key> deploy
86
+ ```
87
+
88
+ This will guide you through:
89
+ - Creating a new deployment environment (e.g., `dev`, `staging`, `production`).
90
+ - Selecting a cloud region.
91
+ - Choosing a deployment strategy (e.g., `Monolithic`).
92
+ - Configuring domain names for your services if needed.
93
+
94
+ Opsmith will then provision all the necessary cloud infrastructure and deploy your application.
95
+
96
+ 3. **Manage Your Deployments**
97
+
98
+ To manage an existing environment, run the `deploy` command again. You can select an environment and perform the following actions:
99
+ - `release`: Deploy a new version of your application.
100
+ - `run`: Execute a command on a specific service within your environment (e.g., run database migrations).
101
+ - `delete`: Tear down all the infrastructure and delete the environment.
102
+
103
+ ## User Guide
104
+
105
+ ### LLMs
106
+
107
+ Opsmith leverages Large Language Models (LLMs) to analyze your codebase, generate configurations, and make decisions about your infrastructure. To use Opsmith, you must provide an LLM model and a corresponding API key from the model's provider.
108
+
109
+ #### Supported Models
110
+
111
+ Opsmith supports a variety of models from different providers. Here is a list of the currently supported models:
112
+
113
+ - **OpenAI**:
114
+ - `openai:gpt-4.1`
115
+ - `openai:gpt-o3`
116
+ - **Anthropic**:
117
+ - `anthropic:claude-3-7-sonnet-20250219`
118
+ - `anthropic:claude-sonnet-4-20250514`
119
+ - **Google**:
120
+ - `google-gla:gemini-2.5-pro`
121
+
122
+ #### Usage
123
+
124
+ To specify which model to use, pass the `--model` option with the full model name, and provide your API key with the `--api-key` option.
125
+
126
+ **Example with OpenAI:**
127
+ ```shell
128
+ opsmith --model openai:gpt-4.1 --api-key YOUR_OPENAI_API_KEY COMMAND
129
+ ```
130
+
131
+ **Example with Anthropic:**
132
+ ```shell
133
+ opsmith --model anthropic:claude-3-7-sonnet-20250219 --api-key YOUR_ANTHROPIC_API_KEY COMMAND
134
+ ```
135
+
136
+ **Example with Google:**
137
+ ```shell
138
+ opsmith --model google-gla:gemini-2.5-pro --api-key YOUR_GEMINI_API_KEY COMMAND
139
+ ```
140
+
141
+ ### Cloud Providers
142
+
143
+ Opsmith uses your cloud provider's command-line tools to authenticate and manage resources. Before using Opsmith, you need to configure the credentials for your chosen cloud provider.
144
+
145
+ #### AWS (Amazon Web Services)
146
+
147
+ Opsmith uses the official AWS CLI to interact with your account.
148
+
149
+ 1. **Install the AWS CLI**: Follow the [official installation guide](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) for your operating system.
150
+
151
+ 2. **Configure Credentials**: Once installed, configure the CLI with your AWS credentials by running:
152
+ ```shell
153
+ aws configure
154
+ ```
155
+ You will be prompted to enter your `AWS Access Key ID`, `AWS Secret Access Key`, default region, and default output format. This will store your credentials in the `~/.aws/credentials` file, which Opsmith will use automatically.
156
+
157
+ #### GCP (Google Cloud Platform)
158
+
159
+ Opsmith uses the Google Cloud CLI to authenticate.
160
+
161
+ 1. **Install the gcloud CLI**: Follow the [official installation guide](https://cloud.google.com/sdk/docs/install) for your operating system.
162
+
163
+ 2. **Authenticate with Application Default Credentials (ADC)**: Run the following command to log in and create your ADC file:
164
+ ```shell
165
+ gcloud auth application-default login
166
+ ```
167
+ This command will open a browser window for you to log in to your Google account and authorize access. Once completed, your credentials will be stored locally, and Opsmith will use them to authenticate.
168
+
169
+ ### Deployment Strategies
170
+
171
+ Deployment strategies in Opsmith define the architecture and approach for deploying your application. When you create a new environment, you will be prompted to select a strategy that best fits your project's needs. Each strategy automates the provisioning of specific infrastructure and handles the deployment process accordingly.
172
+
173
+ #### Monolithic
174
+
175
+ The **Monolithic** strategy is designed for simplicity and is ideal for hobby projects, experiments, or small-scale applications. It deploys your entire application to a single virtual machine (VM).
176
+
177
+ Key features of the Monolithic strategy include:
178
+
179
+ - **Single Virtual Machine**: Provisions one VM to host all backend services and infrastructure dependencies.
180
+ - **Containerization**: Backend and full-stack services are containerized using Docker and managed with `docker-compose`. This isolates services and simplifies dependency management.
181
+ - **Frontend Deployment**: Frontend services are built and deployed to a cloud storage bucket (like AWS S3 or GCS) and served through a Content Delivery Network (CDN) for optimal performance.
182
+
183
+ This strategy is a great starting point for getting your application running in the cloud quickly with minimal complexity.
184
+
185
+ ### Deployments Directory
186
+
187
+ When you run `opsmith`, it creates a `.opsmith` directory in the root of your project. This directory stores all the configurations, generated artifacts, and state files required to manage your deployments. This directory is intended to be committed to your git repository so that your deployment configurations are versioned. Sensitive files like Terraform state are automatically ignored.
188
+
189
+ Here is an overview of what you can find inside the `.opsmith` directory:
190
+
191
+ - `deployments.yml`: The main configuration file for your application. It contains the list of services, infrastructure dependencies, cloud provider details, and environment configurations.
192
+ - `docker/`: Contains the generated `Dockerfile`s for each of your services, organized into subdirectories by service name.
193
+ - `environments/`: This directory holds the state and configuration for each of your deployment environments (e.g., `dev`, `staging`).
194
+ - `<environment-name>/`: A directory for each environment, containing Terraform state for provisioned infrastructure and other environment-specific files.
195
+ - `global/`: Contains configurations that are shared across environments within a specific region, such as container registries.
196
+
197
+ ### Extending Opsmith
198
+
199
+ Opsmith has been designed with extensibility in mind, allowing you to add your own cloud providers and deployment strategies. This is achieved through Python's entry points mechanism, which enables other packages to plug into Opsmith seamlessly.
200
+
201
+ #### Adding a Cloud Provider
202
+
203
+ To add a new cloud provider, you need to:
204
+
205
+ 1. Create a Python class that inherits from `opsmith.cloud_providers.base.BaseCloudProvider` and implements all its abstract methods (`name`, `description`, `get_detail_model`, `get_account_details`, `get_instance_types`, `get_regions`).
206
+ 2. Package your new provider class.
207
+ 3. In your package's `pyproject.toml`, add an entry point under the `[project.entry-points."opsmith.cloud_providers"]` group.
208
+
209
+ Example `pyproject.toml` entry:
210
+
211
+ ```toml
212
+ [project.entry-points."opsmith.cloud_providers"]
213
+ my-provider = "my_opsmith_plugin.providers:MyCloudProvider"
214
+ ```
215
+
216
+ Once your package is installed in the same environment as `opsmith-cli`, Opsmith will automatically discover and register your new provider.
217
+
218
+ #### Adding a Deployment Strategy
219
+
220
+ Similarly, you can add a new deployment strategy by:
221
+
222
+ 1. Creating a Python class that inherits from `opsmith.deployment_strategies.base.BaseDeploymentStrategy` and implements its abstract methods (`name`, `description`, `deploy`, `release`, `destroy`, `run`).
223
+ 2. Packaging your new strategy class.
224
+ 3. In your package's `pyproject.toml`, add an entry point under the `[project.entry-points."opsmith.deployment_strategies"]` group.
225
+
226
+ Example `pyproject.toml` entry:
227
+
228
+ ```toml
229
+ [project.entry-points."opsmith.deployment_strategies"]
230
+ my-strategy = "my_opsmith_plugin.strategies:MyStrategy"
231
+ ```
232
+
233
+ After installation, your custom deployment strategy will be available for selection when creating a new environment.
234
+
235
+ ## Contributing
236
+
237
+ We welcome contributions to Opsmith! If you're interested in helping improve the tool, here are a few ways to get started:
238
+
239
+ - **Reporting Bugs**: If you encounter a bug, please open an issue on our GitHub repository. Include as much detail as possible, such as your operating system, the command you ran, and the full error message.
240
+ - **Suggesting Enhancements**: Have an idea for a new feature or an improvement to an existing one? We'd love to hear it. Open an issue to start a discussion.
241
+ - **Submitting Pull Requests**: If you'd like to contribute code, please fork the repository and submit a pull request. For major changes, it's best to discuss your idea in an issue first.
242
+
243
+ When contributing, please follow our [engineering conventions](./CONVENTIONS.md) and ensure your code is formatted with `black`.
@@ -64,3 +64,34 @@ class GitRepo:
64
64
  # Construct absolute paths and filter out potential empty strings from split
65
65
  absolute_paths = [git_root / p for p in relative_paths if p]
66
66
  return absolute_paths
67
+
68
+ def ensure_gitignore(self):
69
+ """Ensures that Terraform state files are included in .gitignore."""
70
+ gitignore_path = Path(self.repo.working_dir) / ".gitignore"
71
+
72
+ ignore_block = [
73
+ "",
74
+ "# Opsmith",
75
+ "# Ignore Terraform state files and directories",
76
+ "**/.terraform/",
77
+ "**/*.tfstate",
78
+ "**/*.tfstate.backup",
79
+ ]
80
+ ignore_block_str = "\n".join(ignore_block) + "\n"
81
+
82
+ sentinel = "**/.terraform/"
83
+
84
+ content = ""
85
+ if gitignore_path.exists():
86
+ with open(gitignore_path, "r", encoding="utf-8") as f:
87
+ content = f.read()
88
+
89
+ if sentinel in content:
90
+ return
91
+
92
+ with open(gitignore_path, "a", encoding="utf-8") as f:
93
+ f.write(ignore_block_str)
94
+
95
+ print(
96
+ "[bold green].gitignore has been updated to ignore Terraform state files.[/bold green]"
97
+ )
@@ -13,6 +13,7 @@ from opsmith.agent import build_agent
13
13
  from opsmith.cloud_providers import CLOUD_PROVIDER_REGISTRY
14
14
  from opsmith.cloud_providers.base import CloudCredentialsError
15
15
  from opsmith.deployment_strategies import DEPLOYMENT_STRATEGY_REGISTRY
16
+ from opsmith.git_repo import GitRepo
16
17
  from opsmith.models import MODEL_REGISTRY, BaseAiModel
17
18
  from opsmith.repo_map import RepoMap
18
19
  from opsmith.service_detector import ServiceDetector
@@ -201,6 +202,7 @@ def setup(ctx: typer.Context):
201
202
  Identifies services, their languages, types, and frameworks.
202
203
  """
203
204
  detector = ServiceDetector(src_dir=ctx.obj["src_dir"], agent=ctx.obj["agent"])
205
+ git_repo = GitRepo(Path(ctx.obj["src_dir"]))
204
206
  deployment_config = DeploymentConfig.load(ctx.obj["deployments_path"])
205
207
  scan_services = False
206
208
 
@@ -270,6 +272,7 @@ def setup(ctx: typer.Context):
270
272
  cloud_provider=cloud_details,
271
273
  )
272
274
  scan_services = True
275
+ git_repo.ensure_gitignore()
273
276
 
274
277
  if scan_services:
275
278
  print("Scanning your codebase now to detect services, frameworks, and languages...")
@@ -12,7 +12,7 @@ class OpsmithSettings(BaseSettings):
12
12
  deployments_dir: str = ".opsmith"
13
13
  config_filename: str = "deployments.yml"
14
14
  max_dockerfile_gen_attempts: int = 3
15
- max_docker_compose_gen_attempts: int = 1
15
+ max_docker_compose_gen_attempts: int = 3
16
16
 
17
17
  @classmethod
18
18
  def settings_customise_sources(
@@ -1,7 +1,8 @@
1
1
  [project]
2
2
  name = "opsmith-cli"
3
- version = "0.2.0b"
3
+ version = "0.2.2b"
4
4
  description = "Opsmith is an AI devops engineer in your terminal"
5
+ readme = {file = "README.md", content-type = "text/markdown"}
5
6
  classifiers = [
6
7
  "Development Status :: 4 - Beta",
7
8
  "Environment :: Console",
@@ -1,37 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: opsmith-cli
3
- Version: 0.2.0b0
4
- Summary: Opsmith is an AI devops engineer in your terminal
5
- License-Expression: GPL-3.0-only
6
- License-File: LICENSE.txt
7
- Classifier: Development Status :: 4 - Beta
8
- Classifier: Environment :: Console
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Programming Language :: Python
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Classifier: Topic :: Software Development
17
- Requires-Python: >=3.10
18
- Requires-Dist: ansible>=10.7.0
19
- Requires-Dist: black>=25.1.0
20
- Requires-Dist: boto3-stubs==1.38.36
21
- Requires-Dist: gitpython>=3.1.44
22
- Requires-Dist: google-api-python-client>=2.175.0
23
- Requires-Dist: google-cloud-compute>=1.31.0
24
- Requires-Dist: google-cloud-resource-manager>=1.14.2
25
- Requires-Dist: google-cloud-storage>=3.2.0
26
- Requires-Dist: grep-ast>=0.9.0
27
- Requires-Dist: inquirer>=3.4.0
28
- Requires-Dist: jinja2>=3.1.6
29
- Requires-Dist: networkx>=3.4.2
30
- Requires-Dist: pick>=2.4.0
31
- Requires-Dist: pydantic-ai[logfire]==0.4.2
32
- Requires-Dist: pydantic>=2.11.5
33
- Requires-Dist: python-dotenv>=1.1.0
34
- Requires-Dist: pyyaml>=6.0.2
35
- Requires-Dist: tqdm>=4.67.1
36
- Requires-Dist: tree-sitter-language-pack>=0.7.3
37
- Requires-Dist: typer>=0.16.0
@@ -1 +0,0 @@
1
- # Opsmith: An AI devops engineer in your terminal
File without changes
File without changes
File without changes
File without changes