Skip to content

Commit

Permalink
Small changes to readme, bug ones will come soon
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanratcliffe committed Feb 14, 2024
1 parent 6d55832 commit cfdece1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 44 deletions.
60 changes: 22 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,31 @@
# Overmind CLI

CLI to interact with the overmind API
CLI to interact with the Overmind API

```
Usage:
ovm-cli [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
create-bookmark Creates a bookmark from JSON.
create-invite Create a new invite
end-change Finishes the specified change. Call this just after you finished the change. This will store a snapshot of the current system state for later reference.
get-affected-bookmarks Calculates the bookmarks that would be overlapping with a snapshot.
get-bookmark Displays the contents of a bookmark.
get-change Displays the contents of a change.
get-snapshot Displays the contents of a snapshot.
help Help about any command
list-changes Displays the contents of a change.
list-invites List all invites
manual-change Creates a new Change from a given query
request Runs a request against the overmind API
revoke-invites Revoke an existing invite
start-change Starts the specified change. Call this just before you're about to start the change. This will store a snapshot of the current system state for later reference.
submit-plan Creates a new Change from a given terraform plan file
overmind [command]
Infrastructure as Code:
terraform Run Terrafrom with Overmind's change tracking - COMING SOON
Overmind API:
bookmarks Interact with the bookarks that were created in the Explore view
changes Create, update and delete changes in Overmind
invites Manage invites for your team to Overmind
request Runs a request against the overmind API
snapshots Create, view and delete snapshots if your infrastructure
Additional Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
Flags:
--api-key string The API key to use for authentication, also read from OVM_API_KEY environment variable
--api-key-url string The overmind API Keys endpoint (defaults to --url)
--auth0-client-id string OAuth Client ID to use when connecting with auth (default "j3LylZtIosVPZtouKI8WuVHmE6Lluva1")
--auth0-domain string Auth0 domain to connect to (default "om-prod.eu.auth0.com")
--gateway-url string The overmind Gateway endpoint (defaults to /api/gateway on --url)
-h, --help help for ovm-cli
--honeycomb-api-key string If specified, configures opentelemetry libraries to submit traces to honeycomb. This requires --otel to be set.
--json-log Set to true to emit logs as json for easier parsing.
--log string Set the log level. Valid values: panic, fatal, error, warn, info, debug, trace (default "info")
--otel If specified, configures opentelemetry and - optionally, see --sentry-dsn - sentry using their default environment configs.
--run-mode string Set the run mode for this service, 'release', 'debug' or 'test'. Defaults to 'release'. (default "release")
--sentry-dsn string If specified, configures sentry libraries to capture errors. This requires --otel to be set.
--stdout-trace-dump Dump all otel traces to stdout for debugging. This requires --otel to be set.
--url string The overmind API endpoint (default "https://api.prod.overmind.tech")
-v, --version version for ovm-cli
Use "ovm-cli [command] --help" for more information about a command.
-h, --help help for overmind
--log string Set the log level. Valid values: panic, fatal, error, warn, info, debug, trace (default "info")
-v, --version version for overmind
Use "overmind [command] --help" for more information about a command.
```

## Examples
Expand All @@ -50,7 +34,7 @@ Upload a terraform plan to overmind for Blast Radius Analysis:

```
terraform show -json ./tfplan > ./tfplan.json
ovm-cli submit-plan --title "example change" ./tfplan1.json ./tfplan2.json ./tfplan3.json
overmind changes submit-plan --title "example change" ./tfplan1.json ./tfplan2.json ./tfplan3.json
```

## Terraform ➡ Overmind Mapping
Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,16 +421,16 @@ func addChangeUuidFlags(cmd *cobra.Command) {
}

// Adds common flags to API commands e.g. timeout
func addAPIFlags(cnd *cobra.Command) {
createBookmarkCmd.PersistentFlags().String("timeout", "5m", "How long to wait for responses")
func addAPIFlags(cmd *cobra.Command) {
cmd.PersistentFlags().String("timeout", "5m", "How long to wait for responses")
cmd.PersistentFlags().String("url", "https://api.prod.overmind.tech", "The overmind API endpoint")
}

func init() {
cobra.OnInitialize(initConfig)

// General Config
rootCmd.PersistentFlags().StringVar(&logLevel, "log", "info", "Set the log level. Valid values: panic, fatal, error, warn, info, debug, trace")
rootCmd.PersistentFlags().String("url", "https://api.prod.overmind.tech", "The overmind API endpoint")

// Support API Keys in the environment
err := viper.BindEnv("api-key", "OVM_API_KEY", "API_KEY")
Expand Down
3 changes: 0 additions & 3 deletions cmd/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ var terraformCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(terraformCmd)

// Hide this flag from the Terraform help as we don't want it to be messy
rootCmd.PersistentFlags().MarkHidden("url")

// Here you will define your flags and configuration settings.

// Cobra supports Persistent Flags which will work for this command
Expand Down

0 comments on commit cfdece1

Please sign in to comment.