misc: add plain support for user get token in CLI

This commit is contained in:
Sheen Capadngan
2025-07-02 04:45:53 +08:00
parent cce2a54265
commit 38c9242e5b
2 changed files with 46 additions and 13 deletions

View File

@@ -35,19 +35,40 @@ infisical user update domain
<Accordion title="infisical user get token">
Use this command to get your current Infisical access token and session information. This command requires you to be logged in.
The command will display:
The command will display:
- Your session ID
- Your full JWT access token
- Your session ID
- Your full JWT access token
```bash
infisical user get token
```
```bash
infisical user get token
```
Example output:
Example output:
```bash
Session ID: abc123-xyz-456
Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
```
### Flags
<Accordion title="--plain">
Output only the JWT token without formatting (no session ID)
Default value: `false`
```bash
# Example
infisical user get token --plain
```
Example output:
```bash
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
```
</Accordion>
```bash
Session ID: abc123-xyz-456
Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
```
</Accordion>