Getting Started¶
Installation¶
Install with one line — it detects your OS and CPU, downloads the standalone
binary, and puts it on your PATH:
1 | |
The binary you get defaults to the environment of the host you installed from
(cli → production, staging.cli → staging, testing.cli → testing). Override
any time with mysecutec -e <env> or mysecutec config set environment <env>.
Prefer a direct download? Grab the binary for your platform from
cli.my.secutec.com, make it executable, and move
it onto your PATH.
Check what you have, and keep it current:
1 2 | |
Use it with your AI agent¶
The CLI is designed to be driven by an AI coding agent (Claude Code, OpenAI Codex, Cursor, …) so you can ask about your security posture in plain language instead of memorizing commands.
1. Authenticate once:
1 | |
2. Drop the agent guide into your project. It teaches the agent how to use
the CLI safely (conventions, the full command catalog, confirmation rules).
Agents auto-discover an AGENTS.md in the working directory:
1 | |
3. Just ask. From that folder, talk to your agent in natural language — it
translates your intent into mysecutec commands, reads the JSON, and answers:
1 2 3 4 5 6 7 8 | |
Cursor, Windsurf, and other AGENTS.md-aware tools work the same way — open the folder and ask. See the AI Agents guide for the full playbook, example prompts, and the safety rules the agent follows.
Authentication¶
MySecutec CLI uses OAuth2 PKCE (Proof Key for Code Exchange) via Keycloak.
Login¶
1 | |
This opens a browser for authentication. A local callback server listens on port 9876 at http://localhost:9876/callback.
OAuth Configuration:
| Parameter | Value |
|---|---|
| Client ID | my-secutec-mobile-app-pkce |
| Scope | openid profile email offline_access |
| Code Challenge Method | S256 |
| Realm | secutec |
| Callback Port | 9876 (configurable) |
Auth URLs per environment:
1 2 3 | |
Logout¶
1 | |
Clears stored tokens.
Status¶
1 | |
Shows current authentication and token status.
Token Storage¶
Tokens are stored at ~/.mysecutec/tokens-{environment}.json with 0600 permissions.
Configuration¶
Configuration is stored at ~/.mysecutec/config.yaml.
List configuration¶
1 | |
Displays: environment, output_format, default_limit, no_color, callback_port.
Get a config value¶
1 2 3 | |
Set a config value¶
1 2 3 | |
Switch environment¶
1 2 3 | |
| Config Key | Default | Description |
|---|---|---|
environment |
production |
API environment |
output_format |
text |
Output format (text or json) |
default_limit |
20 |
Default pagination limit |
no_color |
false |
Disable colored output |
callback_port |
9876 |
OAuth callback port |
Impersonation¶
Partners can impersonate customer organizations.
Interactive mode¶
1 | |
Opens an interactive picker using the organization autocomplete API.
API: GET /org/v1/organizations/autocomplete?search=<query>
Response:
1 2 3 4 5 6 7 | |
Direct mode¶
1 | |
API: POST /iam/v1/impersonations/{org_id}
Response:
1 2 3 4 5 6 7 8 | |
Clear impersonation¶
1 | |
API: DELETE /iam/v1/impersonations
Shell Completion¶
1 2 3 4 | |
HTTP Client¶
All API calls use a centralized HTTP client with:
- Authorization:
Bearer {AccessToken}header - Content-Type:
application/json - Accept:
application/json - Auto-refresh: Automatically refreshes expired tokens on
401 Unauthorized - Verbose mode: Use
--verboseto see full HTTP request/response details