Linux-first command snippet manager for markdown notes
Project description
OpIndex
OpIndex is a Linux-first command memory tool for markdown notes. It parses reusable command blocks from your notes, lets you search them from a launcher, and copies the selected command to the clipboard.
The current UI is optimized for rofi on X11, but the note format and CLI are useful independently of the launcher.
What it does
- searches reusable commands from markdown files
- organizes sources into named workspaces
- supports quick workspace switching from a launcher
- shows source-document context while browsing
- lints notes against the OpIndex authoring standard
- copies selected commands to the clipboard
Platform
OpIndex currently targets Linux. It expects one of:
rofifor the interactive launcher flowxclip,xsel, orwl-copyfor clipboard access
Installation
System dependencies
Debian or Ubuntu:
sudo apt install rofi xclip
Wayland clipboard support:
sudo apt install wl-clipboard
Python package
The intended PyPI distribution name is opindex.
pipx install opindex
This installs the opindex command.
For local development:
pipx install .
Quick start
Create a config:
opindex --create-config
Run the selector in the default workspace:
opindex
Open the workspace picker first:
opindex --workspace-menu
Search a specific workspace:
opindex --workspace oscp
Search all workspaces:
opindex --all
Browse by workspace, then document:
opindex --browse
Configuration
The config file lives at:
~/.config/opindex/config.yaml
Example:
default_workspace: oscp
workspaces:
oscp:
directories:
- "~/notes/OSCP-Methodology"
files: []
recursive: true
file_patterns:
- "*.md"
- "*.markdown"
cheatsheets:
directories:
- "~/notes/cheatsheets"
files: []
recursive: true
file_patterns:
- "*.md"
- "*.markdown"
rofi:
args: []
use_markup: true
max_lines: 15
prompt: "Commands"
window_width: 60
element_height: 2
cache:
enabled: true
directory: null
auto_cleanup: true
substitute_variables: false
variables: {}
Markdown format
Minimal parseable format:
# Azure CLI
## Login with device code
```bash
az login --use-device-code
```
OpIndex parses:
#as the category##as the searchable task heading- fenced code blocks as command content
Supported command block languages:
- empty language
bashshshellpowershellps1cmdbatbatch
For the stricter durable-note format, see:
Linting
Lint a specific note:
opindex --lint-files path/to/file.md
Lint the selected workspace sources:
opindex --lint-files
CLI
Common commands:
opindex --help
opindex --list-workspaces
opindex --list-files
opindex --list-commands
opindex --clear-cache
opindex --config-path
Development
Run tests:
python3 -m pytest tests/
Run the parser against a file:
python3 -m cmd_manager.parser test_data/sample.md
Lint a note during development:
python3 opindex --lint-files test_data/sample.md
Publishing
The package is prepared for Trusted Publishing from GitHub Actions. See:
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opindex-0.1.0.tar.gz.
File metadata
- Download URL: opindex-0.1.0.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69d25c9668d923a4ea97bb9e974d07ecbbf7a563f79430238120957970b40852
|
|
| MD5 |
6bc197cda3a109ec037c1bd1a6beced4
|
|
| BLAKE2b-256 |
4c57fdd0841a96e86fdbe201cadc0ea2a5fdaaec84332449cc495470a34cbc4c
|
Provenance
The following attestation bundles were made for opindex-0.1.0.tar.gz:
Publisher:
release.yml on CameronCandau/OpIndex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opindex-0.1.0.tar.gz -
Subject digest:
69d25c9668d923a4ea97bb9e974d07ecbbf7a563f79430238120957970b40852 - Sigstore transparency entry: 1395849401
- Sigstore integration time:
-
Permalink:
CameronCandau/OpIndex@4c40b54fca0849730339ac5a93498c0d0d4bf8e1 -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/CameronCandau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4c40b54fca0849730339ac5a93498c0d0d4bf8e1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file opindex-0.1.0-py3-none-any.whl.
File metadata
- Download URL: opindex-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6713e0657e91634d4a2a7272b7844c4471566f83b1345c9fb0541cfd1b365991
|
|
| MD5 |
e182168714a639eb246e98719472f957
|
|
| BLAKE2b-256 |
8f7e8f46df767eccc8ac72b7d18c016351e9eb43d4203ca7e2027fd9f5e2b79b
|
Provenance
The following attestation bundles were made for opindex-0.1.0-py3-none-any.whl:
Publisher:
release.yml on CameronCandau/OpIndex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opindex-0.1.0-py3-none-any.whl -
Subject digest:
6713e0657e91634d4a2a7272b7844c4471566f83b1345c9fb0541cfd1b365991 - Sigstore transparency entry: 1395849407
- Sigstore integration time:
-
Permalink:
CameronCandau/OpIndex@4c40b54fca0849730339ac5a93498c0d0d4bf8e1 -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/CameronCandau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4c40b54fca0849730339ac5a93498c0d0d4bf8e1 -
Trigger Event:
release
-
Statement type: