Locksmith CLI
A developer first CLI for incorporating auth infrastructure to your AI applications
What is Locksmith?
Section titled “What is Locksmith?”Locksmith is a powerful CLI tool that helps developers quickly integrate enterprise-grade authentication into their AI applications. It supports modern auth providers, generates secure configurations, and integrates with popular LLM tools for seamless development.
Blazing Fast
Section titled “Blazing Fast”# should have node latest table# should have either of claude or cursor-agent or gemininpx locksmith generate
🚀 Installation
Section titled “🚀 Installation”Prerequisites
Section titled “Prerequisites”- Node.js 16+ and npm/pnpm
- Access to authentication provider (ScaleKit recommended)
Install Globally
Section titled “Install Globally”npm install -g locksmith-cli# orpnpm add -g locksmith-cli
Verify Installation
Section titled “Verify Installation”locksmith --versionlocksmith --help
⚡ Quick Start
Section titled “⚡ Quick Start”-
Initialize your project:
Terminal window locksmith init -
Configure LLM broker:
Terminal window locksmith configure llm -
Add authentication modules:
Terminal window locksmith add -
Generate configurations:
Terminal window locksmith generate
📖 Commands
Section titled “📖 Commands”locksmith init
Section titled “locksmith init”Initialize authentication in your project with an interactive setup wizard.
# Interactive setup (recommended)locksmith init
# Non-interactive setup (ScaleKit only)locksmith init --provider=scalekit --environment-id=your-env-id --client-id=your-client-id --client-secret=your-secret --environment-url=https://your-env.scalekit.cloud
Flags:
--provider, -p
- Authentication provider (scalekit, auth0, fusionauth)--environment-id, -e
- ScaleKit environment ID--client-id, -c
- ScaleKit client ID--client-secret, -s
- ScaleKit client secret--environment-url, -u
- ScaleKit environment URL--interactive, -i
- Force interactive mode--no-interactive, -I
- Skip interactive prompts
locksmith configure
Section titled “locksmith configure”Configure authentication settings, LLM brokers, and preferences.
# Configure LLM brokerlocksmith configure llm --broker=claude
# Configure authentication providerlocksmith configure auth --provider=scalekit
# Interactive configurationlocksmith configure
Subcommands:
llm
- Configure preferred LLM broker (claude, gemini, cursor-agent)auth
- Configure authentication provider settings
Flags:
--broker, -b
- LLM broker (claude, gemini, cursor-agent)--provider, -p
- Authentication provider--interactive, -i
- Force interactive mode
locksmith add
Section titled “locksmith add”Add authentication providers and modules to your project.
# Interactive module selectionlocksmith add
# Add specific modulelocksmith add --module=full-stack-auth
# Add multiple moduleslocksmith add --module=full-stack-auth --module=sso
Available Modules:
full-stack-auth
- Complete authentication systemsso
- Enterprise SSO integrationmcp
- Model Context Protocol authentication
Flags:
--module
- Authentication module to add--interactive, -i
- Force interactive mode
locksmith generate
Section titled “locksmith generate”Generate secure authentication configurations and integrate with LLM tools.
# Generate with all configured moduleslocksmith generate
# Generate specific modulelocksmith generate --module=full-stack-auth
# Generate with custom outputlocksmith generate --format=yaml --output=./config/auth.yaml
# Save prompt for reviewlocksmith generate --prompt-out=./prompt.txt
Flags:
--module
- Specific module to generate--format, -F
- Output format (json, yaml, env)--output, -o
- Output file path--count, -n
- Number of configurations to generate--prompt-out
- Save generation prompt to file--verbose, -v
- Show detailed output--dry-run, -d
- Show what would be done
Global Flags
Section titled “Global Flags”--help, -h
- Show help message--version, -v
- Show version number--verbose, -v
- Enable verbose output--dry-run, -d
- Show what would be done without making changes--force, -f
- Skip confirmation prompts--interactive, -i
- Force interactive mode--no-interactive, -I
- Skip interactive prompts
🔐 Authentication Providers
Section titled “🔐 Authentication Providers”ScaleKit (Recommended)
Section titled “ScaleKit (Recommended)”Enterprise-grade authentication for AI applications with full support for:
- SSO and multi-tenant authentication
- Custom auth flows
- Production-ready security
Setup:
locksmith init --provider=scalekit
Auth0 & FusionAuth
Section titled “Auth0 & FusionAuth”Support for Auth0 and FusionAuth is planned for future releases.
🤖 LLM Brokers
Section titled “🤖 LLM Brokers”Locksmith integrates with popular LLM tools to generate authentication code:
Claude CLI
Section titled “Claude CLI”locksmith configure llm --broker=claudelocksmith generate --module=full-stack-auth
Gemini CLI
Section titled “Gemini CLI”locksmith configure llm --broker=geminilocksmith generate --module=sso
Cursor Agent
Section titled “Cursor Agent”locksmith configure llm --broker=cursor-agentlocksmith generate --module=mcp
⚙️ Configuration
Section titled “⚙️ Configuration”Credential Storage
Section titled “Credential Storage”Credentials are securely stored in ~/.locksmith/credentials.json
:
{ "provider": "scalekit", "environmentId": "your-env-id", "clientId": "your-client-id", "clientSecret": "your-client-secret", "environmentUrl": "https://your-env.scalekit.cloud"}
Configuration Files
Section titled “Configuration Files”~/.locksmith/credentials.json
- Authentication credentials~/.locksmith/config.json
- CLI preferences and settings~/.locksmith/llm-brokers.json
- LLM broker configurations
💡 Examples
Section titled “💡 Examples”Complete Setup Flow
Section titled “Complete Setup Flow”# 1. Initialize with ScaleKitlocksmith init
# 2. Configure Claude as LLM brokerlocksmith configure llm --broker=claude
# 3. Add authentication moduleslocksmith add --module=full-stack-auth --module=sso
# 4. Generate configurationslocksmith generate --format=json --output=./auth-config.json
CI/CD Integration
Section titled “CI/CD Integration”# Non-interactive setup for CIlocksmith init \ --provider=scalekit \ --environment-id=$SCALEKIT_ENV_ID \ --client-id=$SCALEKIT_CLIENT_ID \ --client-secret=$SCALEKIT_CLIENT_SECRET \ --environment-url=$SCALEKIT_ENV_URL \ --no-interactive
# Generate configs in CIlocksmith generate --format=env --output=.env.auth
Development Workflow
Section titled “Development Workflow”# Quick setup for developmentlocksmith init --interactive
# Generate and review promptlocksmith generate --prompt-out=./auth-prompt.txt --dry-run
# Generate with verbose outputlocksmith generate --verbose --module=full-stack-auth
🗺️ Roadmap
Section titled “🗺️ Roadmap”✅ Completed
Section titled “✅ Completed”- ScaleKit authentication provider integration
- Interactive CLI setup wizard
- LLM broker integration (Claude, Gemini, Cursor Agent)
- Multiple authentication modules
- Secure credential management
- JSON/YAML/ENV output formats
🚧 In Progress
Section titled “🚧 In Progress”- Auth0 provider integration
- FusionAuth provider integration
- Advanced SSO configurations
📋 Planned
Section titled “📋 Planned”- Docker container support
- Web dashboard for configuration
- Plugin system for custom providers
- Multi-environment support
- Audit logging
- Backup/restore functionality
🤝 Contributing
Section titled “🤝 Contributing”We welcome contributions! Please see our Contributing Guide for details.
Development Setup
Section titled “Development Setup”# Clone the repositorygit clone https://github.com/Saif-Shines/locksmith.gitcd locksmith
# Install dependenciespnpm install
# Run in developmentpnpm start --help
# Run testspnpm test
Issues and Feature Requests
Section titled “Issues and Feature Requests”📄 License
Section titled “📄 License”This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Section titled “🙏 Acknowledgments”- ScaleKit for enterprise authentication infrastructure
- Anthropic Claude for AI-powered code generation
- Google Gemini for intelligent assistance
- Cursor for the Agent integration
📞 Support
Section titled “📞 Support”- 📧 Email: saif@saifshines.dev
- 🐙 GitHub Issues: Create an issue
- 📖 Documentation: saifshines.dev/notes/locksmith-cli/
Made with ❤️ by Saif Ali Shaik