Rename the `rails/` directory to `tools/` for agent discoverability — agents frequently failed to locate helper scripts due to the non-intuitive directory name. Add backward-compat symlink `rails/ → tools/`. New tool suites: - Authentik: auth-token, user-list, user-create, group-list, app-list, flow-list, admin-status (8 scripts) - Coolify: team-list, project-list, service-list, service-status, deploy, env-set (7 scripts) - Woodpecker: pipeline-list, pipeline-status, pipeline-trigger (3 stubs) - GLPI: session-init, computer-list, ticket-list, ticket-create, user-list (6 scripts) - Health: stack-health.sh — stack-wide connectivity check Infrastructure: - Shared credential loader at tools/_lib/credentials.sh - install.sh creates symlink + chmod on tool scripts - All ~253 rails/ path references updated across 68+ files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
56 lines
1.5 KiB
Markdown
56 lines
1.5 KiB
Markdown
# GLPI Tool Suite
|
|
|
|
Manage GLPI IT service management (tickets, computers/assets, users).
|
|
|
|
## Prerequisites
|
|
|
|
- `jq` and `curl` installed
|
|
- GLPI credentials in `~/src/jarvis-brain/credentials.json` (or `$MOSAIC_CREDENTIALS_FILE`)
|
|
- Required fields: `glpi.url`, `glpi.app_token`, `glpi.user_token`
|
|
|
|
## Authentication
|
|
|
|
GLPI uses a two-step auth flow:
|
|
1. `session-init.sh` exchanges app_token + user_token for a session_token
|
|
2. All subsequent calls use the session_token + app_token
|
|
|
|
The session token is cached at `~/.cache/mosaic/glpi-session` and auto-refreshed when expired.
|
|
|
|
## Scripts
|
|
|
|
| Script | Purpose |
|
|
|--------|---------|
|
|
| `session-init.sh` | Initialize and cache API session |
|
|
| `computer-list.sh` | List computers/IT assets |
|
|
| `ticket-list.sh` | List tickets (filter by status) |
|
|
| `ticket-create.sh` | Create a new ticket |
|
|
| `user-list.sh` | List users |
|
|
|
|
## Common Options
|
|
|
|
- `-f json` — JSON output (default: table)
|
|
- `-l limit` — Result count (default: 50)
|
|
- `-h` — Show help
|
|
|
|
## API Reference
|
|
|
|
- Base URL: `https://help.uscllc.com/apirest.php`
|
|
- Auth headers: `App-Token` + `Session-Token`
|
|
- Pattern: RESTful item-based (`/ItemType/{id}`)
|
|
|
|
## Examples
|
|
|
|
```bash
|
|
# List all tickets
|
|
~/.config/mosaic/tools/glpi/ticket-list.sh
|
|
|
|
# List only open tickets
|
|
~/.config/mosaic/tools/glpi/ticket-list.sh -s new
|
|
|
|
# Create a ticket
|
|
~/.config/mosaic/tools/glpi/ticket-create.sh -t "Server down" -c "Web server unresponsive" -p 4
|
|
|
|
# List computers as JSON
|
|
~/.config/mosaic/tools/glpi/computer-list.sh -f json
|
|
```
|