QOwnNotesQOwnNotes
Getting started
Installation
  • Ask question
  • Ask for feature
  • Report bug
  • Telegram Channel
  • Matrix/Element.io Room
  • Gitter Chat
  • IRC Channel
  • Mastodon
  • Twitter
  • Facebook
Donate
  • English
  • Deutsch
  • Italiano
  • Français
  • Español
  • فارسی
  • Nederlands
  • Magyar
  • العربية
  • Polski
  • 한국어
GitHub
Getting started
Installation
  • Ask question
  • Ask for feature
  • Report bug
  • Telegram Channel
  • Matrix/Element.io Room
  • Gitter Chat
  • IRC Channel
  • Mastodon
  • Twitter
  • Facebook
Donate
  • English
  • Deutsch
  • Italiano
  • Français
  • Español
  • فارسی
  • Nederlands
  • Magyar
  • العربية
  • Polski
  • 한국어
GitHub
  • Getting started

    • Overview
    • Concept
    • QOwnNotes Demo
    • Markdown
    • Importing notes
    • Command line interface parameters
    • QOwnNotes Web Companion browser extension
    • Command-line Snippet Manager
    • QOwnNotes Web App
    • QOwnNotesAPI Nextcloud App
    • Note relations panel
    • Searching for notes
    • Shortcuts
    • Git versioning
  • Installation

    • Installation
    • Install on Ubuntu Linux, elementary OS and Linux Mint
    • Install on Microsoft Windows™
    • Install on macOS™
    • Install on Debian Linux
    • Install on openSUSE Linux
    • Install on Fedora Linux
    • Install as Snap
    • Install as Flatpak
    • Install as AppImage
    • Install via Nix
    • Install on Arch Linux
    • Install on Solus
    • Install on KaOS Linux
    • Install on CentOS Linux
    • Install on Raspberry Pi OS
    • Install on Gentoo Linux
    • Install on Funtoo Linux
    • Install on Void Linux
    • Install on Slackware Linux
    • Install on FreeBSD
    • Building QOwnNotes
  • Editor

    • Spellchecking
    • AI support
    • Time formats
  • Scripting

    • QOwnNotes Scripting
    • Methods and objects QOwnNotes provides
    • Hooks
    • Exposed classes
  • Contributing

    • Getting involved
    • Code of Conduct
    • Maintainers
    • Translation
    • Donate
    • Sponsors
  • FAQ

    • How can I just show the preview panel without the note edit panel?
    • Where can I find what other people said about QOwnNotes?
    • Why metrics?
  • Blog

    • Overview
    • Universal binary for macOS
    • Note relations panel
    • AI support was added to QOwnNotes
    • Source Archive switched from TuxFamily to GitHub Releases
    • Nextcloud Deck integration in QOwnNotes
    • QOwnNotes UI End2End Tests with the help of NixOS
    • Please test Qt6 version of QOwnNotes from a new PPA for Ubuntu Linux
    • Evernote import for huge files
    • Happy 1000th release of QOwnNotes
    • Polish website translation
    • Working with multiple notes
    • QOwnNotes command-line snippet manager
    • Nextcloud note versions
    • Manage orphaned image files and attachments
    • Linking of note headings
    • Tor Hidden Service Webpage
    • Use workspaces to manage different layouts of the user interface
    • Auto-complete text in note editor
    • Open links in the note editor
    • Solve simple equations in the note editor
    • Auto-format Markdown tables
    • QOwnNotes Mastodon page
    • Repository for Debian 11
    • Joplin import
    • Send photos from your mobile phone to QOwnNotes on the desktop
    • Four new languages added to the website
    • QOwnNotes Demo
    • Markdown explanation
    • Webpage translation
    • QOwnNotes for Ubuntu 21.04 Hirsute Hippo
    • QOwnNotes for Fedora 33
    • Release and blog posting automation
    • Legacy update service up again
    • RSS Feeds are back in place
    • Time Flies Podcast episode with interview about QOwnNotes
    • Bookmark management with QOwnNotes and Web Companion browser extension
    • Firefox extension on Firefox Add-ons page
    • Chrome extension in Chrome Web Store
    • QOwnNotes Web Companion Chrome extension
    • 500th release of QOwnNotes
    • QOwnNotes Telegram Group
    • Vim mode
    • QOwnNotes for openSUSE Leap 15, SUSE Linux Enterprise 15 and SUSE Linux Enterprise 12 SP3
    • QOwnNotes featured on LINUX Unplugged podcast and by Ubuntu
    • Interview for ownCloud
    • QOwnNotes for Fedora 27
    • QOwnNotes reviewed in German magazine c't
    • QOwnNotesAPI in the ownCloud Marketplace
    • QOwnNotes as AppImage
    • QOwnNotes for Debian 9.0, Fedora 26 and openSUSE Leap 42.3
    • Script repository and script settings variables
    • Fedora 25 release and new documentation page
    • Solus package for QOwnNotes
    • Automatic updates in Windows and macOS
    • Note encryption with keybase.io or directly with PGP
    • Evernote import
    • Portable mode
    • QOwnNotes on webupd8.org
    • QOwnNotes featured on the Linux Voice Podcast
    • QOwnNotes snap
    • QOwnNotes review in British magazine Linux Format
    • QOwnNotes Slackware Linux Repository
    • QOwnNotes review
    • QOwnNotes IRC
    • QOwnNotes now has scripting support
    • QOwnNotes is the Desktop App Pick on the Linux Action Show
    • QOwnNotes got featured in Linux Voice 25
    • QOwnNotes Gentoo Linux Overlay
    • Translate QOwnNotes on Crowdin
    • QOwnNotes 1.0 out now in 6 languages and with Freedesktop theme icons support
    • QOwnNotes software repository for Debian Linux
    • QOwnNotes package on the Arch User Repository
    • QOwnNotes software repository for Arch Linux
    • Webpage redesign
    • Qt widget QMarkdownTextEdit now a separate project for developer's pleasure
    • New release version RSS feed
    • New Linux software repositories and todo list support
    • QOwnNotes on Linux Unplugged
    • Build and release systems for QOwnNotes for Linux, macOS and Windows!
    • Links to other notes or files are now possible in QOwnNotes
  • Changelog

    • QOwnNotes Changelog

