A small original bookmark-and-notes library for one person on one computer.
Save links, add context and tags, search, and return to useful things later.
The responsive interface works without JavaScript; / optionally focuses search.
Python 3.10+ with SQLite support is the only requirement. No third-party packages, environment setup, frontend build, or external services are needed.
From this repository directory:
python -m bookmark_notesOpen http://127.0.0.1:18765 in your browser. Stop with Ctrl+C in the terminal.
Bookmarks persist in ~/.bookmark-notes/bookmarks.sqlite3.
python -m bookmark_notes --db demo.sqlite3 --port 18766
python -m bookmark_notes --helpUse a separate file for a demo. Starting a new database does not add sample data. Help does not create a database. An invalid or occupied port reports an error.
- Select Add bookmark, enter a title and an HTTP/HTTPS URL, and save.
- Add optional notes and comma-separated tags such as
python, reference. - Search the title, URL, or notes. Select a tag to combine it with search.
- Select Edit on a card to update its details.
- To delete, open Edit, check the confirmation box, and select Delete bookmark.
Search is literal and case-insensitive for ASCII letters. SQL syntax and % are
ordinary text. Newest bookmarks appear first, with 12 per page. Tags are normalized
to lowercase and deduplicated; each accepts 1–30 ASCII letters, digits, or hyphens,
with up to 12 tags per bookmark. Titles allow 200 characters, notes 4000, and URLs
2048. An exact duplicate URL is rejected; URLs are not otherwise canonicalized.
Links open in a new tab without sending the referrer or exposing the library tab. The application does not download saved pages, favicons, or remote metadata. Invalid form submissions retain the entered values and show a useful error.
The server binds only to 127.0.0.1. It is a local learning application without accounts, authentication, or TLS; do not expose it through a proxy, tunnel, or public interface. It uses Python's small standard-library HTTP server rather than a production application server.
Forms use a per-process CSRF token, allowed-host checks, and POST/redirect/GET. User content is escaped, queries are parameterized, and writes are transactional. A restrictive content-security policy loads only local scripts and styles.
Restarting expires open forms; reload them before saving. Data is stored unencrypted in SQLite. To back up the library, stop the application and copy its database file. Search and tags describe your saved links; there is no page-content search, syncing, browser extension, import/export, or automatic URL-health check.
python -m unittest discover -s tests -vTests use temporary databases and an ephemeral loopback port. They cover persistence, validation, duplicate links, tags, search, pagination, rollback, escaping, assets, form submission, request protections, and confirmed deletion. They do not contact external websites or need a browser installation.
store.py owns data validation and SQL; views.py renders escaped HTML;
server.py handles requests; static/ contains CSS and the optional keyboard shortcut.
See CONTRIBUTING.md and the MIT license.