@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:get
bbk db:proxy [OPERATION]
bbk doctor
bbk help [COMMAND]
bbk init PACKAGE
bbk install
bbk logs PROJECT
bbk repl
bbk secrets:check CONFIGPATH
bbk secrets:decrypt [CONTEXT]
bbk secrets:encrypt [CONTEXT]
bbk secrets:set CONTEXT
bbk 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-cache
See 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 context
bbk 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:get
bbk 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 on
bbk doctor
check if dependencies are installed
check if dependencies are installed
USAGE
$ bbk doctor
bbk 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 CLI
See 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
debugging
bbk install
install dependencies
install dependencies
USAGE
$ bbk install
bbk 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 interval
bbk repl
run in interactive mode
run in interactive mode
USAGE
$ bbk repl
bbk 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 check
bbk secrets:decrypt [CONTEXT]
decrypt a config file
decrypt a config file
USAGE
$ bbk secrets:decrypt [CONTEXT]
EXAMPLE
bbk secrets:decrypt development
bbk secrets:encrypt [CONTEXT]
encrypt a config file
encrypt a config file
USAGE
$ bbk secrets:encrypt [CONTEXT]
EXAMPLE
bbk secrets:encrypt development
bbk 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 debugging
Development
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-devtools
repo - Run
yarn build
- Run
yarn link
which will link the local bbk binary - Try out your changes by running the
bbk
command that you modified
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 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
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
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
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
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
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
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
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago