diff --git a/cli/packages/cmd/root.go b/cli/packages/cmd/root.go
index 5e6536e11..b1b53d2ff 100644
--- a/cli/packages/cmd/root.go
+++ b/cli/packages/cmd/root.go
@@ -15,7 +15,7 @@ var rootCmd = &cobra.Command{
Short: "Infisical CLI is used to inject environment variables into any process",
Long: `Infisical is a simple, end-to-end encrypted service that enables teams to sync and manage their environment variables across their development life cycle.`,
CompletionOptions: cobra.CompletionOptions{HiddenDefaultCmd: true},
- Version: "0.1.16",
+ Version: "0.2.0",
}
// Execute adds all child commands to the root command and sets flags appropriately.
diff --git a/cli/packages/cmd/secrets.go b/cli/packages/cmd/secrets.go
index 810da49c4..df77e67d4 100644
--- a/cli/packages/cmd/secrets.go
+++ b/cli/packages/cmd/secrets.go
@@ -313,7 +313,7 @@ func init() {
secretsCmd.AddCommand(secretsGetCmd)
secretsCmd.AddCommand(secretsSetCmd)
secretsCmd.AddCommand(secretsDeleteCmd)
- secretsCmd.PersistentFlags().String("env", "dev", "Used to define the environment name on which actions should be taken on")
+ secretsCmd.PersistentFlags().String("env", "dev", "Used to select the environment name on which actions should be taken on")
secretsCmd.Flags().Bool("expand", true, "Parse shell parameter expansions in your secrets")
secretsCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) {
util.RequireLogin()
diff --git a/cli/packages/util/secrets.go b/cli/packages/util/secrets.go
index 9c5c12d09..131a8e66d 100644
--- a/cli/packages/util/secrets.go
+++ b/cli/packages/util/secrets.go
@@ -46,7 +46,7 @@ func GetPlainTextSecretsViaServiceToken(fullServiceToken string) ([]models.Singl
return nil, fmt.Errorf("unable to decode symmetric encryption details [err=%v]", err)
}
- plainTextWorkspaceKey, err := crypto.DecryptSymmetric(decodedSymmetricEncryptionDetails.Key, decodedSymmetricEncryptionDetails.Cipher, decodedSymmetricEncryptionDetails.Tag, decodedSymmetricEncryptionDetails.IV)
+ plainTextWorkspaceKey, err := crypto.DecryptSymmetric([]byte(serviceTokenParts[3]), decodedSymmetricEncryptionDetails.Cipher, decodedSymmetricEncryptionDetails.Tag, decodedSymmetricEncryptionDetails.IV)
if err != nil {
return nil, fmt.Errorf("unable to decrypt the required workspace key")
}
diff --git a/cli/packages/util/vault.go b/cli/packages/util/vault.go
index 63a014af1..b42308cc4 100644
--- a/cli/packages/util/vault.go
+++ b/cli/packages/util/vault.go
@@ -53,14 +53,16 @@ func GetKeyRing() (keyring.Keyring, error) {
}
func fileKeyringPassphrasePrompt(prompt string) (string, error) {
+ fmt.Println("You may set the `INFISICAL_VAULT_FILE_PASSPHRASE` environment variable to avoid typing password")
if password, ok := os.LookupEnv("INFISICAL_VAULT_FILE_PASSPHRASE"); ok {
return password, nil
}
- fmt.Fprintf(os.Stderr, "%s: ", prompt)
+ fmt.Fprintf(os.Stderr, "%s:", prompt)
b, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
return "", err
}
+ fmt.Println("")
return string(b), nil
}
diff --git a/docs/cli/commands/run.mdx b/docs/cli/commands/run.mdx
index 4afd7586d..cbfcb4d98 100644
--- a/docs/cli/commands/run.mdx
+++ b/docs/cli/commands/run.mdx
@@ -31,7 +31,6 @@ Inject environment variables from the platform into an application process.
| Option | Description | Default value |
| -------------- | ----------------------------------------------------------------------------------------------------------- | ------------- |
| `--env` | Used to set the environment that secrets are pulled from. Accepted values: `dev`, `staging`, `test`, `prod` | `dev` |
-| `--projectId` | Used to link a local project to the platform (required only if injecting via the service token method) | None |
| `--expand` | Parse shell parameter expansions in your secrets (e.g., `${DOMAIN}`) | `true` |
| `--command` | Pass secrets into chained commands (e.g., `"first-command && second-command; more-commands..."`) | None |
| `--secret-overriding`| Prioritizes personal secrets with the same name over shared secrets | `true` |
diff --git a/docs/cli/commands/secrets.mdx b/docs/cli/commands/secrets.mdx
index 32ddb2255..9b4642347 100644
--- a/docs/cli/commands/secrets.mdx
+++ b/docs/cli/commands/secrets.mdx
@@ -10,7 +10,7 @@ infisical secrets
This command enables you to perform CRUD (create, read, update, delete) operations on secrets within your Infisical project. With it, you can view, create, update, and delete secrets in your environment.
### Sub-commands
-
+
Use this command to print out all of the secrets in your project
```
@@ -33,6 +33,12 @@ This command enables you to perform CRUD (create, read, update, delete) operatio
Default value: `true`
+
+ Used to select the environment name on which actions should be taken on
+
+ Default value: `dev`
+
+
@@ -52,7 +58,11 @@ This command enables you to perform CRUD (create, read, update, delete) operatio
```
### Flags
- None
+
+ Used to select the environment name on which actions should be taken on
+
+ Default value: `dev`
+
@@ -74,7 +84,11 @@ $ infisical secrets set STRIPE_API_KEY=sjdgwkeudyjwe DOMAIN=example.com HASH=jeb
```
### Flags
- None
+
+ Used to select the environment name on which actions should be taken on
+
+ Default value: `dev`
+
@@ -89,5 +103,9 @@ $ infisical secrets set STRIPE_API_KEY=sjdgwkeudyjwe DOMAIN=example.com HASH=jeb
```
### Flags
- None
+
+ Used to select the environment name on which actions should be taken on
+
+ Default value: `dev`
+
\ No newline at end of file
diff --git a/frontend/components/analytics/posthog.ts b/frontend/components/analytics/posthog.ts
index e0d6e7c09..e0dedc7fb 100644
--- a/frontend/components/analytics/posthog.ts
+++ b/frontend/components/analytics/posthog.ts
@@ -5,14 +5,19 @@ import posthog from 'posthog-js';
import { ENV, POSTHOG_API_KEY, POSTHOG_HOST } from '../utilities/config';
export const initPostHog = () => {
- if (typeof window !== 'undefined') {
- // @ts-ignore
- if (ENV == 'production' && TELEMETRY_CAPTURING_ENABLED) {
- posthog.init(POSTHOG_API_KEY, {
- api_host: POSTHOG_HOST
- });
+ try {
+ if (typeof window !== 'undefined') {
+ // @ts-ignore
+ if (ENV == 'production' && TELEMETRY_CAPTURING_ENABLED) {
+ console.log("Outside of posthog", "POSTHOG_API_KEY", POSTHOG_API_KEY, "POSTHOG_HOST", POSTHOG_HOST)
+ posthog.init(POSTHOG_API_KEY, {
+ api_host: POSTHOG_HOST
+ });
+ }
}
- }
- return posthog;
+ return posthog;
+ } catch (e) {
+ console.log("posthog err", e)
+ }
};
diff --git a/frontend/scripts/start.sh b/frontend/scripts/start.sh
index 05a1f219a..fea97eb6b 100644
--- a/frontend/scripts/start.sh
+++ b/frontend/scripts/start.sh
@@ -2,7 +2,7 @@
scripts/replace-variable.sh "$BAKED_NEXT_PUBLIC_POSTHOG_API_KEY" "$NEXT_PUBLIC_POSTHOG_API_KEY"
-if [ "$INFISICAL_TELEMETRY_ENABLED" != "false" ]; then
+if [ "$TELEMETRY_ENABLED" != "false" ]; then
echo "Telemetry is enabled"
scripts/set-telemetry.sh true
else