-
Notifications
You must be signed in to change notification settings - Fork 0
Context_Handling
This section entails:
-
- Retrieves api-key from pass db
- Requires project name and scope as input
- Writes the access token to
~/.ica-ica-lazy/tokens/tokens.json
-
- Provide a summary of the tokens (and when they're due to expire) in
$HOME/.ica-ica-lazy/tokens/tokens.json
- Provide a summary of the tokens (and when they're due to expire) in
-
- Change contexts by updating the
ICA_ACCESS_TOKENenv var to that of your project - Prerequisite to all of the
gds-*commands in Data Traversal - Prerequisite to all of the
gds-*commands in Downloading and Uploading directories - Does NOT require login
- Change contexts by updating the
Autocompletion: ✅
This command will update your token for a given project under ~/.ica-ica-lazy/tokens/tokens.json.
Pleas make sure you've read the Saving your api key section before trying.
To verify, you've successfully completed said section, please run pass /ica/api-keys/default-api-key. One would expect this to return your personal api key.
Options:
- --project-name: The name of your project
- --scope: Do you want to enter this context with 'admin' or 'read-only' privileges
Requirements:
- curl
- jq
- pass
Environment vars:
- ICA_BASE_URL

Autocompletion: N/A
Show existing tokens in tokens.json with scopes and expiry
Options:
- --help: Show help page

Autocompletion: ✅
Update the ICA_ACCESS_TOKEN env var in your current terminal with that of a stored token under
~/.ica-ica-lazy/tokens/tokens.json.
You MUST have first added the token to the secret file with ica-add-access-token script.
Options:
- --project-name: The name of your project
- --scope: Do you want to enter this context with 'admin' or 'read-only' privileges
Requirements
- curl
- jq

Extra Info
ica-context-switcher is a function, NOT a script. That's how it's able to update your environment variable.
Whilst we can export a function in bash, there is no such concept for ZSH. This has some repercussions.
Head to the Data Traversal page to start navigating the gds file system with gds-ls, gds-find
and gds-view