English | 繁體中文(台灣) | 日本語 | ภาษาไทย
LINE CLI is an unofficial Go CLI for your personal LINE account. Read chats, send messages and files, download attachments, and stream events from your terminal. Use interactive prompts or JSON output on macOS, Linux, and Windows. No bot account or LINE Messaging API setup is required.
Install · Quick start · Commands · Automation · Full guide
The README on main follows development. For a released version, use the
README at its tag and line COMMAND --help. See the changelog.
brew install kongesque/tap/line-clicurl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/kongesque/line-cli/main/scripts/install-release.sh | shThe installer detects your OS and architecture, verifies the release checksum,
and installs line into ~/.local/bin. Reopen your terminal if prompted to
apply its PATH setup.
To use it in the current shell, run export PATH="$HOME/.local/bin:$PATH".
Linux desktop: on Debian or Ubuntu, install credential storage before login:
sudo apt install libsecret-tools gnome-keyringRun line from a desktop session with the Secret Service keyring running and
unlocked in the same D-Bus session. On a server or over SSH without a desktop
keyring, use the headless login below.
irm https://raw.githubusercontent.com/kongesque/line-cli/main/scripts/install-release.ps1 | iexThe installer verifies the checksum and adds line.exe to your user PATH.
Reopen PowerShell if needed. Windows needs no additional keyring package.
You can also download a release or build from source. Release binaries are unsigned and not notarized.
Check your installation:
line versionImportant
Signing in may replace your existing LINE Chrome extension or another Chrome-style client session. LINE CLI saves one account per operating-system user.
line loginScan the terminal QR code with LINE's scanner on your phone, approve the login, and enter the displayed PIN if asked. Wait for Session saved securely. QR login requires Letter Sealing to be enabled.
If your LINE account has an email address and password configured, you can use this instead, including when QR login fails:
line login --email you@example.comEnter your password at the private prompt and complete phone verification if asked. Your password is never saved.
Linux server or SSH: log in without a desktop keyring
Use your regular Unix account and an interactive terminal (ssh -t user@host
when connecting remotely). Headless storage requires /usr/bin/systemd-creds
from systemd 256–259 and a working user credential broker.
line login --headlessFor email/password login, use line login --headless --email you@example.com
instead. Accept Host key; no TPM when prompted: this storage does not protect
against a complete disk copy or provide TPM protection. Initial enrollment still
requires terminal interaction and phone approval.
Wait for Session saved securely, then run line auth status --check.
Continue with the commands below as the same Unix user, without --headless.
line whoami # Confirm your account
line chats # List conversations
line messages # Choose a chat and read recent messages
line send # Choose a recipient and enter your messageThe CLI prompts for missing details in an interactive terminal. Use Ctrl-C to cancel, or pass a chat name directly as shown below.
A successful send prints Sent to … · end-to-end encrypted or
Sent to … · transport encrypted (no E2EE).
| What you want to do | Command |
|---|---|
| Find friends | line contacts --search "Alice" |
| Read recent messages | line messages "Alice" --limit 20 |
| Send a text message | line send "Alice" --text "Hello!" |
| Send a file | line send "Alice" --file ./report.pdf |
| Download photos, video, audio, or files | line download |
| Stream live events | line watch |
Replace Alice with a full chat ID or a complete chat name that matches only
one chat (case-insensitive). If names are duplicated, run
line chats --search "Alice" --show-ids and use the full ID shown.
Run line COMMAND --help for options; the
CLI guide covers replies, reactions, and pagination.
Add --json for structured output on stdout; diagnostics go to stderr.
--json and --stdin disable prompts, so supply all required arguments.
Use full chat IDs in scripts because names can change.
line chats --search "Family" --json
line messages CHAT_ID --limit 20 --json
line send CHAT_ID --stdin --json < message.txt
line watch --json > events.ndjsonGet CHAT_ID from line chats --json. Watch output is NDJSON; consumers should
deduplicate by revision. See the JSON reference for fields and errors.
Remote changes are attempted once. If a send or other action loses its response, check LINE before repeating it.
LINE CLI uses Letter Sealing, LINE's end-to-end encryption, for supported chats
and message types. HTTPS/TLS protects messages in transit, including when LINE
explicitly reports that Letter Sealing is unavailable. Letter Sealing also keeps
message content private from LINE's servers. Use --require-e2ee if you need
end-to-end encryption for every send.
See sending and encryption and session storage.
- Letter Sealing coverage depends on the chat and content type. If LINE explicitly reports no support, messages use HTTPS/TLS transport encryption. See LINE's Encryption Report 2025.
- History contains up to 100 messages per page. Use
--page --jsonand its cursor for older available history; full history is not guaranteed. Reading does not mark messages as read; some older encrypted messages may be unavailable. - File sending and media downloads are limited to 20 MiB.
--filepreserves original bytes and appears as an ordinary file. Encrypted native image sending is disabled; non-E2EE images require explicit LINE capability. Native audio/video and sticker sends, and external media URL downloads, are unsupported. - LINE CLI uses LINE's Chrome-style protocol. Server changes can affect compatibility, and some protocol paths need broader live validation.
Stop running commands and watchers before upgrading; concurrent old and new versions are unsupported.
line update --check # Check the latest release without installing
line update # Update where supported, or show upgrade instructionsHomebrew users should run brew upgrade line-cli. See the
update guide for supported installation methods.
Read the CLI guide or browse the documentation index.
Report bugs and request features through GitHub Issues.
Include line version, your OS, the command, and a redacted error.
Omit passwords, tokens, QR login values, and private messages.
Source builds require Go 1.27.2; macOS also needs Xcode Command Line Tools and CGO. See build from source and contributing for setup and development checks.
LINE CLI is not affiliated with or endorsed by LINE. It is derived from beeper/line; shared protocol and crypto code retain their upstream copyright and provenance. The Matrix connector and Beeper deployment stack are not part of this project.
Distributed under the MIT License.
