- 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
- Add interactive environment variable configuration during project creation
- Parse comments from env.example to use as variable descriptions
- Detect placeholder values (empty, your_, TODO, etc.) that need configuration
- Prompt users to configure each placeholder variable with helpful descriptions
- Allow users to skip configuration or set variables to empty strings
- Only show env reminders when .env file actually exists
Core Features
Updated template repository from atxp-express-example to atxp-express-starter
Added Framework type for type safety and extensibility
Changed createProject to require app name as first parameter (eliminates interactive prompt)
Added command line argument support for framework selection (--framework)
Added smart git initialization with --git and --no-git flags
Fixed help flag handling to show help instead of running commands
Wrapper Package Updates
Updated create-atxp wrapper to support new API
Fixed argument passing from npm create atxp to underlying atxp create command
* Fix git divergent branches error in demo update
Replace git pull with fetch + reset --hard to avoid divergent branch conflicts.
This ensures the demo repository always matches the remote exactly, discarding
any local changes that might have been made during demo usage.
* Refactor demo to use single port instead of frontend/backend ports
- Replace frontendPort and backendPort with single port parameter
- Update CLI args to use --port/-p instead of --frontend-port/--backend-port
- Default port changed to 8017 (previously backend port)
- Simplify .env file creation to single root .env instead of separate files
- Update environment variables and browser opening to use single port
- Aligns with new architecture of unified server handling both frontend and backend
* Remove .env file creation logic from demo
The demo server no longer needs .env files as it will use environment
variables passed directly through the spawn process. This simplifies
the demo setup and aligns with the unified server architecture.
* Add separate frontend and backend port configuration for demo command
Implement ATXP-243: Allow users to specify separate frontend and backend ports
when running the demo, replacing the single --port option with more granular control.
## Changes Made
### Command Line Interface
- Replace `--port, -p` with `--frontend-port, --fp` and `--backend-port, --bp`
- Update default ports: frontend 3000, backend 3001 (matching atxp-express-example defaults)
- Maintain backward compatibility by using sensible defaults
### Updated Documentation
- Comprehensive help text with new port options and examples
- Clear usage examples showing frontend/backend port combinations
- Updated default port information throughout
## Implementation Details
The demo command now:
1. Parses separate frontend/backend port arguments
2. Creates appropriate .env files in the cloned repository
3. Passes environment variables to the demo process
4. Uses frontend port for browser opening and user messaging
This integrates seamlessly with the atxp-express-example repository's existing
port configuration system implemented in PR #6.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update default ports to maintain backward compatibility
- Frontend port: 8016 (original default, maintains backward compatibility)
- Backend port: 8017 (one number higher as requested)
- Updated help documentation with new default port values
- Verified .env file generation works correctly with new defaults
This preserves existing user expectations while providing the requested
port separation functionality.
* Fix backend port configuration issue
Remove global PORT environment variable that was overriding backend .env file.
Now each service (frontend/backend) reads its PORT from its own .env file,
allowing them to run on separate ports correctly.
Fixes issue where backend was running on frontend port instead of backend port,
causing ECONNREFUSED errors in the proxy connection.
Verified fix: Backend=8017, Frontend=8016, proxy connections working.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Show full help information when user enters an unrecognized command instead
of just displaying a brief error message. This provides better UX by letting
users immediately see available commands without needing to run help separately.
- Use shallow clone (--depth 1) to download only the latest commit
- Add --single-branch flag to avoid downloading other branches
- Explicitly target main branch with --branch main
- Optimize git pull to maintain shallow history during updates
- Add comprehensive tests documenting git optimization parameters
This reduces data transfer and improves clone performance for both demo and create commands.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
- Add dependency checking utility for git and npm
- Check dependencies before running demo and create commands
- Show friendly error messages with installation instructions
- Add tests for dependency checking functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
- Move argument parsing from run-demo.ts to index.ts for better separation of concerns
- Add --port/-p option to specify custom demo port (default: 8016)
- Add --dir/-d option to specify custom demo directory (default: ~/.cache/atxp/demo)
- Refactor runDemo() to accept DemoOptions parameter for type safety
- Update all helper functions to use passed parameters instead of global state
- Add comprehensive documentation in help text and README files
- Support path resolution for relative directory paths
New usage examples:
- npx atxp demo --port 3000
- npx atxp demo --dir ./my-demo
- npx atxp demo --port 9000 --dir ~/projects/demo --verbose
Resolves port conflicts and allows flexible demo installation locations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>