Skip to content

Commit

Permalink
Adding examples
Browse files Browse the repository at this point in the history
Signed-off-by: ytimocin <ytimocin@microsoft.com>
  • Loading branch information
ytimocin committed Jan 21, 2025
1 parent ccc11e1 commit 693f783
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 20 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ With features like interactive flows, intelligent suggestions, and broad connect
- [🎯 Planned Features](#-planned-features)
- [🤝 Contributing](#-contributing)
- [🪪 License](#-license)
- [📚 Examples](#-examples)

## 🚀 Key Features

Expand Down Expand Up @@ -139,3 +140,7 @@ We welcome contributions! Please see our [CONTRIBUTING.md](docs/contributing/CON
## 🪪 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 📚 Examples

Please see [Prompt-Ops examples](docs/examples/README.md) for details.
10 changes: 5 additions & 5 deletions cmd/pops/app/conn/cloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Cloud Connection:
- Available Cloud connection types: Azure.
- Commands: create, delete, open, list, types.
- Examples:
* 'pops connection cloud create' creates a connection to a cloud provider.
* 'pops connection cloud open' opens an existing cloud connection.
* 'pops connection cloud list' lists all cloud connections.
* 'pops connection cloud delete' deletes a cloud connection.
* 'pops connection cloud types' lists all available cloud connection types (for now; Azure).
* 'pops conn cloud create' creates a connection to a cloud provider.
* 'pops conn cloud open' opens an existing cloud connection.
* 'pops conn cloud list' lists all cloud connections.
* 'pops conn cloud delete' deletes a cloud connection.
* 'pops conn cloud types' lists all available cloud connection types (for now; Azure).
More connection types and features are coming soon!`,
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/pops/app/conn/cloud/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ Cloud Connection:
- Available Cloud connection types: Azure.
- Commands: create, delete, open, list, types.
- Examples:
* 'pops connection cloud create' creates a connection interactively.
* 'pops connection cloud create --name my-azure-conn --provider azure' creates a connection non-interactively.
* 'pops conn cloud create' creates a connection interactively.
* 'pops conn cloud create --name my-azure-conn --provider azure' creates a connection non-interactively.
`,
Run: func(cmd *cobra.Command, args []string) {
// Non-interactive mode
Expand Down
10 changes: 5 additions & 5 deletions cmd/pops/app/conn/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Database Connection:
- Available Database connection types: MySQL, PostgreSQL, and MongoDB.
- Commands: create, delete, open, list, types.
- Examples:
* 'pops connection db create' creates a connection to a database.
* 'pops connection db open' opens an existing database connection.
* 'pops connection db list' lists all database connections.
* 'pops connection db delete' deletes a database connection.
* 'pops connection db types' lists all available database connection types (for now; MySQL, PostgreSQL, and MongoDB).
* 'pops conn db create' creates a connection to a database.
* 'pops conn db open' opens an existing database connection.
* 'pops conn db list' lists all database connections.
* 'pops conn db delete' deletes a database connection.
* 'pops conn db types' lists all available database connection types (for now; MySQL, PostgreSQL, and MongoDB).
More connection types and features are coming soon!`,
}
Expand Down
15 changes: 8 additions & 7 deletions cmd/pops/app/conn/k8s/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ import (

func NewRootCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "kubernetes",
Short: "Manage kubernetes connections.",
Use: "kubernetes",
Aliases: []string{"k8s"},
Short: "Manage kubernetes connections.",
Long: `
Kubernetes Connection:
- Available Kubernetes connection types: All Kubernetes clusters defined in your configuration.
- Commands: create, delete, open, list, types.
- Examples:
* 'pops connection kubernetes create' creates a connection to a Kubernetes cluster.
* 'pops connection kubernetes open' opens an existing Kubernetes connection.
* 'pops connection kubernetes list' lists all Kubernetes connections.
* 'pops connection kubernetes delete' deletes a Kubernetes connection.
* 'pops connection kubernetes types' lists all available Kubernetes connection types (for now; all Kubernetes clusters defined in your configuration).
* 'pops conn k8s create' creates a connection to a Kubernetes cluster.
* 'pops conn k8s open' opens an existing Kubernetes connection.
* 'pops conn k8s list' lists all Kubernetes connections.
* 'pops conn k8s delete' deletes a Kubernetes connection.
* 'pops conn k8s types' lists all available Kubernetes connection types (for now; all Kubernetes clusters defined in your configuration).
More connection types and features are coming soon!`,
}
Expand Down
7 changes: 7 additions & 0 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Prompt-Ops Examples

## Connection Examples

### Kubernetes

- [`pops conn k8s create` example](conn/k8s/README.md)
19 changes: 19 additions & 0 deletions docs/examples/conn/k8s/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Prompt-Ops Kubernetes Connection Examples

## Create a new Connection

To create a new Kubernetes connection, use the following command:

```bash
pops conn k8s create
```

Demo:

![pops conn k8s create](./pops_conn_k8s_create_v1.gif)

## Open an existing Connection

## Ask a Question via Prompt-Ops

## Request a Command via Prompt-Ops
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
1 change: 0 additions & 1 deletion sessions.json

This file was deleted.

0 comments on commit 693f783

Please sign in to comment.