1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00
joplin/readme/terminal.md

642 lines
33 KiB
Markdown
Raw Normal View History

2017-11-16 13:37:46 +02:00
# Joplin
Joplin is a free, open source note taking and to-do application, which can handle a large number of notes organised into notebooks. The notes are searchable, can be copied, tagged and modified with your own text editor.
2019-04-18 15:59:17 +02:00
Notes exported from Evernote via .enex files [can be imported](https://joplinapp.org/#importing) into Joplin, including the formatted content (which is converted to Markdown), resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.). Plain Markdown files can also be imported.
2017-11-16 13:37:46 +02:00
2018-03-31 20:19:11 +02:00
The notes can be [synchronised](#synchronisation) with various targets including the file system (for example with a network directory), Nextcloud, Dropbox, OneDrive or WebDAV. When synchronising the notes, notebooks, tags and other metadata are saved to plain text files which can be easily inspected, backed up and moved around.
2017-11-16 13:37:46 +02:00
2019-04-18 15:59:17 +02:00
<img src="https://joplinapp.org/images/ScreenshotTerminal.png" style="max-width: 60%">
2017-11-16 13:37:46 +02:00
# Installation
2018-04-19 11:13:33 +02:00
Operating system | Method
-----------------|----------------
macOS, Linux, or Windows (via [WSL](https://docs.microsoft.com/en-us/windows/wsl/faq)) | **Important:** First, [install Node 12+](https://nodejs.org/en/download/package-manager/).<br/><br/>`NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin`<br/>`sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin`<br><br>By default, the application binary will be installed under `~/.joplin-bin`. You may change this directory if needed. Alternatively, if your npm permissions are setup as described [here](https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory) (Option 2) then simply running `npm -g install joplin` would work.
2017-11-16 13:37:46 +02:00
To start it, type `joplin`.
2020-05-29 04:30:55 +02:00
## Unsupported methods
There are other ways to install the terminal application. However, they are not supported and problems must be reported to the upstream projects.
Operating system | Method
-----------------|----------------
macOS | `brew install joplin`
Arch Linux | An Arch Linux package is available [here](https://aur.archlinux.org/packages/joplin/). To install it, use an AUR wrapper such as yay: `yay -S joplin`. Both the CLI tool (type `joplin`) and desktop app (type `joplin-desktop`) are packaged. You can also install a compiled version with the [chaotic-aur](https://wiki.archlinux.org/index.php/Unofficial_user_repositories#chaotic-aur) repository. For support, please go to the [GitHub repo](https://github.com/masterkorp/joplin-pkgbuild).
2017-11-16 13:37:46 +02:00
# Usage
2018-02-17 01:08:04 +02:00
To start the application type `joplin`. This will open the user interface, which has three main panes: Notebooks, Notes and the text of the current note. There are also additional panels that can be toggled on and off via [shortcuts](#shortcuts).
2017-11-16 13:37:46 +02:00
2019-04-18 15:59:17 +02:00
<img src="https://joplinapp.org/images/ScreenshotTerminalCaptions.png" height="450px">
2017-11-16 13:37:46 +02:00
## Input modes
Joplin user interface is partly based on the text editor Vim and offers two different modes to interact with the notes and notebooks:
### Normal mode
2018-02-17 01:08:04 +02:00
Allows moving from one pane to another using the `Tab` and `Shift-Tab` keys, and to select/view notes using the arrow keys. Text area can be scrolled using the arrow keys too. Press `Enter` to edit a note. Various other [shortcuts](#shortcuts) are available.
2017-11-16 13:37:46 +02:00
### Command-line mode
2018-02-17 01:08:04 +02:00
Press `:` to enter command line mode. From there, the Joplin commands such as `mknote` or `search` are available. See the [full list of commands](#commands).
2017-11-16 13:37:46 +02:00
It is possible to refer to a note or notebook by title or ID. However the simplest way is to refer to the currently selected item using one of these shortcuts:
Shortcut | Description
---------|------------
`$n` | Refers to the currently selected note
`$b` | Refers to the currently selected notebook
`$c` | Refers to the currently selected item. For example, if the note list is current active, `$c` will refer to the currently selected note.
**Examples:**
Create a new note with title "Wednesday's meeting":
2017-12-01 22:06:20 +02:00
mknote "Wednesday's meeting"
2017-11-16 13:37:46 +02:00
Create a new to-do:
2017-12-01 22:06:20 +02:00
mktodo "Buy bread"
2017-11-16 13:37:46 +02:00
Move the currently selected note ($n) to the notebook with title "Personal"
2017-12-01 22:06:20 +02:00
mv $n "Personal"
2017-11-16 13:37:46 +02:00
Rename the currently selected notebook ($b) to "Something":
2017-12-01 22:06:20 +02:00
ren $b "Something"
2017-11-16 13:37:46 +02:00
Attach a local file to the currently selected note ($n):
2017-12-15 09:31:57 +02:00
attach $n /home/laurent/pictures/Vacation12.jpg
2017-11-16 13:37:46 +02:00
The configuration can also be changed from command-line mode. For example, to change the current editor to Sublime Text:
2017-12-01 22:06:20 +02:00
config editor "subl -w"
2017-11-16 13:37:46 +02:00
## Editing a note
To edit a note, select it and press `ENTER`. Or, in command-line mode, type `edit $n` to edit the currently selected note, or `edit "Note title"` to edit a particular note.
## Getting help
The complete usage information is available from command-line mode, by typing one of these commands:
Command | Description
--------|-------------------
`help` | General help information
`help keymap` | Lists the available shortcuts
2017-11-16 13:37:46 +02:00
`help [command]` | Displays information about a particular command
If the help is not fully visible, press `Tab` multiple times till the console is in focus and use the arrow keys or page up/down to scroll the text.
2019-04-18 15:59:17 +02:00
For general information relevant to all the applications, see also [Joplin home page](https://joplinapp.org).
2018-03-29 21:17:11 +02:00
2017-11-16 13:37:46 +02:00
# Importing notes from Evernote
To import Evernote data, follow these steps:
* First, export your Evernote notebooks to ENEX files as described [here](https://help.evernote.com/hc/en-us/articles/209005557-How-to-back-up-export-and-restore-import-notes-and-notebooks).
2018-02-28 00:15:20 +02:00
* In Joplin, in [command-line mode](#command-line-mode), type `import /path/to/file.enex`. This will import the notes into a new notebook named after the filename.
2017-11-16 13:37:46 +02:00
* Then repeat the process for each notebook that needs to be imported.
# Synchronisation
One of the goals of Joplin was to avoid being tied to any particular company or service, whether it is Evernote, Google or Microsoft. As such the synchronisation is designed without any hard dependency to any particular service. Most of the synchronisation process is done at an abstract level and access to external services, such as Nextcloud or Dropbox, is done via lightweight drivers. It is easy to support new services by creating simple drivers that provide a filesystem-like interface, i.e. the ability to read, write, delete and list items. It is also simple to switch from one service to another or to even sync to multiple services at once. Each note, notebook, tags, as well as the relation between items is transmitted as plain text files during synchronisation, which means the data can also be moved to a different application, can be easily backed up, inspected, etc.
2017-11-16 13:37:46 +02:00
Currently, synchronisation is possible with Nextcloud, WebDAV, Dropbox, OneDrive or the local filesystem. To enable synchronisation please follow the instructions below. After that, the application will synchronise in the background whenever it is running, or you can click on "Synchronise" to start a synchronisation manually. Joplin will background sync automatically after any content change is made on the local application.
If the **terminal client** has been installed, it is possible to also synchronise outside of the user interface by typing `joplin sync` from the terminal. This can be used to setup a cron script to synchronise at a regular interval. For example, this would do it every 30 minutes:
*/30 * * * * /path/to/joplin sync
2017-11-16 13:37:46 +02:00
## Nextcloud synchronisation
You will need to set the `sync.target` config variable and all the `sync.5.path`, `sync.5.username` and `sync.5.password` config variables to, respectively the Nextcloud WebDAV URL, your username and your password. This can be done from the command line mode using:
:config sync.target 5
:config sync.5.path https://example.com/nextcloud/remote.php/webdav/Joplin
:config sync.5.username YOUR_USERNAME
:config sync.5.password YOUR_PASSWORD
2018-02-17 01:14:26 +02:00
If synchronisation does not work, please consult the logs in the app profile directory (`~/.config/joplin`)- it is often due to a misconfigured URL or password. The log should indicate what the exact issue is.
## WebDAV synchronisation
Select the "WebDAV" synchronisation target and follow the same instructions as for Nextcloud above (for the **terminal application** you will need to select sync target 6 rather than 5).
For WebDAV-compatible services that are known to work with Joplin see [WebDAV synchronisation](https://github.com/laurent22/joplin#webdav-synchronisation).
## Dropbox synchronisation
When syncing with Dropbox, Joplin creates a sub-directory in Dropbox, in `/Apps/Joplin` and read/write the notes and notebooks from it. The application does not have access to anything outside this directory.
To initiate the synchronisation process, type `:sync`. You will be asked to follow a link to authorise the application.
## OneDrive synchronisation
2017-11-16 13:37:46 +02:00
When syncing with OneDrive, Joplin creates a sub-directory in OneDrive, in /Apps/Joplin and read/write the notes and notebooks from it. The application does not have access to anything outside this directory.
To initiate the synchronisation process, type `:sync`. You will be asked to follow a link to authorise the application (simply input your Microsoft credentials - you do not need to register with OneDrive).
2017-11-16 13:37:46 +02:00
# URLs
When Ctrl+Clicking a URL (or opening with the shortcut 'o' while it is highlighted), most terminals will open that URL in the default browser. However, one issue, especially with long URLs, is that they can end up like this:
2017-11-16 13:37:46 +02:00
2019-04-18 15:59:17 +02:00
<img src="https://joplinapp.org/images/UrlCut.png" width="300px">
2017-11-16 13:37:46 +02:00
Not only it makes the text hard to read, but the link, being cut in two, will also not be clickable.
As a solution Joplin tries to start a mini-server in the background and, if successful, all the links will be converted to a much shorter URL:
2019-04-18 15:59:17 +02:00
<img src="https://joplinapp.org/images/UrlNoCut.png" width="300px">
2017-11-16 13:37:46 +02:00
2020-05-26 04:18:13 +02:00
Since this is still an actual URL, the terminal will still make it clickable. And with shorter URLs, the text is more readable and the links unlikely to be cut. Both resources (files that are attached to notes) and external links are handled in this way.
2017-11-16 13:37:46 +02:00
# Attachments / Resources
In Markdown, links to resources are represented as a simple ID to the resource. In order to give access to these resources, they will be, like links, converted to local URLs. Clicking this link will then open a browser, which will handle the file - i.e. display the image, open the PDF file, etc.
2017-12-07 20:12:46 +02:00
# Shell mode
Commands can also be used directly from a shell. To view the list of available commands, type `joplin help all`. To reference a note, notebook or tag you can either use the ID (type `joplin ls -l` to view the ID) or by title.
For example, this will create a new note "My note" in the notebook "My notebook":
$ joplin mkbook "My notebook"
$ joplin use "My notebook"
$ joplin mknote "My note"
To view the newly created note:
$ joplin ls -l
fe889 07/12/2017 17:57 My note
Give a new title to the note:
2017-12-07 21:38:24 +02:00
$ joplin set fe889 title "New title"
2017-12-07 20:12:46 +02:00
2018-02-17 01:08:04 +02:00
# Shortcuts
2017-11-16 13:37:46 +02:00
There are two types of shortcuts: those that manipulate the user interface directly, such as `TAB` to move from one pane to another, and those that are simply shortcuts to actual commands. In a way similar to Vim, these shortcuts are generally a verb followed by an object. For example, typing `mn` ([m]ake [n]ote), is used to create a new note: it will switch the interface to command line mode and pre-fill it with `mknote ""` from where the title of the note can be entered. See below for the full list of default shortcuts:
: enter_command_line_mode
TAB focus_next
SHIFT_TAB focus_previous
UP move_up
DOWN move_down
PAGE_UP page_up
PAGE_DOWN page_down
ENTER activate
DELETE, BACKSPACE delete
(SPACE) todo toggle $n
2020-05-24 11:20:05 +02:00
n next_link
b previous_link
o open_link
tc toggle_console
tm toggle_metadata
/ search ""
mn mknote ""
mt mktodo ""
mb mkbook ""
yn cp $n ""
dn mv $n ""
2018-02-17 01:14:26 +02:00
Shortcut can be configured by adding a keymap file to the profile directory in `~/.config/joplin/keymap.json`. The content of this file is a JSON array with each entry defining a command and the keys associated with it.
2018-02-17 01:08:04 +02:00
As an example, this is the default keymap, but read below for a detailed explanation of each property.
```json
[
{ "keys": [":"], "type": "function", "command": "enter_command_line_mode" },
{ "keys": ["TAB"], "type": "function", "command": "focus_next" },
{ "keys": ["SHIFT_TAB"], "type": "function", "command": "focus_previous" },
{ "keys": ["UP"], "type": "function", "command": "move_up" },
{ "keys": ["DOWN"], "type": "function", "command": "move_down" },
{ "keys": ["PAGE_UP"], "type": "function", "command": "page_up" },
{ "keys": ["PAGE_DOWN"], "type": "function", "command": "page_down" },
{ "keys": ["ENTER"], "type": "function", "command": "activate" },
{ "keys": ["DELETE", "BACKSPACE"], "type": "function", "command": "delete" },
{ "keys": [" "], "command": "todo toggle $n" },
{ "keys": ["n"], "type": "function", "command": "next_link" },
{ "keys": ["b"], "type": "function", "command": "previous_link" },
{ "keys": ["o"], "type": "function", "command": "open_link" },
{ "keys": ["tc"], "type": "function", "command": "toggle_console" },
{ "keys": ["tm"], "type": "function", "command": "toggle_metadata" },
{ "keys": ["/"], "type": "prompt", "command": "search \"\"", "cursorPosition": -2 },
{ "keys": ["mn"], "type": "prompt", "command": "mknote \"\"", "cursorPosition": -2 },
{ "keys": ["mt"], "type": "prompt", "command": "mktodo \"\"", "cursorPosition": -2 },
{ "keys": ["mb"], "type": "prompt", "command": "mkbook \"\"", "cursorPosition": -2 },
{ "keys": ["yn"], "type": "prompt", "command": "cp $n \"\"", "cursorPosition": -2 },
{ "keys": ["dn"], "type": "prompt", "command": "mv $n \"\"", "cursorPosition": -2 }
]
```
2017-11-16 13:37:46 +02:00
2018-02-17 01:08:04 +02:00
Each entry can have the following properties:
Name | Description
-----|------------
`keys` | The array of keys that will trigger the action. Special keys such as page up, down arrow, etc. needs to be specified UPPERCASE. See the [list of available special keys](https://github.com/cronvel/terminal-kit/blob/3114206a9556f518cc63abbcb3d188fe1995100d/lib/termconfig/xterm.js#L531). For example, `['DELETE', 'BACKSPACE']` means the command will run if the user pressed either the delete or backspace key. Key combinations can also be provided - in that case specify them lowercase. For example "tc" means that the command will be executed when the user pressed "t" then "c". Special keys can also be used in this fashion - simply write them one after the other. For instance, `CTRL_WCTRL_W` means the action would be executed if the user pressed "ctrl-w ctrl-w".
`type` | The command type. It can have the value "exec", "function" or "prompt". **exec**: Simply execute the provided [command](#commands). For example `edit $n` would edit the selected note. **function**: Run a special commands (see below for the list of functions). **prompt**: A bit similar to "exec", except that the command is not going to be executed immediately - this allows the user to provide additional data. For example `mknote ""` would fill the command line with this command and allow the user to set the title. A prompt command can also take a `cursorPosition` parameter (see below)
`command` | The command that needs to be executed
`cursorPosition` | An integer. For prompt commands, tells where the cursor (caret) should start at. This is convenient for example to position the cursor between quotes. Use a negative value to set a position starting from the end. A value of "0" means positioning the caret at the first character. A value of "-1" means positioning it at the end.
2018-02-17 01:08:04 +02:00
This is the list of special functions:
Name | Description
-----|------------
enter_command_line_mode | Enter command line mode
focus_next | Focus next pane (or widget)
focus_previous | Focus previous pane (or widget)
move_up | Move up (in a list for example)
move_down | Move down (in a list for example)
page_up | Page up
page_down | Page down
next_link | Select the next link in the currently opened note (the first link will be selected if no link is currently selected)
previous_link | Select the previous link in the currently opened note (the last link will be selected if no link is currently selected)
open_link | Open the currently selected link externally
2018-02-17 01:08:04 +02:00
activate | Activates the selected item. If the item is a note for example it will be open in the editor
delete | Deletes the selected item
toggle_console | Toggle the console
toggle_metadata | Toggle note metadata
# Commands
2017-11-16 13:37:46 +02:00
The following commands are available in [command-line mode](#command-line-mode):
2017-12-01 22:06:20 +02:00
attach <note> <file>
Attaches the given file to the note.
2018-02-17 01:08:04 +02:00
cat <note>
Displays the given note.
-v, --verbose Displays the complete information about note.
2017-12-01 22:06:20 +02:00
config [name] [value]
2017-11-16 13:37:46 +02:00
Gets or sets a config value. If [value] is not provided, it will show the
value of [name]. If neither [name] nor [value] is provided, it will list
2017-12-01 22:06:20 +02:00
the current configuration.
2017-11-16 13:37:46 +02:00
2020-03-08 11:17:10 +02:00
-v, --verbose Also displays unset and hidden config variables.
--export Writes all settings to STDOUT as JSON including
2020-03-08 11:17:10 +02:00
secure variables.
--import Reads in JSON formatted settings from STDIN.
--import-file <file> Reads in settings from <file>. <file> must contain
2020-03-08 11:17:10 +02:00
valid JSON.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Possible keys/values:
2017-11-16 13:37:46 +02:00
2020-03-08 11:17:10 +02:00
sync.target Synchronisation target.
The target to synchonise to. Each sync
target may have additional parameters which
are named as `sync.NUM.NAME` (all
2020-03-08 11:17:10 +02:00
documented below).
Type: Enum.
Possible values: 2 (File system), 3
(OneDrive), 4 (OneDrive Dev (For testing
only)), 5 (Nextcloud), 6 (WebDAV), 7
2020-03-08 11:17:10 +02:00
(Dropbox).
Default: 7
sync.2.path Directory to synchronise with (absolute
2020-03-08 11:17:10 +02:00
path).
Attention: If you change this location,
make sure you copy all your content to it
before syncing, otherwise all files will be
removed! See the FAQ for more details:
2020-03-08 11:17:10 +02:00
https://joplinapp.org/faq/
Type: string.
2020-03-08 11:17:10 +02:00
sync.5.path Nextcloud WebDAV URL.
Attention: If you change this location,
make sure you copy all your content to it
before syncing, otherwise all files will be
removed! See the FAQ for more details:
2020-03-08 11:17:10 +02:00
https://joplinapp.org/faq/
Type: string.
2020-03-08 11:17:10 +02:00
sync.5.username Nextcloud username.
Type: string.
2020-03-08 11:17:10 +02:00
sync.5.password Nextcloud password.
Type: string.
2020-03-08 11:17:10 +02:00
sync.6.path WebDAV URL.
Attention: If you change this location,
make sure you copy all your content to it
before syncing, otherwise all files will be
removed! See the FAQ for more details:
2020-03-08 11:17:10 +02:00
https://joplinapp.org/faq/
Type: string.
2020-03-08 11:17:10 +02:00
sync.6.username WebDAV username.
Type: string.
2020-03-08 11:17:10 +02:00
sync.6.password WebDAV password.
Type: string.
2020-03-08 11:17:10 +02:00
sync.maxConcurrentConnections Max concurrent connections.
Type: int.
Default: 5
2020-03-08 11:17:10 +02:00
locale Language.
Please see localisation section on
https://joplinapp.org/#localisation
for info on translation completion progress
2020-03-08 11:17:10 +02:00
Type: Enum.
Possible values: ar (Arabic), eu (Basque),
bs_BA (Bosnian), bg_BG (Bulgarian),
ca (Catalan), hr_HR (Croatian),
cs_CZ (Czech), da_DK (Dansk),
de_DE (Deutsch), et_EE (Eesti Keel),
en_GB (English (UK)), en_US (English (US)),
es_ES (Español), eo (Esperanto),
fi_FI (Finnish), fr_FR (Français),
gl_ES (Galician), id_ID (Indonesian),
it_IT (Italiano), nl_BE (Nederlands),
nl_NL (Nederlands), nb_NO (Norwegian),
fa (Persian), pl_PL (Polski),
pt_PT (Português),
pt_BR (Português (Brasil)), ro (Română),
sl_SI (Slovenian), sv (Svenska),
th_TH (Thai), vi (Tiếng Việt),
tr_TR (Türkçe), el_GR (Ελληνικά),
ru_RU (Русский), sr_RS (српски језик),
zh_CN (中文 (简体)), zh_TW (中文 (繁體)),
ja_JP (日本語), ko (한국말).
2020-03-08 11:17:10 +02:00
Default: "en_GB"
2020-03-08 11:17:10 +02:00
dateFormat Date format.
Type: Enum.
Possible values: DD/MM/YYYY (30/01/2017),
DD/MM/YY (30/01/17), MM/DD/YYYY
(01/30/2017), MM/DD/YY (01/30/17),
YYYY-MM-DD (2017-01-30), DD.MM.YYYY
2020-03-08 11:17:10 +02:00
(30.01.2017), YYYY.MM.DD (2017.01.30).
Default: "DD/MM/YYYY"
2020-03-08 11:17:10 +02:00
timeFormat Time format.
Type: Enum.
Possible values: HH:mm (20:30), h:mm A
2020-03-08 11:17:10 +02:00
(8:30 PM).
Default: "HH:mm"
2020-03-08 11:17:10 +02:00
uncompletedTodosOnTop Uncompleted to-dos on top.
Type: bool.
Default: true
2020-03-08 11:17:10 +02:00
showCompletedTodos Show completed to-dos.
Type: bool.
Default: true
2020-03-08 11:17:10 +02:00
notes.sortOrder.field Sort notes by.
Type: Enum.
Possible values: user_updated_time (Updated
date), user_created_time (Created date),
2020-03-08 11:17:10 +02:00
title (Title).
Default: "user_updated_time"
2020-03-08 11:17:10 +02:00
notes.sortOrder.reverse Reverse sort order.
Type: bool.
Default: true
2020-03-08 11:17:10 +02:00
folders.sortOrder.field Sort notebooks by.
Type: Enum.
Possible values: title (Title),
2020-03-08 11:17:10 +02:00
last_note_user_updated_time (Updated date).
Default: "title"
2020-03-08 11:17:10 +02:00
folders.sortOrder.reverse Reverse sort order.
Type: bool.
Default: false
2020-03-08 11:17:10 +02:00
trackLocation Save geo-location with notes.
Type: bool.
Default: true
2020-03-08 11:17:10 +02:00
sync.interval Synchronisation interval.
Type: Enum.
Possible values: 0 (Disabled), 300 (5
minutes), 600 (10 minutes), 1800 (30
minutes), 3600 (1 hour), 43200 (12 hours),
2020-03-08 11:17:10 +02:00
86400 (24 hours).
Default: 300
2020-03-08 11:17:10 +02:00
editor Text editor command.
The editor command (may include arguments)
that will be used to open a note. If none
is provided it will try to auto-detect the
2020-03-08 11:17:10 +02:00
default editor.
Type: string.
2020-03-08 11:17:10 +02:00
net.customCertificates Custom TLS certificates.
Comma-separated list of paths to
directories to load the certificates from,
or path to individual cert files. For
example: /my/cert_dir, /other/custom.pem.
Note that if you make changes to the TLS
settings, you must save your changes before
clicking on "Check synchronisation
2020-03-08 11:17:10 +02:00
configuration".
Type: string.
2020-03-08 11:17:10 +02:00
net.ignoreTlsErrors Ignore TLS certificate errors.
Type: bool.
Default: false
sync.wipeOutFailSafe Fail-safe: Do not wipe out local data when
sync target is empty (often the result of a
2020-03-08 11:17:10 +02:00
misconfiguration or bug).
Type: bool.
Default: true
2020-03-08 11:17:10 +02:00
revisionService.enabled Enable note history.
Type: bool.
Default: true
2020-03-08 11:17:10 +02:00
revisionService.ttlDays Keep note history for.
Type: int.
Default: 90
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
cp <note> [notebook]
2017-11-16 13:37:46 +02:00
Duplicates the notes matching <note> to [notebook]. If no notebook is
2017-12-01 22:06:20 +02:00
specified the note is duplicated in the current notebook.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
done <note>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Marks a to-do as done.
2017-11-16 13:37:46 +02:00
2018-02-17 01:08:04 +02:00
e2ee <command> [path]
Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`,
2020-03-08 11:17:10 +02:00
`status`, `decrypt-file` and `target-status`.
2018-02-17 01:08:04 +02:00
-p, --password <password> Use this password as master password (For
security reasons, it is not recommended to use
2018-02-17 01:08:04 +02:00
this option).
-v, --verbose More verbose output for the `target-status`
2018-02-17 01:08:04 +02:00
command
2020-03-08 11:17:10 +02:00
-o, --output <directory> Output directory
2018-02-17 01:08:04 +02:00
2017-12-01 22:06:20 +02:00
edit <note>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Edit note.
2017-11-16 13:37:46 +02:00
2018-02-27 22:04:38 +02:00
export <path>
2017-11-16 13:37:46 +02:00
Exports Joplin data to the given path. By default, it will export the
2017-12-01 22:06:20 +02:00
complete database including notebooks, notes, tags and resources.
2017-11-16 13:37:46 +02:00
--format <format> Destination format: jex (Joplin Export File), raw
(Joplin Export Directory), json (Json Export
Directory), md (Markdown), html (HTML File), html
2020-03-08 11:17:10 +02:00
(HTML Directory)
2017-12-01 22:06:20 +02:00
--note <note> Exports only the given note.
--notebook <notebook> Exports only the given notebook.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
geoloc <note>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Displays a geolocation URL for the note.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
help [command]
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Displays usage information.
2017-11-16 13:37:46 +02:00
2018-02-27 22:04:38 +02:00
import <path> [notebook]
2017-11-16 13:37:46 +02:00
2018-02-27 22:04:38 +02:00
Imports data into Joplin.
2017-11-16 13:37:46 +02:00
2020-03-08 11:17:10 +02:00
--format <format> Source format: auto, jex, md, raw, enex, enex
2018-02-27 22:04:38 +02:00
-f, --force Do not ask for confirmation.
2017-11-16 13:37:46 +02:00
2020-03-08 11:17:10 +02:00
ls [note-pattern]
Displays the notes in the current notebook. Use `ls /` to display the list
2020-03-08 11:17:10 +02:00
of notebooks.
-n, --limit <num> Displays only the first top <num> notes.
-s, --sort <field> Sorts the item by <field> (eg. title, updated_time,
2020-03-08 11:17:10 +02:00
created_time).
-r, --reverse Reverses the sorting order.
-t, --type <type> Displays only the items of the specific type(s).
Can be `n` for notes, `t` for to-dos, or `nt` for
notes and to-dos (eg. `-tt` would display only the
to-dos, while `-ttd` would display notes and
2020-03-08 11:17:10 +02:00
to-dos.
-f, --format <format> Either "text" or "json"
-l, --long Use long list format. Format is ID, NOTE_COUNT (for
2020-03-08 11:17:10 +02:00
notebook), DATE, TODO_CHECKED (for to-dos), TITLE
2017-12-01 22:06:20 +02:00
mkbook <new-notebook>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Creates a new notebook.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
mknote <new-note>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Creates a new note.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
mktodo <new-todo>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Creates a new to-do.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
mv <note> [notebook]
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Moves the notes matching <note> to [notebook].
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
ren <item> <name>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Renames the given <item> (note or notebook) to <name>.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
rmbook <notebook>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Deletes the given notebook.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
-f, --force Deletes the notebook without asking for confirmation.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
rmnote <note-pattern>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Deletes the notes matching <note-pattern>.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
-f, --force Deletes the notes without asking for confirmation.
2017-11-16 13:37:46 +02:00
2020-03-08 11:17:10 +02:00
server <command>
Start, stop or check the API server. To specify on which port it should
run, set the api.port config variable. Commands are (start|stop|status).
This is an experimental feature - use at your own risks! It is recommended
that the server runs off its own separate profile so that no two CLI
instances access that profile at the same time. Use --profile to specify
2020-03-08 11:17:10 +02:00
the profile path.
2018-02-17 01:08:04 +02:00
set <note> <name> [value]
Sets the property <name> of the given <note> to the given [value].
2018-02-17 01:08:04 +02:00
Possible properties are:
2017-11-16 13:37:46 +02:00
parent_id (text), title (text), body (text), created_time (int),
updated_time (int), is_conflict (int), latitude (numeric), longitude
(numeric), altitude (numeric), author (text), source_url (text), is_todo
(int), todo_due (int), todo_completed (int), source (text),
source_application (text), application_data (text), order (int),
user_created_time (int), user_updated_time (int), encryption_cipher_text
2020-03-08 11:17:10 +02:00
(text), encryption_applied (int), markup_language (int), is_shared (int)
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
status
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Displays summary about the notes and notebooks.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
sync
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Synchronises with remote storage.
2017-11-16 13:37:46 +02:00
--target <target> Sync to provided target (defaults to sync.target config
2017-12-01 22:06:20 +02:00
value)
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
tag <tag-command> [tag] [note]
2017-11-16 13:37:46 +02:00
<tag-command> can be "add", "remove", "list", or "notetags" to assign or
remove [tag] from [note], to list notes associated with [tag], or to list
tags associated with [note]. The command `tag list` can be used to list
2020-03-08 11:17:10 +02:00
all the tags (use -l for long option).
2018-09-16 21:03:29 +02:00
-l, --long Use long list format. Format is ID, NOTE_COUNT (for notebook),
2018-09-16 21:03:29 +02:00
DATE, TODO_CHECKED (for to-dos), TITLE
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
todo <todo-command> <note-pattern>
2017-11-16 13:37:46 +02:00
<todo-command> can either be "toggle" or "clear". Use "toggle" to toggle
the given to-do between completed and uncompleted state (If the target is
a regular note it will be converted to a to-do). Use "clear" to convert
2017-12-01 22:06:20 +02:00
the to-do back to a regular note.
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
undone <note>
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Marks a to-do as non-completed.
2017-11-16 13:37:46 +02:00
2018-02-17 01:08:04 +02:00
use <notebook>
Switches to [notebook] - all further operations will happen within this
2018-02-17 01:08:04 +02:00
notebook.
2017-12-01 22:06:20 +02:00
version
2017-11-16 13:37:46 +02:00
2017-12-01 22:06:20 +02:00
Displays version information
2017-11-16 13:37:46 +02:00
# License
Copyright (c) 2016-2021 Laurent Cozic
2017-11-16 13:37:46 +02:00
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.