You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In both cases, store the plaintext token in a secure secret store (GitHub Actions secrets, Terraform variables, Vault, etc.). The server will hash it before storing, and the CLI will only ever print the plaintext once.
138
-
156
+
For Terraform versions earlier than 1.4, you can use a `null_resource` instead of `terraform_data`.
139
157
158
+
In both cases, store the plaintext token in a secure secret store (GitHub Actions secrets, Terraform variables, Vault, etc.). The server will hash it before storing. When the CLI generates a token (without `--token`), it displays the plaintext only once; when using `--token` with a pre-generated value, ensure you've already stored it securely.
-`--description TEXT` / `-d TEXT`: **Required**. Description for the token (e.g., "API access for service X")
143
143
-`--expires-days INTEGER` / `-e INTEGER`: **Optional**. Number of days until token expires. If not specified, token never expires.
144
144
-`--format [text|json]`: **Optional**. Output format. `text` (default) is human-readable; `json` is machine-readable and recommended for CI or scripting.
145
-
-`--token TEXT`: **Optional**. Use a pre-generated token value instead of having the CLI generate one. The CLI will hash and store the token but only prints the plaintext once.
145
+
-`--token TEXT`: **Optional**. Use a pre-generated token value instead of having the CLI generate one. The CLI will hash and store the provided token; make sure you've stored the plaintext securely in your secrets manager or CI system.
146
146
147
147
**Examples:**
148
148
@@ -171,6 +171,25 @@ agent-memory token list [--format text|json]
171
171
```
172
172
173
173
When `--format json` is used, the command prints a JSON array of token summaries suitable for scripting and CI pipelines. The default `text` format produces human-readable output like the example below.
174
+
**JSON Output Example:**
175
+
```json
176
+
[
177
+
{
178
+
"hash": "abc12345def67890xyz",
179
+
"description": "API access token",
180
+
"created_at": "2025-07-10T18:30:00.000000+00:00",
181
+
"expires_at": "2025-08-09T18:30:00.000000+00:00",
182
+
"status": "Active"
183
+
},
184
+
{
185
+
"hash": "def09876uvw54321...",
186
+
"description": "Service account token",
187
+
"created_at": "2025-07-10T19:00:00.000000+00:00",
188
+
"expires_at": null,
189
+
"status": "Never Expires"
190
+
}
191
+
]
192
+
```
174
193
175
194
**Example Output:**
176
195
```
@@ -197,6 +216,16 @@ agent-memory token show TOKEN_HASH [--format text|json]
197
216
```
198
217
199
218
When `--format json` is used, the command prints a JSON object with token details (including status) suitable for scripting and CI pipelines. The default `text` format produces human-readable output.
0 commit comments