sidekick_vault 1.1.0 copy "sidekick_vault: ^1.1.0" to clipboard
sidekick_vault: ^1.1.0 copied to clipboard

Reads project secrets stored encrypted on the local filesystem

example/example.dart

import 'package:sidekick_core/sidekick_core.dart';
import 'package:sidekick_vault/sidekick_vault.dart';

void main() {
  final vault = SidekickVault(
    location: SidekickContext.projectRoot.directory('vault'),
    // environment variable where CIs can inject the vault password
    environmentVariableName: 'FLT_VAULT_PASSPHRASE',
  );

// define encrypted files in vault
  final EncryptedVaultString encrypted = vault.encryptedString('secret.txt');
// access the text prompts the passsword
  print(encrypted.text);

  // directly decrypt (prompts password immediately)
  final secret = vault.loadText('secret.txt');
  print(secret);
}
5
likes
130
pub points
42%
popularity

Publisher

verified publisherphntm.xyz

Reads project secrets stored encrypted on the local filesystem

Repository (GitHub)
View/report issues

Topics

#sidekick #cli #sidekick-plugin

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

actions_toolkit_dart, dcli, sidekick_core

More

Packages that depend on sidekick_vault