storemyapi
v1.0.5
Published
A secure, cloud-synced environment variable manager for your development workflow.
Readme
StoreMyAPI CLI
A secure, cloud-synced environment variable manager for your development workflow.
Version: 1.0.5
Overview
StoreMyAPI CLI is a command-line tool that provides seamless management of environment variables across your development environment. Authenticate securely via browser and manage your projects with confidence.
Features
- Secure Browser-Based Authentication - OAuth-style device flow authentication
- Project Management - Initialize and manage projects locally
- Cloud-Synced Configuration - Store your project configuration securely
- Session Management - Track and logout of active sessions
- Cross-Device Access - Access your configuration from any machine
- Zero-Config Setup - Minimal configuration required
Installation
npm install -g storemyapiAlternatively, install locally in your project:
npm install --save-dev storemyapiQuick Start
1. Login
Start the authentication flow:
storemyapi loginThis will open your browser for authentication and store your access token locally.
2. Initialize a Project
Set up a project in your current directory:
storemyapi initYou'll be prompted for:
- Project name (defaults to current folder name)
- Description (optional)
Creates a .storemyapi.json file linking your local folder to the project.
3. Verify Authentication
Check your current logged-in user:
storemyapi whoami4. Logout
End your session:
storemyapi logoutCommands
login
Initiates CLI authentication via browser.
storemyapi login [options]Options:
--no-browser- Display authentication URL instead of opening browser automatically
Output:
Opening browser for authentication...
Login successful!whoami
Displays the currently authenticated user.
storemyapi whoamiOutput:
Logged in as: [email protected]logout
Logs out and clears your local authentication token.
storemyapi logoutOutput:
Logged out successfully.
Session duration: 2h 15minit
Initializes a StoreMyAPI project in your current folder.
storemyapi initPrompts:
- Project name (required)
- Description (optional)
Creates:
.storemyapi.json- Local project configuration
Output:
Initialized!
Project created: my-project
Linked locally via .storemyapi.jsonConfiguration Files
.storemyapi/config.json
Located in your home directory (~/.storemyapi/config.json). Contains:
accessToken- Your authentication tokenuserId- Your user identifier
Security: Never share or commit this file. Add ~/.storemyapi/ to your .gitignore.
.storemyapi.json
Located in your project folder. Contains:
projectId- Your project's unique identifierprojectName- Project namecreatedAt- Project creation timestamp
Safe to commit to version control.
System Requirements
- Node.js 18.0 or higher
- macOS, Linux, or Windows
- Default web browser (for authentication)
Troubleshooting
"You are not logged in"
Run the login command:
storemyapi loginBrowser doesn't open automatically
Use the --no-browser flag and manually visit the displayed URL:
storemyapi login --no-browser"Project already initialized"
A .storemyapi.json file already exists in this folder. Remove it if you want to reinitialize:
rm .storemyapi.json
storemyapi initCommand not found
If installed globally, ensure npm's bin directory is in your PATH:
npm config get prefixAdd the returned path's bin directory to your system PATH.
Project Structure
storemyapi-cli/
├── src/
│ ├── index.ts # CLI entry point
│ ├── commands/
│ │ ├── login.ts # Authentication handler
│ │ ├── logout.ts # Session termination
│ │ ├── whoami.ts # User info display
│ │ └── init.ts # Project initialization
│ └── utils/
│ ├── api.ts # API client
│ └── config.ts # Config file management
├── dist/ # Compiled output
├── tsconfig.json
└── package.jsonDependencies
- commander ^14.0.3 - CLI framework
- axios ^1.13.6 - HTTP client
- inquirer ^9.0.0 - Interactive prompts
- open ^11.0.0 - Open URLs in browser
- jwt-decode ^4.0.0 - Token parsing
Changelog
Version 1.0.5
- Enhanced
initcommand with project description support - Improved error logging and diagnostics
- Better terminal output formatting
- Updated documentation
Version 1.0.4
- Added
logoutcommand with session tracking - Improved configuration cleanup
Version 1.0.3
- Enhanced authentication UI
- Better error messages
Built with TypeScript • Node.js CLI
