Send events to Argus observability platform
npm install @voidwire/argus-sendSend events to Argus observability platform from the command line.
Synchronous delivery - Blocks until Argus confirms event captured, ensuring durability.
Config-aware - Automatically reads API key from ~/.config/argus/config.toml, no manual config needed.
Pipes JSON - Accepts JSON data from other tools (gitignore-check, language-detect) via stdin.
``bashTool event with agent observability fields
argus-send --source momentum --type tool \
--hook PreToolUse \
--session-id "f10e9765-1999-456f-81c3-eb4c531ecee2" \
--tool-name Bash \
--tool-use-id "toolu_01ABC" \
--message "Bash: git status"
Installation
`bash
cd packages/argus-send
bun link
`Now
argus-send is available globally.Usage
`
argus-send --source --type [options]
`$3
-
--source - Source name (e.g., "llcli-tools", "momentum")
- --type - Event type: tool, session, agent, response, prompt, command, skill$3
-
--message - Human-readable message
- --hook - Hook name: PreToolUse, PostToolUse, Stop, SessionStart, SessionEnd, SubagentStart, SubagentStop, UserPromptSubmit
- --session-id - Claude Code session identifier
- --tool-name - Tool name (Bash, Read, Edit, Task, etc.)
- --tool-use-id - Correlates PreToolUse/PostToolUse pairs
- --status - Event outcome: success, failure, pending, activated
- --data - JSON data string
- --stdin - Read data object from stdin (JSON)
- --host - Argus host (default: http://127.0.0.1:8765)
- --api-key - Override API key from config
- -h, --help - Show help$3
-
ARGUS_API_KEY - Override config file API key
- ARGUS_HOST - Override default hostOutput Format
`json
{
"captured": true,
"event_id": 123
}
`Configuration
argus-send reads the API key from
~/.config/argus/config.toml automatically:`toml
[server]
api_keys = ["your-api-key-here"]
`No additional config needed. If the file doesn't exist, install Argus:
`bash
cd ~/development/projects/argus
uv run argus config init
`Integration with Other Tools
$3
`bash
Send compliance check results to Argus
gitignore-check . | argus-send --source llcli-tools --type gitignore-check --stdin
`$3
`bash
Track language detection events
language-detect . | argus-send --source llcli-tools --type language-detect --stdin
`$3
`typescript
// In momentum pre-tool-use hook
const result = Bun.spawnSync([
"argus-send",
"--source", "momentum",
"--type", "tool",
"--hook", "PreToolUse",
"--session-id", data.session_id,
"--tool-name", data.tool_name,
"--tool-use-id", data.tool_use_id,
"--message", ${data.tool_name}: ${summary}
]);
`Architecture
- Zero dependencies - Uses Bun's native
fetch
- TOML parsing - Regex-based extraction (no TOML library needed)
- Synchronous POST - Blocks until Argus stores event
- Stdin support - Reads piped JSON for composabilityWhy Synchronous?
Argus uses synchronous POST to guarantee event delivery before continuing. This prevents event loss on crashes and ensures observability gaps are filled.
The tool blocks until Argus returns
{"status": "captured", "event_id": 123}, confirming the event is durably stored in SQLite with WAL mode.Error Handling
Exit codes:
-
0 - Event captured successfully
- 1 - Argus server error (connection failed, rejected event)
- 2 - Client error (missing args, invalid JSON, config not found)Common errors:
`bash
API key not found
❌ API key not found in config
Solution: Run
uv run argus config init in argus projectConnection refused
❌ Failed: Connection failed: error sending request
Solution: Start Argus server with
uv run argus serveInvalid JSON
❌ Invalid JSON in --data
Solution: Check JSON syntax, ensure proper quotes
``See QUICKSTART.md for comprehensive examples.
- Argus - Observability platform this tool sends to
- gitignore-check - Compliance checker that can pipe to argus-send
- language-detect - Language detector that can pipe to argus-send