OmniLine
OmniLine is a local user interface for LINE, a popular messaging app in Taiwan. Authentication and communication are provided by OkLine, created by NiceDayZc.
OmniLine has three frontends:
omniline web: a browser interface; the recommended frontend for ordinary useomniline tui: a terminal interfaceomniline cli: a small command-line interface, mainly useful for testing
This README first explains the simplest local setup. Server deployment and other security-sensitive details are in the final section, Security.
Quick start: local computer
You need Python 3.9 or newer and a LINE account that can approve a login on its main device.
1. Create a virtual environment
Using Python's built-in virtual-environment support:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install omniline
Alternatively, if you already use uv:
uv venv
. .venv/bin/activate
uv pip install omniline
Keep the virtual environment activated. All commands in this README assume that it is active; if the terminal prompt no longer shows the environment, activate it again with . .venv/bin/activate.
2. Initialize OmniLine
omniline init
This creates OmniLine's user-data directory and copies the default configuration and themes. Existing files are preserved. To replace the default files explicitly:
omniline init --force
User data is stored under ~/.omniline/, that is, $HOME/.omniline/.
3. Log in to LINE
Run:
okline login
Then:
- Have your main LINE device available.
- Scan the QR code printed in the terminal using LINE's “add contact” → “scan QR code” function.
- Read the six-digit PIN from the terminal.
- Enter the PIN on the main LINE device and approve the login.
A tokens.json login credential is then stored in the OmniLine user-data directory. Keep it private. Future OmniLine commands need to read it.
4. Set the web password
Before starting the web interface, create its local password:
omniline web passwd
The password is used to protect the browser interface. It is not the same as your LINE password.
5. Start the local web interface
omniline web
Open this address in Firefox, Brave, or another browser:
http://127.0.0.1:1730/
Log in with the web password you just created.
The local server listens only on your computer by default. For ordinary local use, do not expose it to the network and do not set OMNILINE_COOKIE_SECURE; that setting is for HTTPS deployments.
The default port is configured in ~/.omniline/config.toml:
[web]
port = 1730
To override it for one local run:
omniline web --port 1731
Then open http://127.0.0.1:1731/.
Using the Web Interface
The web interface is server-rendered and remains usable when JavaScript is disabled. JavaScript makes common operations smoother but is not required for reading, sending, replying, or reacting.
Chat list and conversation
- The chat list is on the left in graphical browsers.
- The selected conversation is on the right.
- Chats are ordered by most recent activity. Pinned chats remain in a separate pinned section at the top, also ordered by recent activity.
- On narrow screens, selecting a chat displays the conversation; the chat list is available through the normal navigation flow.
- Text browsers such as
lynxandw3mdisplay the conversation before the chat list so that the useful content is reached first. - Recent history is bounded by the configured history limit; the web interface does not imply that all historical messages are loaded.
Reading messages
Messages show their sender, text or media, timestamp, reactions, and available actions. Incoming sender names are links to that person's profile.
A divider such as the following marks the beginning of unread messages:
----- unread messages -----
Sending a message
At the bottom of a conversation, use the “Write a message” text box. The small blue arrow button at its right sends the message.
The ordinary HTML form remains available as a fallback. If JavaScript is enabled, the message is submitted asynchronously and the conversation is updated without a full-page reload.
Replying
Select Reply beside a message. The composer identifies the message being answered. Write the reply and use the same blue arrow button. Select Cancel reply to leave reply mode.
Reactions
Select React beside a message, choose one of the available reactions, and submit it. If you have already reacted, the action becomes Remove my reaction.
When a message has reactions:
- the reaction summary shows symbols and counts;
- hover, keyboard focus, or click can show who reacted and how;
- the ordinary reaction-details link remains available when JavaScript is disabled.
Unsend
For messages sent by you, select Unsend and confirm the operation.
New-message notifications
The browser periodically checks unread counts. When new unread messages appear:
- unread badges in the chat list are updated;
- the total appears in the browser tab title;
- a desktop browser notification is shown only if notification permission was already granted.
OmniLine does not automatically request browser notification permission.
Text browsers
For a text-browser session on the same computer, start the local server and use one of:
lynx http://127.0.0.1:1730/
w3m http://127.0.0.1:1730/
The essential conversation, forms, links, profile pages, and reaction details use ordinary HTML navigation and forms.
Troubleshooting local use
If the browser says that authentication is not configured, run this in the activated virtual environment:
omniline web passwd
If login succeeds but messages cannot be loaded, verify that okline login completed and that the current OmniLine process can read the resulting tokens.json.
To stop the local server, press Ctrl-C in the terminal where omniline web is running.
Using the TUI
Start the terminal interface with:
omniline tui
The full-screen layout has a chat list on the left and the selected chat or profile on the right. The status bar shows the currently available keyboard commands.
- List mode: navigate chats, search, open a chat, open a profile, refresh unread counts, and quit.
- Profile mode: view chat information, pin or unpin the chat, and return.
- Content mode: navigate and search messages, move between search matches, open the first URL on the current line, compose a new message or reply, react to a message, and return.
- In reaction mode,
[and]choose a reaction andEnterapplies it. - Search and compose overlays accept text, submission, and cancellation using the displayed keys.
Important settings are in ~/.omniline/config.toml: token-file path, pinned chats, history limit, TUI theme, and conservative sending options. Dark and light themes are stored under the corresponding themes/ directory.
Using the CLI
The CLI is intentionally small and is mainly useful for diagnostics and testing. See:
omniline cli --help
Security
This section is for users who want to expose OmniLine beyond a single local computer or operate it as a server. If you only use omniline web on 127.0.0.1, the Quick start instructions are sufficient.
Web authentication files
omniline web passwd creates:
~/.omniline/password.hash
~/.omniline/session.secret
under $HOME/.omniline/.
The password is stored only as a verifier, never as clear text. session.secret signs Flask session cookies. Both files must remain private and should have restrictive permissions. Running omniline web passwd again changes the password and rotates the session secret, which logs out existing browser sessions.
Login attempts are recorded in access.log without recording the password. The [web] section of config.toml controls the rolling failure limit:
[web]
max_failed_attempts = 5
failed_attempt_window_seconds = 300
session_lifetime_hours = 24
After five failed attempts, further attempts are rejected until the five-minute window expires. The current deployment assumes one Gunicorn worker, so the access log is the shared rate-limit state. If multiple workers are introduced, replace this with a transactional shared store such as SQLite or Redis.
Successful sessions expire after the configured absolute lifetime; ordinary browsing does not extend that lifetime indefinitely.
Local HTTP versus public deployment
The built-in Flask server is intended for local development and testing:
omniline web
Keep it bound to 127.0.0.1. Do not bind it to all network interfaces unless you understand the consequences and have provided an HTTPS and authentication boundary.
For a server deployment, use Apache as the public HTTPS boundary and keep Gunicorn bound to loopback. The command below assumes the virtual environment is active:
The --bind port should match [web].port in ~/.omniline/config.toml. Gunicorn does not read OmniLine's TOML configuration itself, so update the Gunicorn and Apache port values if you change that setting.
gunicorn \
--bind 127.0.0.1:1730 \
omniline.web:app
If OmniLine is being run from a source checkout rather than an installed package, install that checkout into the virtual environment first, for example:
python -m pip install -e ~/OmniLine
The .omniline directory contains user data and credentials; it is not the application-code directory.
The simplified command uses the default files under ~/.omniline/:
~/.omniline/tokens.json
~/.omniline/password.hash
Use the application factory only when you need different secret locations, for example:
gunicorn \
--bind 127.0.0.1:1730 \
'omniline.web:create_app(tokens_file="/secure/other/tokens.json", password_file="/secure/other/password.hash")'
Alternatively, using the installed environment and enabling secure cookies for HTTPS:
OMNILINE_COOKIE_SECURE=1 \
gunicorn \
--bind 127.0.0.1:1730 \
omniline.web:app
OMNILINE_COOKIE_SECURE=1 only sets the cookie Secure attribute. It does not bypass authentication. Password checking always remains enabled.
Apache reverse proxy
If Apache already serves other pages, add this inside the existing HTTPS <VirtualHost> block. It exposes only /omniline/ publicly and forwards it to Gunicorn:
RedirectMatch 301 ^/omniline$ /omniline/
ProxyAddHeaders On
ProxyPass /omniline/ http://127.0.0.1:1730/
ProxyPassReverse /omniline/ http://127.0.0.1:1730/
<Location /omniline/>
RequestHeader set X-Forwarded-Prefix "/omniline"
Require all granted
</Location>
ProxyPassReverseCookiePath / /omniline/
Place these rules before a generic ProxyPass / ... rule, if one exists. X-Forwarded-Prefix allows Flask to generate redirects such as /omniline/login rather than /login. ProxyPassReverseCookiePath keeps the authentication cookie scoped to OmniLine.
Enable the required modules and validate the configuration:
sudo a2enmod proxy proxy_http headers
sudo apache2ctl configtest
sudo apache2ctl -k graceful
On systems without systemctl, use apache2ctl -k start, -k graceful, and -k stop. Start Gunicorn before testing the Apache proxy.
Optional Fail2ban IP bans
The application limiter is global. Fail2ban can add a second, IP-specific layer with longer bans. Create /etc/fail2ban/filter.d/omniline.conf:
[Definition]
# Fail2ban removes the matched date before applying failregex.
datepattern = "time":"{DATE}",
failregex = ^.*"result":"(?:failure|blocked)".*"remote_addr":"<HOST>".*$
ignoreregex =
For example, create /etc/fail2ban/jail.d/omniline.local:
[omniline]
enabled = true
filter = omniline
logpath = /home/YOUR_USER/.omniline/access.log
maxretry = 5
findtime = 300
bantime = 3600
Replace YOUR_USER, then test and reload:
sudo fail2ban-regex \
/home/YOUR_USER/.omniline/access.log \
/etc/fail2ban/filter.d/omniline.conf
sudo fail2ban-client reload
sudo fail2ban-client status omniline
Apache must preserve the client address with:
ProxyAddHeaders On
The application trusts one forwarded proxy hop. Gunicorn must remain bound to 127.0.0.1; otherwise clients could forge X-Forwarded-For and influence IP-based bans.
Security checklist
- Use HTTPS for any non-local deployment.
- Set
OMNILINE_COOKIE_SECURE=1when HTTPS is genuinely in use. - Keep Gunicorn on loopback and use Apache as the public TLS boundary.
- Never enable Flask debug mode in deployment.
- Keep
tokens.json,password.hash,session.secret, andaccess.logprivate. - Use a strong web password and a strong LINE account password.
- Keep CSRF protection enabled for state-changing operations.
- Trust forwarded headers only from the known reverse proxy hop.
- Do not expose tokens, raw backend payloads, message contents, or encrypted material in logs or error pages.
License
Metadata
Release files for omniline 0.8.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| omniline-0.8.2.tar.gz | 57.8 kB | Without provenance | Details for omniline-0.8.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| omniline-0.8.2-py3-none-any.whl | Python 3 | none | any | Details for omniline-0.8.2-py3-none-any.whl |
Total release size: 106.7 kB
Release files / omniline-0.8.2.tar.gz
| Download URL | omniline-0.8.2.tar.gz |
|---|---|
| Size | 57.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df2e917137639c6d853ae73c371e1bbd7b0a303ed67aae30b71c8a3c60279cf6
|
|
BLAKE2b-256 checksum How to use checksums |
4a81d9212b6e2f7905ac54c98b4b39e68915af8d58a60c13859cd86fb04309a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / omniline-0.8.2-py3-none-any.whl
| Download URL | omniline-0.8.2-py3-none-any.whl |
|---|---|
| Size | 48.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85aab0493247e5c378928c64c5093809328605f0f80609bc4c8786123a559cdd
|
|
BLAKE2b-256 checksum How to use checksums |
a98f629ceffc74dc9d0692bda58e136c6c1d7eac422cc1a85b764d5718ee773f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for omniline 0.8.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.