Command-line Snippet Manager

You can use the QOwnNotes Command-line Snippet Manager to execute command snippets stored in notes in QOwnNotes from the command line.

qc

You can use notes with a special tag to store command snippets, which you can execute from the command-line snippet manager.

commands

Installation

Visit the latest release page and download the version you need.

Tips

If you have jq installed you can also use this snippet to download and install for example the latest Linux AMD64 AppImage to /usr/local/bin/qc:

curl https://api.github.com/repos/qownnotes/qc/releases/latest | \
jq '.assets[] | select(.browser_download_url | endswith("_linux_amd64.tar.gz")) | .browser_download_url' | \
xargs curl -Lo /tmp/qc.tar.gz && \
tar xfz /tmp/qc.tar.gz -C /tmp && \
rm /tmp/qc.tar.gz && \
sudo mv /tmp/qc /usr/local/bin/qc && \
/usr/local/bin/qc --version

Dependencies

fzf (fuzzy search) or peco (older, but more likely to be installed by default) need to be installed to search for commands on the command-line.

Tips

By default fzf is used for searching, but you can use peco by setting it with qc configure.

Setup

socket-server-token

Before you are using the snippet manager you need to enable the Web socket server (2) in the Browser extension / command snippets (1) settings in QOwnNotes.

Then you need to show the security token (3) and copy it (4).

Now open the configuration file of the snippet manager with:

# Configure the snippet manager
qc configure

And put the security token in the token attribute:

[QOwnNotes]
token = "yourtokenhere"

Tips

In the QOwnNotes settings you can also set what note tag should be used to search for commands in notes. By default, the tag commands is used.

Syntax of command snippets

You can use unordered lists with in-line code blocks to store command snippets. All notes with the tag commands are searched for command snippets.

If you add a cmd: before the in-line code block, the command will also be found in the current note regardless of note tags.

- `echo I am a command` I am a description #tag1 #tag2 #tag3

* `echo I am also a command` I am a description #tag3 #tag4 #tag5

- cmd: `echo I will be found in the current note` This command will be found in the current note regardless of note tags

<!-- Example for asking for user input -->

- `read -p "PR ID: " id && git fetch origin pull/$id/head:pull-$id && git checkout pull-$id` Ask for pull request ID and checkout pull request

bash or shell code blocks, preceded by a heading 2 or higher as a description, can also be used for command snippets. Tags are also supported if they are between the heading and the code block.

## Do this with a "bash" code block

- this text will be ignored text
- but tags can be used: #tag1 #tag2

```bash
echo do this
echo do that
```

## Do something else with a "sh" code block

```sh
echo do something else
echo do something other
```

Above example will result in two command snippets, the first one with the two tags tag1 and tag2.

Usage

# Search and execute command snippets
qc exec
# Search and print command snippets
qc search

Configuration

Run qc configure.

[General]
  editor = "vim"            # your favorite text editor
  column = 40               # column size for list command
  selectcmd = "fzf"         # selector command for edit command (fzf or peco)
  sortby = ""               # specify how snippets get sorted (recency (default), -recency, description, -description, command, -command, output, -output)

[QOwnNotes]
  token = "MvTagHXF"        # your QOwnNotes API token
  websocket_port = 22222    # websocket port in QOwnNotes

Shell completion

You can generate shell completion code for your shell with qc completion <shell>.

For example for the Fish shell you can use:

qc completion fish > ~/.config/fish/completions/qc.fish
Help us improve this page!
Prev
QOwnNotes Web Companion browser extension
Next
QOwnNotes Web App