@brickblock/bbk-devtools v0.50.5
@brickblock/bbk-devtools
Brickblock Developer Tools
Conventions
Context
The bbk ctx determines your current context. This will set the google cloud project to use and the Kubernetes context to use.
Please make sure to set this property before running any further commands.
Group and Project
The Gitlab group and project to be used are determined by the git origin url of the current directory.
Please make sure to cd into the correct directory before running commands
Setup
$ npm install -g @brickblock/bbk-devtools
$ bbk COMMAND
running command...
$ bbk (-v|--version|version)
@brickblock/bbk-devtools/0.50.3 darwin-x64 node-v10.23.0
$ bbk --help [COMMAND]
USAGE
$ bbk COMMAND
...Commands
bbk autocomplete [SHELL]bbk ctx [ENVIRONMENT]bbk db:getbbk db:proxy [OPERATION]bbk doctorbbk help [COMMAND]bbk init PACKAGEbbk installbbk logs PROJECTbbk replbbk secrets:check CONFIGPATHbbk secrets:decrypt [CONTEXT]bbk secrets:encrypt [CONTEXT]bbk secrets:set CONTEXTbbk sync
bbk autocomplete [SHELL]
display autocomplete installation instructions
display autocomplete installation instructions
USAGE
$ bbk autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ bbk autocomplete
$ bbk autocomplete bash
$ bbk autocomplete zsh
$ bbk autocomplete --refresh-cacheSee code: @oclif/plugin-autocomplete
bbk ctx [ENVIRONMENT]
get or set the current context
get or set the current context
USAGE
$ bbk ctx [ENVIRONMENT]
ALIASES
$ bbk ctx
$ bbk contextbbk db:get
get information about the database instance, incl. credentials to connect
get information about the database instance, incl. credentials to connect
USAGE
$ bbk db:getbbk db:proxy [OPERATION]
start a cloudsql proxy to connect to an instance
start a cloudsql proxy to connect to an instance
USAGE
$ bbk db:proxy [OPERATION]
ARGUMENTS
OPERATION (start|stop) [default: start] start or stop the proxy
OPTIONS
-p, --port=port [default: 5432] port to run the proxy onbbk doctor
check if dependencies are installed
check if dependencies are installed
USAGE
$ bbk doctorbbk help [COMMAND]
display help for bbk
display help for <%= config.bin %>
USAGE
$ bbk help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLISee code: @oclif/plugin-help
bbk init PACKAGE
Initialize a brickblock project
Initialize a brickblock project
USAGE
$ bbk init PACKAGE
ARGUMENTS
PACKAGE [default: bbk-devtools] npm package name (will be prefixed with `@brickblock`)
OPTIONS
-b, --branch=branch [default: master] project-templates branch to sync from, defaults
to 'master'
-p, --preset=cra|rest-api|library|smart-contracts preset to use
--database Adds database support to the preset rest-api.
--skipBootstrap Skips bootstrapping when migrating repos over to 'bbk init' where
we don't want to overwrite code in './src'
--skipHealthcheck Skips the healthcheck after syncing for faster iteration and
debuggingbbk install
install dependencies
install dependencies
USAGE
$ bbk installbbk logs PROJECT
get logs from Kubernetes
get logs from Kubernetes
USAGE
$ bbk logs PROJECT
ARGUMENTS
PROJECT [default: devops/bbk-devtools] The project to get logs from
OPTIONS
-a, --all Show logs from all pods
-b, --branch=branch Branch to use (review only)
-i, --interval=interval [default: 3000] Show logs polling intervalbbk repl
run in interactive mode
run in interactive mode
USAGE
$ bbk replbbk secrets:check CONFIGPATH
Checks if the config are encrypted correctly
Checks if the config are encrypted correctly
USAGE
$ bbk secrets:check CONFIGPATH
ARGUMENTS
CONFIGPATH [default: /config/] path to the directory containing the configs
ALIASES
$ bbk checkbbk secrets:decrypt [CONTEXT]
decrypt a config file
decrypt a config file
USAGE
$ bbk secrets:decrypt [CONTEXT]
EXAMPLE
bbk secrets:decrypt developmentbbk secrets:encrypt [CONTEXT]
encrypt a config file
encrypt a config file
USAGE
$ bbk secrets:encrypt [CONTEXT]
EXAMPLE
bbk secrets:encrypt developmentbbk secrets:set CONTEXT
Set a value in an encrypted file
Set a value in an encrypted file
NOTE: the value must be JSON encoded (ie. JSON.stringify(value))
USAGE
$ bbk secrets:set CONTEXT
OPTIONS
-k, --key=key (required) Key to set (in Python dict lookup format)
-v, --value=value (required) Value to set (JSON)
DESCRIPTION
Set a value in an encrypted file
NOTE: the value must be JSON encoded (ie. JSON.stringify(value))
EXAMPLES
setting a simple value:
bbk secrets:set production --key '["emailService"]["url"]' --value https://email.staging.brickblock.sh
setting a complex value:
bbk secrets:set staging --key '["apis"][2]' --value '{"isGraphQL": false, "target":
"http://platform-kyc-provider-api.platform:3000/", "path": "/api/id-now-install-sms", "changeOrigin": true, "rewrite":
{"regex": "/api/", "replacement": "/"} }'bbk sync
Synchronize latest best practices into your project
Synchronize latest best practices into your project
USAGE
$ bbk sync
OPTIONS
-b, --branch=branch [default: master] config-templates branch to use
-i, --init Will run some initial setup work such as bootstrapping a react app or installing eslint
peerDependencies
-o, --overwrite Skip the confirm-prompt before overwriting existing files. Useful for initial bootstrap of
new repos
--shouldSyncPublicFolder We only want to sync files under ./public when bootstrapping a new project via 'bbk init'
--shouldSyncSrcFolder We only want to sync files under ./src when bootstrapping a new project via 'bbk init'
--skipDeps Allows skipping the automatically triggered 'yarn install' for faster iteration and
debugging
--skipHealthcheck Allows skipping the healthcheck after syncing for faster iteration and debuggingDevelopment
Follow these steps to work locally on bbk-devtools
- Uninstall bbk-devtools so that it’s no longer globally installed -
yarn global remove @brickblock/bbk-devtools - Make changes to your local
bbk-devtoolsrepo - Run
yarn build - Run
yarn linkwhich will link the local bbk binary - Try out your changes by running the
bbkcommand that you modified
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago