-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding j1 CLI documentation. #727
Conversation
@@ -1526,3 +1526,63 @@ immediately reflect that in the graph. | |||
We hope to provide a good interface via this SDK for providing an interface for | |||
handling events via this SDK and providing commands/utilities for testing events | |||
to get an understanding of how they may affect the JupiterOne graph. | |||
|
|||
## j1 CLI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to start on line 1490 with the other j1 cli info. Up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I went back and forth with putting it higher up starting at line 1490. My main reason for leaving it at the bottom is it felt like it was interrupting the j1-integration
documentation too much when placed up there.
I'll leave it where it is for now, but we can move it if we start to see its location confusing people.
|
||
### Authentication | ||
|
||
For commands that require interaction with JupiterOne's API, the CLI will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For commands that require interaction with JupiterOne's API, the CLI
provides two options for providing credentials:
- All commands that interact with an API will accept an
--api-key
option. - For added convenience when developing locally, we will also look for a
JUPITERONE_API_KEY
environment variable to be used as the API key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually copied this from the Authentication of j1-integration
since they work the exact same way, but I agree that your wording is better.
--include-entities Include entities in export (default: true) | ||
--include-relationships Include relationships in export (default: true) | ||
--include-deleted Include deleted entities/relationships in export (default: true) | ||
--no-include-entities Exclude entities in export |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to change --no-include-entities to --exclude-entities one day
``` | ||
Usage: j1 import [options] | ||
|
||
Imports exported account entities/relationships into JupiterOne account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any gotchas that we should make the user aware of? For example, what if a _key already exists?
|
||
Options: | ||
-d --data-dir <relative_directory> The directory where entities and relationships can be found (default: ".j1/export") | ||
--scope <scope> A unique id that identifies the synchronization job that will be importing your assets, use any id of your choosing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the default for scope?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No default. It will error if one isn't provided.
|
||
Currently, the CLI supports a limited interface consisting of only two commands: | ||
`export` and `import`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to include the required options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required is a bit odd for these, since so many of them either have a default or will use .env values if provided that way.
I think the only option truly flagged as a required one is the scope for the import command. I can get that added in a later PR
Adding documentation for
j1
CLI.Fix for issue #678