@keystone.sh/cli
v1.0.2
Published
Decentralized workspaces for developers to store, share and use secrets securely.
Downloads
85
Maintainers
Readme
Keystone CLI
Open-source decentralized system for developers to store, share and use secrets safely
Usage
$ npm install -g @keystone.sh/cli
$ ks COMMAND
running command...
$ ks (-v|--version|version)
@keystone.sh/cli/0.0.36 linux-x64 node-v10.19.0
$ ks --help [COMMAND]
USAGE
$ ks COMMAND
...
Commands
ks add BLOCKSTACKID EMAIL
ks autocomplete [SHELL]
ks cat PATH
ks delete [FILEPATHS]
ks diff FILEPATH
ks env [ACTION] [ENV]
ks help [COMMAND]
ks init [PROJECT_NAME]
ks invite [EMAILS]
ks list TYPE
ks login [BLOCKSTACK_ID]
ks logout
ks project ACTION
ks pull
ks push [FILEPATH]
ks remove
ks share ENV
ks status
ks whoami
ks add BLOCKSTACKID EMAIL
Add a member to a project.
USAGE
$ ks add BLOCKSTACKID EMAIL
ARGUMENTS
BLOCKSTACKID Blockstack_id to add
EMAIL email associated to an invitation
DESCRIPTION
Adding a member give them access to the project.
The member should have accepted your invitation for this to work
You can add the member to an environment with : $ ks env config
EXAMPLE
$ ks add example.id.blockstack [email protected] #add a user to a project
See code: src/commands/add.js
ks autocomplete [SHELL]
display autocomplete installation instructions
USAGE
$ ks autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ ks autocomplete
$ ks autocomplete bash
$ ks autocomplete zsh
$ ks autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
ks cat PATH
Output a remote file.
USAGE
$ ks cat PATH
ARGUMENTS
PATH path to your file
EXAMPLE
$ ks cat path/to/file
See code: src/commands/cat.js
ks delete [FILEPATHS]
Deletes one or more files.
USAGE
$ ks delete [FILEPATHS]
ARGUMENTS
FILEPATHS Path to your file. Accepts a glob pattern
OPTIONS
-p, --project=project Use this flag to completely delete all files of a project from your storage.
DESCRIPTION
If you're an administrator or a contributor, the files will be removed for everyone.
If you're a reader on the environment, you can't delete any files.
EXAMPLES
$ ks delete path/to/file
$ ks delete -p project_name/2b6a10c6-ea91-48b1-b340-a7504326961e
See code: src/commands/delete.js
ks diff FILEPATH
Output a diff of the changes you made to a file
USAGE
$ ks diff FILEPATH
ARGUMENTS
FILEPATH Path to your file.
EXAMPLE
$ ks diff path/to/file
See code: src/commands/diff.js
ks env [ACTION] [ENV]
Manage environments.
USAGE
$ ks env [ACTION] [ENV]
ARGUMENTS
ACTION
- config
Change users role for each environment.
- new
Create a new environment
- remove
Remove an environment
ENV
Set working env
DESCRIPTION
You need to be administrator in the project in order to access the command.
You can change the role set by using the role flag. You have 3 choices:
- reader: can only read files from the the environment and pull them locally
- contributor: can read, write and add new files to the environement
- admin: all the above plus ask people to join the project
EXAMPLES
$ ks env config
$ ks env new ENV_NAME
$ ks env remove ENV_NAME
See code: src/commands/env.js
ks help [COMMAND]
display help for ks
USAGE
$ ks help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
ks init [PROJECT_NAME]
Create Keystone config file
USAGE
$ ks init [PROJECT_NAME]
ARGUMENTS
PROJECT_NAME Your project name
EXAMPLE
$ ks init project_name
See code: src/commands/init.js
ks invite [EMAILS]
Invites one or more people by email to a project.
USAGE
$ ks invite [EMAILS]
ARGUMENTS
EMAILS Emails for invitations to be sent
OPTIONS
-r, --role=reader|contributor|admin [default: reader] Assigns a role
--check Check your pending invitations
--removal Deletes an invitation
DESCRIPTION
By default, people you invite are readers.
You can change the role set by using the role flag. You have 3 choices:
- reader: cannot do anything project wide. Need to be added to an environment to pull files
- contributor: can add and remove environments from the project
- admin: all the above plus invite and add users to the project
EXAMPLES
$ ks invite [email protected] #Send an invitation to [email protected] as a reader on the project
$ ks invite [email protected] [email protected] --role=admin #Invite as admin on the project
$ ks invite [email protected] [email protected] --removal #Removes the invitations for friend and friend2
See code: src/commands/invite.js
ks list TYPE
Lists projects, environments, members and files
USAGE
$ ks list TYPE
ARGUMENTS
TYPE What do you want to list (projects, environments, members or files)
OPTIONS
-a, --all For files listing, list every files in your gaia hub. For members, list files from project, instead of the
environment.
EXAMPLES
$ ks list members
$ ks list members --all
$ ks list projects
$ ks list environments
$ ks list files
See code: src/commands/list.js
ks login [BLOCKSTACK_ID]
Logs into your account with Blockstack or creates a new one
USAGE
$ ks login [BLOCKSTACK_ID]
ARGUMENTS
BLOCKSTACK_ID Your blockstack id
EXAMPLE
$ ks login nickname.id.blockstack
See code: src/commands/login.js
ks logout
Logs you out of your account and erase your session from this computer.
USAGE
$ ks logout
EXAMPLE
$ ks logout
See code: src/commands/logout.js
ks project ACTION
Manage users role in the project.
USAGE
$ ks project ACTION
ARGUMENTS
ACTION Configure project members
DESCRIPTION
You can change the role set by using the role flag. You have 3 choices:
- reader: can't do anything regarding the project itself.
- contributor: can add or remove environments.
- administrator: can add or remove environments, add and remove users, change users roles.
EXAMPLE
$ ks project config
See code: src/commands/project.js
ks pull
Fetch files for current environment. Write them locally.
USAGE
$ ks pull
OPTIONS
-f, --force Overwrite any changes made locally
DESCRIPTION
Once pulled files can be one of the three states :
- updated : The file has been updated because someone else pushed a newer version
- auto-merged : The file was modified and has been merged with someone else's changes
- conflicted : The file has been modified and some lines are in conflict with someone else's changes. You should
fix the conflicts and push your changes
EXAMPLE
$ ks pull
See code: src/commands/pull.js
ks push [FILEPATH]
Push a file to a project.
USAGE
$ ks push [FILEPATH]
ARGUMENTS
FILEPATH Path to your file. Accepts a glob pattern
EXAMPLES
$ ks push path/to/my/file
$ ks push
See code: src/commands/push.js
ks remove
Remove one or more users.
USAGE
$ ks remove
OPTIONS
-u, --users=users List of user you want to remove. Separated by space.
DESCRIPTION
...
If you are an administrator, you can remove a user from a project.
EXAMPLE
$ ks remove nickname1.id.blockstack nickname2.id.blockstack
See code: src/commands/remove.js
ks share ENV
Share your files with a non-blockstack user
USAGE
$ ks share ENV
ARGUMENTS
ENV Environment you want the user to be created on.
DESCRIPTION
Generate a token.
The token should be set in the system environment of any user.
This user will be able to run only $ ks pull in order to pull locally files from the selected env.
EXAMPLE
$ ks share ENV_NAME
See code: src/commands/share.js
ks status
Shows the status of tracked files
USAGE
$ ks status
EXAMPLE
$ ks status
See code: src/commands/status.js
ks whoami
Shows the blockstack id of the currently logged in user
USAGE
$ ks whoami
EXAMPLE
$ ks whoami
See code: src/commands/whoami.js