* feat: Add worker info command to display worker details
- Add workerInfoCommand() function that calls get_worker_info tool
- Display worker name, URL, creation/modification timestamps
- Format bindings output: databases, storage, analytics, env vars, secrets
- Add 'info' case to handleWorkerCommand() switch
- Update help text and error messages to include info command
ATXP-1430
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: trigger CI
* test: add tests for workerInfoCommand
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: correct process.exit mocking in workerInfoCommand tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: trigger CI
* chore: trigger CI build
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add unit tests for parseEnvArg(), parseEnvFile(), validateEnvVarName()
- Add tests for SENSITIVE_PATTERNS and getReservedEnvNames()
- Add tests for --env flag precedence over --env-file
- Add tests for sensitive pattern warnings
- Create secrets.test.ts with tests for parseKeyValue(), isValidSecretKey()
- Add tests for secretsSetCommand, secretsListCommand, secretsDeleteCommand
- Export helper functions for direct unit testing
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Suppress [atxp] OAuth debug logs by default. Enable them via:
- --verbose or -v flag
- DEBUG=atxp, DEBUG=1, or DEBUG=true environment variable
Changes:
- Add verbose.ts utility with isVerboseMode() and getCliLogger()
- Update atxpClient() to use LogLevel.WARN by default
- Add Global Options section to help output
- Add unit tests for verbose mode detection
Fixes: ATXP-1428
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat(paas): implement consistent --help at all PAAS command levels
- Stop global --help interception for paas commands in index.ts
- Create centralized help registry with data-driven definitions in help.ts
- Handle --help at category, command, and subcommand levels
- Add CI test coverage to ensure help documentation for all commands
Closes ATXP-1426
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(paas): fix test to handle multi-word related commands
Use replaceAll instead of replace to convert all spaces to dots
for nested commands like "dns record create" -> "dns.record.create"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Add FileOAuthDb class that persists OAuth tokens to disk at
~/.atxp/oauth-cache.json. This eliminates the need for a fresh
OAuth flow on every paas command.
- Create FileOAuthDb implementing OAuthDb interface
- Store tokens with 0o600 permissions (owner read/write only)
- Check token expiration on retrieval
- Add unit tests for token persistence and expiration
Fixes ATXP-1427
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat(paas): add analytics list and schema commands
Add two new CLI commands for analytics:
- `npx atxp paas analytics list` - List all available analytics datasets
- `npx atxp paas analytics schema <dataset>` - Show column names for a dataset
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: add integration tests for analytics list and schema commands
- Update analytics subcommands list to include 'list' and 'schema'
- Add test for parsing analytics schema dataset argument
- Add test for identifying analytics list command
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Add CLI commands for managing encrypted worker secrets:
- npx atxp paas secrets set <worker> KEY=VALUE
- npx atxp paas secrets list <worker>
- npx atxp paas secrets delete <worker> <key>
Secrets are encrypted at rest and update immediately without redeployment.
Secret keys must be UPPER_SNAKE_CASE (e.g., API_KEY, DATABASE_URL).
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat(paas): allow configurable Analytics Engine binding name
- Update --enable-analytics to accept optional binding name
- Default to 'ANALYTICS' when no name is specified
- Dynamically update reserved env var names based on binding name
- Update help text to document new [NAME] syntax
Closes ATXP-1423
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test: add tests for custom analytics binding name
- Test custom binding name passed to enable_analytics
- Test reserved env var validation with default ANALYTICS binding
- Test reserved env var validation with custom binding name
- Test that ANALYTICS env var is allowed when using different custom binding
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Emilio Amaya <emilioamaya99@gmail.com>
Add support for setting environment variables when deploying workers:
- --env KEY=VALUE flag (repeatable) for individual env vars
- --env-file <path> flag to load from a .env file
- --env takes precedence over --env-file for duplicate keys
- Validation for reserved names (DB, BUCKET, ANALYTICS, USER_NAMESPACE)
- Warning for sensitive-looking variables (SECRET, PASSWORD, KEY, etc.)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Add notes explaining:
- Use "analytics_data" as table name (auto-replaced)
- Time filtering is applied automatically unless query has "timestamp"
Related to ATXP-1424
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Remove detailed tool enumeration to avoid sync issues with atxp-paas skill.
Use generic terminology instead of Cloudflare-specific references.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: include atxp-paas tools in atxp skill
- Add PaaS section to SKILL.md with Workers, D1, and R2 tool documentation
- Add paas.mcp.atxp.ai to MCP Servers table
- Update description to include cloud deployment capabilities
- Bump version to 1.3.0 (minor release for new feature)
Fixes ATXP-1418
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: update package-lock.json after version bump
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add config.ts with centralized config handling:
- getConnection() checks env var first, falls back to ~/.atxp/config
- saveConnection() writes connection string to config file
- getShellProfile() detects user's shell profile path
- updateShellProfile() adds source line to shell profile
- Update call-tool.ts to use getConnection() so CLI works even
without ATXP_CONNECTION env var set (reads from config file)
- Update login.ts to auto-update shell profile after saving config,
eliminating the need for users to manually edit their shell profile
This improves the login UX - users no longer need to manually update
their ~/.zshrc or ~/.bashrc after running `npx atxp login`.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
When using `npx atxp login --token <token>`, the raw token was saved
directly to the config file. However, the @atxp/client library expects
a full URL format with the connection_token parameter.
This caused "Invalid URL" errors when trying to use any ATXP tools
after headless login.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add --qr flag for explicit QR code login
- Detect headless environments (SSH, Docker, CI, no DISPLAY) and auto-fallback to QR
- Try browser first, fall back to QR if browser fails to open
- Add qrcode-terminal dependency for terminal QR rendering
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Add --token (-t) option to the login command to support headless
authentication in CI/CD and automated testing environments.
Usage: npx atxp login --token $ATXP_CONNECTION_TOKEN
This allows users to provide a connection token directly without
needing browser-based OAuth flow.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Replace manual connection string entry with OAuth-style browser login:
- CLI starts localhost server on random port
- Opens browser to accounts.atxp.ai with cli_redirect param
- Receives connection string via localhost callback
- Saves to ~/.atxp/config
Same pattern as Claude Code uses for authentication.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Implements skill following Anthropic's Agent Skills standard for teaching
AI assistants how to use ATXP tools (search, image, music, video, x).
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add login command documentation
- Add tool commands (search, image, music, video, x)
- Update demo/create to use dev subcommand
- Reorganize structure to match new CLI
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add login and tool commands (search, image, music, video, x)
- Add `login` command to save ATXP connection string to ~/.atxp/config
- Add tool commands that wrap @atxp/client:
- `search <query>` - web search via search.mcp.atxp.ai
- `image <prompt>` - image generation via image.mcp.atxp.ai
- `music <prompt>` - music generation via music.mcp.atxp.ai
- `video <prompt>` - video generation via video.mcp.atxp.ai
- `x <query>` - X/Twitter search via x-live-search.mcp.atxp.ai
- Move demo and create commands under `dev` subcommand
- Maintain backwards compatibility for `npx atxp demo` and `npx atxp create`
- Update help text with new command structure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add and update tests for new tool commands
- Update index.test.ts with tests for dev subcommand and tool argument parsing
- Add login.test.ts for config file format and login options
- Add call-tool.test.ts for server mapping and result parsing
- Add commands/commands.test.ts for all tool commands (search, image, music, video, x)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix lint errors
- Wrap case block in braces to fix no-case-declarations error in index.ts
- Remove unused fs import from login.test.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* ATXP-407: Integrate Cloudflare Workers template into atxp create command
Added support for creating projects with the Cloudflare Workers AI agent template alongside the existing Express template. Users can now choose between frameworks using the --framework flag.
Changes:
- Added 'cloudflare' as a new framework option
- Updated Framework type to include 'cloudflare'
- Added Cloudflare template configuration pointing to atxp-cloudflare-agent-example
- Updated README with cloudflare framework examples
- Added framework-specific installation instructions (npm install vs npm run install-all)
- Updated tests to validate both express and cloudflare frameworks