A secure, multi-user command-line task management system engineered in Python.
Optimised for speed, security, and direct execution via the terminal.
SentinelTask is an advanced command-line interface (CLI) task tracking tool designed to allow multiple users to securely manage their tasks independently on a single terminal environment. This repository was developed specifically as a solution for the Task Tracker project on roadmap.sh.
Unlike basic single-user scripts, SentinelTask implements robust multi-user isolation by utilising secure cryptographic hashing algorithms. Each user's data is isolated, and tasks are strictly mapped to their unique user accounts. No interactive menus are used; instead, it relies entirely on direct, fast command-line arguments passed via the terminal for slick automation and scriptability.
SentinelTask is a complete architectural rewrite of the previous single-user Task Manager (CLI Edition). Here is a breakdown of the structural upgrades:
| Feature | Old Version (Task Manager) | New Version (SentinelTask) |
|---|---|---|
| User Support | Single-user only. Anyone with script access manages the same list. | Multi-user workspace with explicit individual account ownership. |
| Security | None. No authentication or encryption mechanism was present. | High security. Accounts are verified using hashlib and unique salts. |
| Interface Design | Interactive looped menus using blocking input() prompts. |
Direct CLI invocation passing command arguments in one line. |
| Task Statuses | Binary state: Completed (True) or Incomplete (False). |
Tri-state tracking: To-Do, In-Progress, and COMPLETED. |
| Task Identifiers | Global application ID counters across the entire file. | User-scoped IDs (User A and User B can both have a Task ID #1). |
SentinelTask/ β βββ task-cli.py # Application entry point & main script βββ README.md # Project documentation βββ users.json # Database file holding hashed credentials (auto-generated) βββ tasks.json # Database file holding individual task records (auto-generated)
- Ensure you have Python 3.8 or above installed on your operating system.
- Clone or download this repository locally:
git clone https://github.com/Sheikh-H/Sentinel-Task.git
- Navigate directly into the project directory:
cd SentinelTask
- Execute commands using the syntax options defined below. You can view the syntax manual at any time by running:
python task-cli.py --help
Since this script acts as a true CLI tool responding to arguments, execute your desired operational tasks by passing arguments directly following the script path.
- Register a New User:
python task-cli.py new-user [username] [password]
- Change an Account Password:
python task-cli.py change-password [username] [old_password] [new_password]
- Create a New Task:
python task-cli.py [username] [password] add-task "Your task title here"
- Update an Existing Task Title:
python task-cli.py [username] [password] update-task [task_id_or_title] "New task title"
- Delete an Active Task:
python task-cli.py [username] [password] delete-task [task_id_or_title]
- Mark a Task as In-Progress:
python task-cli.py [username] [password] mark-in-progress [task_id_or_title]
- Mark a Task as Complete:
python task-cli.py [username] [password] mark-complete [task_id_or_title]
- View All Tasks:
python task-cli.py [username] [password] view
- Filter by Category Type:
python task-cli.py [username] [password] view [filter_phrase]
Supported phrases include:- Completed tasks:
done,complete,completed,finished - Active tasks:
doing,current,currently active,active,in-progress - Awaiting tasks:
new,to-do,todo,recent,just added
- Completed tasks:
"Buy groceries") so the CLI interprets it correctly as a single parameter.
This section details how the script processes data and explains exactly what each function does under the hood:
load_data(filename): Checks for the targeted JSON database file. If missing, it writes an empty array structure to initialise it cleanly. It opens, parses, and returns the stored data records.save_data(data, filename): Flushes current in-memory global state modifications to disk using an automated two-space structural indentation layout.
new_user(username, password): Handles registration logic. It safeguards details by generating a random cryptographically secure 16-byte hex value using thesecretsmodule. It applies aPBKDF2-HMAC-SHA256key derivation path running 100,000 algorithmic cycles before preserving the resulting unique hash string.user_login(username, password): Authenticates operational tasks. It fetches the exact individual user record, pairs the provided password attempt against the user's stored salt value, executes matching key processing iteration settings, and explicitly halts script loop flow via theerror()function if mismatched.
add_task(username, password, task_title): Validates credentials viauser_login(), checks for duplicate naming conflicts across active records, calculates a user-scoped incrementing identifier index, and maps a complete task entity containing creation timestamps.update_task(username, password, task_search, new_title): Evaluates iftask_searchis a numerical entry or an explicit string pattern. If string matching yields ambiguous multiple results, the utility returns an intuitive prompt telling the user to use the unique numerical task ID context.delete_task(username, password, task_id): Iterates sequentially over global storage scopes, maps entries containing matching ownership attributes, and removes indices targeting matching records.list_task(username, password, list_type): Acts as an entry dispatcher. It processes multiple human-readable string inputs into standardized categories before querying output formatting streams.view_tasks_print(user, category): Evaluates parameters to layout information fields explicitly framed inside systematic ASCII table layouts, tracing parameters like creation dates and precise adjustment timestamps.
The storage layout separates users from user tasks into distinct files, tracking precise ownership keys across lists:
[
{
"id": 1,
"username": "sheikh",
"password": "a1b2c3d4e5f6g7h8i9j0...",
"created_at": "2026-05-23 16:30:00",
"salt": "f37a28e9d8c21b5a...",
"last_updated": null
}
]
[
{
"id": 1,
"user_id": 1,
"title": "Complete Roadmap Project",
"status": "IN-PROGRESS",
"created_at": "2026-05-23 16:35:00",
"updated_at": "2026-05-23 16:40:12"
}
]
- Python Runtime: version 3.8 or above.
- External Libraries: Completely dependency-free! Built completely using internal standard libraries (
sys,json,os,time,datetime,hashlib, andsecrets).
This project is licensed under the MIT Licence β see the LICENCE file for details.
MIT Licence Copyright (c) 2026 Sheikh Hussain Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.