trifid/docs/tfcli/qrh.md

89 lines
2.1 KiB
Markdown

# `tfcli` Quick Reference Handbook
## Configuring the Server URL
`tfcli` needs a server URL to be able to contact the API server. This can be configured in three ways, from most optimal to least optimal:
1. The file in `$CONFIG/tfcli-server-url.conf` can have it's contents set to the base URL of the server you would like to use
2. You can set the environment variable `TFCLI_SERVER` to the base URL
3. You can provide the `-s/--server` argument immediately after `tfcli`, before your management command. For example: `tfcli --server https://your-server.your-domain.com network list`
## Account Management
These commands provide a means of managing your account and credentials on the `trifid-api` server.
### Create Account
Create a new account on the designated server.
**Usage:** `tfcli account create --email <EMAIL>`
### Log Into Existing Account
Log into an existing account on the designated server.
**Usage:** `tfcli account login --email <EMAIL>`
### Authenticate with Magic Link Token
Log into your account with a magic-link token acquired via email or the trifid-api logs
**Usage:** `tfcli account magic-link --magic-link-token <MAGIC_LINK_TOKEN>`
### Setup TOTP
Create a new TOTP authenticator on this account to enable authorizing with 2fa and performing all management tasks
**Usage:** `tfcli account mfa-setup`
### Finish setting up TOTP
Finish creating a new TOTP authenticator by inputting the code shown on your authenticator app
**Usage:** `tfcli account mfa-setup-finish --code <CODE> --token <TOKEN>`
### Authenticate with TOTP
Create a new short-lived authentication token by inputting the code shown on your authenticator app
**Usage:** `tfcli account mfa --code <CODE>`
Re-run this command if you get an "Unauthorized" error.
## Network Management
### List Networks
### Lookup Network
## Organization Management
### Create organization
## Role Management
### Create role
### List roles
### Lookup role
### Delete role
### Update role
## Host Management
### Create host
### List hosts
### Lookup hosts
### Delete host
### Update host
### Block host
### Enroll/re-enroll host