Tree
To list the contents of a directory in a tree-like format, you can use the tree
command:
secrethub tree [options] <namespace>/<repo>[/<dir>]
The tree
command works somewhat similar to the UNIX tree
command.
To distinguish between directories and secrets, directories are shown ending in a forward slash /
.
An example of the tree-like format is shown below, showing directories and secrets:
$ secrethub tree marc/myrepo
myrepo/
├── production/
│ └── api-servers/
│ ├── db_password
│ ├── db_username
│ ├── server.crt
│ └── server.key
└── testing/
└── api-servers/
├── db_password
├── db_username
├── server.crt
└── server.key
4 directories, 8 secrets
One thing to note is that secrets and directories will be colored recursively according to their status.
This works the same as with the ls
command, showing flagged secrets and directories in red.
Arguments
-
<namespace>/<repo>[/<dir>]
(string) - The path to the directory to show contents for.
Flags
-
-f, --full-paths
(boolean) new in v0.41.0 - Print the full path of each directory and secret.
-
-i, --no-indentation
(boolean) new in v0.41.0 - Don’t print identation lines.
-
--no-report
(boolean) new in v0.41.0 - Turn off secret/directory count at the end of tree listing.