Skip to content

feat: add --token/t CLI option for static auth token - #356

Open
giawa wants to merge 2 commits into
pixel-agents-hq:mainfrom
giawa:feat/custom-auth
Open

feat: add --token/t CLI option for static auth token#356
giawa wants to merge 2 commits into
pixel-agents-hq:mainfrom
giawa:feat/custom-auth

Conversation

@giawa

@giawa giawa commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Description

Add a new --token/-t CLI option that allows specifying a static auth token instead of generating a random UUID on each server start.

This is useful for:

  • Persistent API clients that need to survive server restarts
  • Development/testing with known credentials
  • Integration with external tools that store the token

Usage:
pixel-agents --port 3100 --token my-secret-token
pixel-agents -p 3100 -t my-secret-token

The token must be at least 8 characters. If omitted, a random UUID is generated as before (default behavior unchanged).

Type of change

  • Bug fix
  • New feature
  • Refactor / code cleanup
  • Documentation
  • CI / build
  • Other: ...

Test plan

Tested by building the app and running with --token my-secret-token, verified the token worked as expected. I then provided no custom token and the app generated a UUID and stored it in ~/pixel-agents/server.json just like before.

Unit tests have been added to verify normal usage, too-short validation, missing value and that the server actually uses the custom auth token.

giawa added 2 commits July 26, 2026 11:24
Add a new --token/-t CLI option that allows specifying a static auth
token instead of generating a random UUID on each server start.

This is useful for:
  - Persistent API clients that need to survive server restarts
  - Development/testing with known credentials
  - Integration with external tools that store the token

Usage:
  pixel-agents --port 3100 --token my-secret-token
  pixel-agents -p 3100 -t my-secret-token

The token must be at least 8 characters. If omitted, a random UUID
is generated as before (default behavior unchanged).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant