resync-cli
v1.0.0
Published
Command-line interface for Resync goal tracking application
Maintainers
Readme
Resync CLI
Command-line interface for Resync goal tracking application.
Installation
npm install -g resync-cliOr install from source:
git clone https://github.com/TejasS1233/Resync.git
cd Resync/cli
npm install
npm linkQuick Start
# Configure API URL
resync config set-url
# Create account or login
resync auth register
resync auth login
# Start tracking
resync goals add
resync goals listConfiguration
Set API URL
# Interactive selection
resync config set-url
# Direct URL
resync config set-url --url https://resync-pvu5.onrender.com/api
# View current config
resync config show
# Reset to defaults
resync config resetProduction URL: https://resync-pvu5.onrender.com/api
Local Development: http://localhost:8000/api
Commands
Authentication
Register new account
resync auth registerLogin
resync auth loginView current user
resync auth whoamiLogout
resync auth logoutGoals
List all goals
resync goals list
resync goals ls
# Filter by category
resync goals list --filter Health
# Include inactive goals
resync goals list --allAdd new goal
resync goals addInteractive wizard prompts for:
- Title
- Description
- Frequency (daily/weekly/monthly)
- Target count
- Category
- Optional end date
Update progress
resync goals checkSelect a goal and increment/decrement progress.
Delete goal
resync goals delete
resync goals rmNotes
Add daily note
# Interactive mode
resync notes add
# Use system editor
resync notes add --editorList recent notes
resync notes list
resync notes ls
# Limit results
resync notes list --limit 20View specific note
# View today's note
resync notes view
# View by date
resync notes view 2024-01-15Statistics
Dashboard summary
resync stats summary
resync stats dashShows:
- Total and active goals
- Overall progress
- Recent notes and moods
- Motivational messages
Detailed goal statistics
resync stats goalsShows breakdown by frequency and category.
Focus Timer
Pomodoro session
# Default: 25min work, 5min break, 4 cycles
resync focus start
# Custom settings
resync focus start --duration 30 --break 10 --long-break 20 --cycles 4Simple countdown timer
resync focus timer 15Starts a 15-minute countdown timer.
Features
- Secure JWT authentication with automatic token management
- Beautiful table displays for goals and notes
- Color-coded output for better readability
- Loading spinners for async operations
- System editor integration for note-taking
- Built-in Pomodoro timer with visual progress
- Progress bars for goal tracking
- Graceful error handling
Environment Variables
Override API URL temporarily:
Unix/Linux/macOS:
export API_URL=https://resync-pvu5.onrender.com/api
resync auth loginWindows PowerShell:
$env:API_URL = "https://resync-pvu5.onrender.com/api"
resync auth loginWindows CMD:
set API_URL=https://resync-pvu5.onrender.com/api
resync auth loginConfiguration Storage
Config and tokens are stored in:
- Windows:
%APPDATA%\resync-cli-nodejs - macOS:
~/Library/Preferences/resync-cli-nodejs - Linux:
~/.config/resync-cli-nodejs
Troubleshooting
Command not found
npm linkConnection errors
Ensure backend is accessible:
curl https://resync-pvu5.onrender.com/api/healthProduction server may take 30-60 seconds on first request (cold start).
Authentication issues
resync auth logout
resync auth loginWrong API URL
resync config reset
resync config set-urlDevelopment
# Clone repository
git clone https://github.com/TejasS1233/Resync.git
cd Resync/cli
# Install dependencies
npm install
# Link for testing
npm link
# Unlink
npm unlink -g resync-cliTech Stack
- commander - CLI framework
- inquirer - Interactive prompts
- axios - HTTP client
- chalk - Terminal colors
- conf - Configuration storage
- ora - Loading spinners
- boxen - Terminal boxes
- cli-table3 - Table formatting
Requirements
- Node.js v18 or higher
- npm v9 or higher
Links
- Production API: https://resync-pvu5.onrender.com/api
- Web App: https://resync-sh.vercel.app
- GitHub: https://github.com/TejasS1233/Resync
License
ISC
Support
For issues and questions, open an issue on GitHub.
