todone-cli
v1.0.0
Published
Command-line interface for managing Todone notes
Downloads
4
Maintainers
Readme
Todone CLI
Command-line interface for managing your Todone notes from the terminal.
📦 Installation
Choose your preferred installation method:
Option 1: npm (Cross-Platform)
npm install -g todone-cliOption 2: Homebrew (macOS/Linux)
brew tap Pierry/todone
brew install todoneOption 3: From Source
git clone https://github.com/Pierry/todone.git
cd todone
npm install
npm linkSee INSTALLATION.md for detailed instructions and troubleshooting.
🚀 Setup
1. Get Your Package
Install via your preferred method above.
2. Configure Firebase Service Account
The CLI uses Firebase Admin SDK for authentication and data access. You need to set up a service account:
- Go to Firebase Console
- Select your Todone project
- Go to Project Settings > Service Accounts
- Click Generate New Private Key
- Download the JSON file
- Create the config directory and move the file:
mkdir -p ~/.todone
mv ~/Downloads/your-service-account-file.json ~/.todone/service-account.json3. Authenticate
todone loginEnter your email address that you use in the Todone app. The CLI will verify your account and save your credentials locally at ~/.todone/auth.json.
📖 Usage
List Commands
# List all notes
todone list
# List with aliases
todone ls
# List notes in a specific folder
todone list --folder <folderId>
# Search notes
todone list --search "keyword"
# Limit results
todone list --limit 10
# Show only done notes
todone list --done
# Show only pending notes
todone list --pendingView a Note
# View note by ID (use short ID from list command)
todone view <noteId>
# Alias
todone show <noteId>Create a Note
# Interactive mode (prompts for all fields)
todone create
# With inline options
todone create --title "My Note" --content "Note content"
# Open editor for content
todone create --editor
# Create in a specific folder
todone create --folder <folderId>
# Alias
todone newEdit a Note
# Interactive mode
todone edit <noteId>
# Update title
todone edit <noteId> --title "New Title"
# Update content
todone edit <noteId> --content "New content"
# Open editor for content
todone edit <noteId> --editorDelete a Note
# Delete with confirmation
todone delete <noteId>
# Delete without confirmation
todone delete <noteId> --yes
# Alias
todone rm <noteId>Mark as Done/Undone
# Toggle done status
todone done <noteId>Manage Folders
# List all folders with note counts
todone foldersSearch
# Search by keyword
todone search "keyword"
# Search with limit
todone search "keyword" --limit 5Authentication
# Login
todone login
# Logout
todone logout
# Show current user
todone whoami💡 Examples
Quick workflow
# List your notes
todone ls
# Create a new note interactively
todone new
# View a specific note
todone view a1b2c3d4
# Mark as done
todone done a1b2c3d4
# Search for notes about "project"
todone search "project"
# Edit a note in your default editor
todone edit a1b2c3d4 --editorAdvanced usage
# Create a note with all details in one command
todone create -t "Meeting Notes" -c "Discussed Q4 roadmap" -f folder123
# List only done notes in a specific folder
todone ls --folder folder123 --done
# Search and limit results
todone search "important" --limit 5🎨 Features
- Beautiful table output - Notes displayed in formatted tables
- Interactive mode - Prompts guide you through creating/editing notes
- Editor integration - Open your favorite editor (set via
$EDITORenv variable) - Search & filter - Find notes by content, folder, or status
- Folder support - Organize notes in folders
- Markdown support - Create and edit notes in markdown format
- Offline auth - Credentials cached locally for fast access
🔧 Configuration
Config Directory
All CLI configuration is stored in ~/.todone/:
service-account.json- Firebase service account credentialsauth.json- Your authentication token
Environment Variables
EDITOR- Default editor for note content (defaults tonano)
Example:
export EDITOR=vim
# or
export EDITOR=code # VS Code🛠️ Troubleshooting
"Service account file not found"
Make sure you've placed your Firebase service account JSON file at:
~/.todone/service-account.json"Not authenticated"
Run todone login and enter your email address.
"User not found"
Make sure you have an account in the Todone web app with the email you're trying to use.
Editor not opening
Set your EDITOR environment variable:
export EDITOR=nano # or vim, code, etc.📝 Tips
Use short IDs: The list command shows shortened note IDs (first 8 characters). You can use these instead of the full ID.
Combine filters: You can combine multiple options:
todone ls --folder folder123 --search "keyword" --limit 10Quick editing: Use the
--editorflag to open notes in your favorite editor:todone edit a1b2c3d4 --editorCheck your folders: Use
todone foldersto see all your folders and their IDs before creating notes.
🔐 Security
- Service account credentials are stored locally at
~/.todone/service-account.json - User authentication is cached at
~/.todone/auth.json - Both files should be kept secure and not shared
- Use
todone logoutto clear cached credentials
📄 License
Same as Todone app - All rights reserved
